summaryrefslogtreecommitdiffstats
path: root/lldb/source/API/SBModule.cpp
diff options
context:
space:
mode:
authorGreg Clayton <gclayton@apple.com>2011-07-22 16:46:35 +0000
committerGreg Clayton <gclayton@apple.com>2011-07-22 16:46:35 +0000
commit00e6fbfee9e400dd02397b92636f2d82f8761c0c (patch)
tree0e142bab7cee0672267bf97d1efb72e211e25e08 /lldb/source/API/SBModule.cpp
parentc567ba26e92030a09c96d0a0562a1795dc8f0b82 (diff)
downloadbcm5719-llvm-00e6fbfee9e400dd02397b92636f2d82f8761c0c.tar.gz
bcm5719-llvm-00e6fbfee9e400dd02397b92636f2d82f8761c0c.zip
Make the SBAddress class easier to use when using the public
API. SBTarget changes include changing: bool SBTarget::ResolveLoadAddress (lldb::addr_t vm_addr, lldb::SBAddress& addr); to be: lldb::SBAddress SBTarget::ResolveLoadAddress (lldb::addr_t vm_addr); SBAddress can how contruct itself using a load address and a target which can be used to resolve the address: SBAddress (lldb::addr_t load_addr, lldb::SBTarget &target); This will actually just call the new SetLoadAddress accessor: void SetLoadAddress (lldb::addr_t load_addr, lldb::SBTarget &target); This function will always succeed in making a SBAddress object that can be used in API calls (even if "target" isn't valid). If "target" is valid and there are sections currently loaded, then it will resolve the address to a section offset address if it can. Else an address with a NULL section and an offset that is the "load_addr" that was passed in. We do this because a load address might be from the heap or stack. llvm-svn: 135770
Diffstat (limited to 'lldb/source/API/SBModule.cpp')
-rw-r--r--lldb/source/API/SBModule.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lldb/source/API/SBModule.cpp b/lldb/source/API/SBModule.cpp
index 53172f349ca..852952af303 100644
--- a/lldb/source/API/SBModule.cpp
+++ b/lldb/source/API/SBModule.cpp
@@ -228,7 +228,7 @@ bool
SBModule::ResolveFileAddress (lldb::addr_t vm_addr, SBAddress& addr)
{
if (m_opaque_sp && addr.IsValid())
- return m_opaque_sp->ResolveFileAddress (vm_addr, *addr);
+ return m_opaque_sp->ResolveFileAddress (vm_addr, addr.ref());
if (addr.IsValid())
addr->Clear();
@@ -240,7 +240,7 @@ SBModule::ResolveSymbolContextForAddress (const SBAddress& addr, uint32_t resolv
{
SBSymbolContext sb_sc;
if (m_opaque_sp && addr.IsValid())
- m_opaque_sp->ResolveSymbolContextForAddress (*addr, resolve_scope, *sb_sc);
+ m_opaque_sp->ResolveSymbolContextForAddress (addr.ref(), resolve_scope, *sb_sc);
return sb_sc;
}
OpenPOWER on IntegriCloud