Added some missing API for address resolving within a module, and looking
up a seciton offset address (SBAddress) within a module that returns a symbol context (SBSymbolContext). Also added a SBSymbolContextList in preparation for adding find/lookup APIs that can return multiple results. Added a lookup example code that shows how to do address lookups. llvm-svn: 113599
This commit is contained in:
@@ -8,6 +8,8 @@
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "lldb/API/SBModule.h"
|
||||
#include "lldb/API/SBAddress.h"
|
||||
#include "lldb/API/SBFileSpec.h"
|
||||
#include "lldb/API/SBFileSpec.h"
|
||||
#include "lldb/Core/Module.h"
|
||||
|
||||
@@ -105,3 +107,23 @@ SBModule::SetModule (const lldb::ModuleSP& module_sp)
|
||||
m_opaque_sp = module_sp;
|
||||
}
|
||||
|
||||
|
||||
bool
|
||||
SBModule::ResolveFileAddress (lldb::addr_t vm_addr, SBAddress& addr)
|
||||
{
|
||||
if (m_opaque_sp)
|
||||
return m_opaque_sp->ResolveFileAddress (vm_addr, *addr);
|
||||
|
||||
addr->Clear();
|
||||
return false;
|
||||
}
|
||||
|
||||
SBSymbolContext
|
||||
SBModule::ResolveSymbolContextForAddress (const SBAddress& addr, uint32_t resolve_scope)
|
||||
{
|
||||
SBSymbolContext sb_sc;
|
||||
if (m_opaque_sp && addr.IsValid())
|
||||
m_opaque_sp->ResolveSymbolContextForAddress (*addr, resolve_scope, *sb_sc);
|
||||
return sb_sc;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user