diff options
author | Ilia K <ki.stfu@gmail.com> | 2015-03-10 21:59:55 +0000 |
---|---|---|
committer | Ilia K <ki.stfu@gmail.com> | 2015-03-10 21:59:55 +0000 |
commit | eb2c19a5493b2dd669b374e09a078adb6e47b7e5 (patch) | |
tree | 633daf4ce7ecaaaf15026c5475723a8dbfbb7290 /lldb/source/API/SBModule.cpp | |
parent | 501d5e9f66a7984c140c7b44866245dae95dcd58 (diff) | |
download | bcm5719-llvm-eb2c19a5493b2dd669b374e09a078adb6e47b7e5.tar.gz bcm5719-llvm-eb2c19a5493b2dd669b374e09a078adb6e47b7e5.zip |
Add =shlibs-added/=shlibs-removed notifications (MI)
Summary:
This patch adds =shlibs-added/=shlibs-removed notifications in lldb-mi. In more detail:
# Add Target::ModulesDidLoad/ModulesDidUnload notifications
# Improve Target::TargetEventData:
## Refactoring
## Move it back to include/lldb/Target/Target.h
## Add Target::{GetModuleListFromEvent,GetModuleList}; Add Target::m_module_list
# Add SBModule::{GetSymbolVendorMainFileSpec,GetObjectFileHeaderAddress}
# Add SBTarget::{EventIsTaretEvent,GetTargetFromEvent,GetNumModulesFromEvent,GetModuleAtIndexFromEvent}
All tests pass on OS X.
Reviewers: abidh, zturner, jingham, clayborg
Reviewed By: clayborg
Subscribers: jingham, zturner, lldb-commits, clayborg, abidh
Differential Revision: http://reviews.llvm.org/D8201
llvm-svn: 231858
Diffstat (limited to 'lldb/source/API/SBModule.cpp')
-rw-r--r-- | lldb/source/API/SBModule.cpp | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/lldb/source/API/SBModule.cpp b/lldb/source/API/SBModule.cpp index 8d5c235240c..057297a6b5b 100644 --- a/lldb/source/API/SBModule.cpp +++ b/lldb/source/API/SBModule.cpp @@ -685,3 +685,30 @@ SBModule::GetVersion (uint32_t *versions, uint32_t num_versions) } } +lldb::SBFileSpec +SBModule::GetSymbolFileSpec() const +{ + lldb::SBFileSpec sb_file_spec; + ModuleSP module_sp(GetSP()); + if (module_sp) + { + SymbolVendor *symbol_vendor_ptr = module_sp->GetSymbolVendor(); + if (symbol_vendor_ptr) + sb_file_spec.SetFileSpec(symbol_vendor_ptr->GetMainFileSpec()); + } + return sb_file_spec; +} + +lldb::SBAddress +SBModule::GetObjectFileHeaderAddress() const +{ + lldb::SBAddress sb_addr; + ModuleSP module_sp (GetSP ()); + if (module_sp) + { + ObjectFile *objfile_ptr = module_sp->GetObjectFile(); + if (objfile_ptr) + sb_addr.ref() = objfile_ptr->GetHeaderAddress(); + } + return sb_addr; +} |