summaryrefslogtreecommitdiffstats
path: root/lldb/source/API/SBModule.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/API/SBModule.cpp')
-rw-r--r--lldb/source/API/SBModule.cpp27
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;
+}
OpenPOWER on IntegriCloud