From 83f1149b30d9131c8f8b26efafd223e119eb4891 Mon Sep 17 00:00:00 2001 From: Jason Molenda Date: Sat, 4 Jan 2014 01:37:52 +0000 Subject: [PATCH] Use Address::SetLoadAddress() instead of SectionLoadList::ResolveLoadAddress(). The former will set the Address object's offset to the load address value if it is not present in any section; the latter will only set the Address object if the load addr is contained in one of its sections. llvm-svn: 198469 --- lldb/source/Plugins/Process/Utility/RegisterContextLLDB.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lldb/source/Plugins/Process/Utility/RegisterContextLLDB.cpp b/lldb/source/Plugins/Process/Utility/RegisterContextLLDB.cpp index f5f499f..1c23e23 100644 --- a/lldb/source/Plugins/Process/Utility/RegisterContextLLDB.cpp +++ b/lldb/source/Plugins/Process/Utility/RegisterContextLLDB.cpp @@ -120,7 +120,7 @@ RegisterContextLLDB::InitializeZerothFrame() current_pc = abi->FixCodeAddress(current_pc); // Initialize m_current_pc, an Address object, based on current_pc, an addr_t. - process->GetTarget().GetSectionLoadList().ResolveLoadAddress (current_pc, m_current_pc); + m_current_pc.SetLoadAddress (current_pc, &process->GetTarget()); // If we don't have a Module for some reason, we're not going to find symbol/function information - just // stick in some reasonable defaults and hope we can unwind past this frame. @@ -285,7 +285,7 @@ RegisterContextLLDB::InitializeNonZerothFrame() if (abi) pc = abi->FixCodeAddress(pc); - process->GetTarget().GetSectionLoadList().ResolveLoadAddress (pc, m_current_pc); + m_current_pc.SetLoadAddress (pc, &process->GetTarget()); // If we don't have a Module for some reason, we're not going to find symbol/function information - just // stick in some reasonable defaults and hope we can unwind past this frame. @@ -682,7 +682,7 @@ RegisterContextLLDB::GetFullUnwindPlanForFrame () uint32_t permissions; addr_t current_pc_addr = m_current_pc.GetLoadAddress (exe_ctx.GetTargetPtr()); if (current_pc_addr == 0 - || (process->GetLoadAddressPermissions(current_pc_addr, permissions) + || (process->GetLoadAddressPermissions (current_pc_addr, permissions) && (permissions & ePermissionsExecutable) == 0)) { unwind_plan_sp.reset (new UnwindPlan (lldb::eRegisterKindGeneric)); -- 2.7.4