summaryrefslogtreecommitdiff
path: root/source/API/SBModule.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/API/SBModule.cpp')
-rw-r--r--source/API/SBModule.cpp43
1 files changed, 28 insertions, 15 deletions
diff --git a/source/API/SBModule.cpp b/source/API/SBModule.cpp
index 3dd99d5321b4..31980793bce0 100644
--- a/source/API/SBModule.cpp
+++ b/source/API/SBModule.cpp
@@ -217,9 +217,9 @@ SBModule::ResolveSymbolContextForAddress(const SBAddress &addr,
uint32_t resolve_scope) {
SBSymbolContext sb_sc;
ModuleSP module_sp(GetSP());
+ SymbolContextItem scope = static_cast<SymbolContextItem>(resolve_scope);
if (module_sp && addr.IsValid())
- module_sp->ResolveSymbolContextForAddress(addr.ref(), resolve_scope,
- *sb_sc);
+ module_sp->ResolveSymbolContextForAddress(addr.ref(), scope, *sb_sc);
return sb_sc;
}
@@ -365,8 +365,9 @@ lldb::SBSymbolContextList SBModule::FindFunctions(const char *name,
const bool append = true;
const bool symbols_ok = true;
const bool inlines_ok = true;
- module_sp->FindFunctions(ConstString(name), NULL, name_type_mask,
- symbols_ok, inlines_ok, append, *sb_sc_list);
+ FunctionNameType type = static_cast<FunctionNameType>(name_type_mask);
+ module_sp->FindFunctions(ConstString(name), NULL, type, symbols_ok,
+ inlines_ok, append, *sb_sc_list);
}
return sb_sc_list;
}
@@ -439,13 +440,12 @@ lldb::SBTypeList SBModule::FindTypes(const char *type) {
ModuleSP module_sp(GetSP());
if (type && module_sp) {
- SymbolContext sc;
TypeList type_list;
const bool exact_match = false;
ConstString name(type);
llvm::DenseSet<SymbolFile *> searched_symbol_files;
const uint32_t num_matches = module_sp->FindTypes(
- sc, name, exact_match, UINT32_MAX, searched_symbol_files, type_list);
+ name, exact_match, UINT32_MAX, searched_symbol_files, type_list);
if (num_matches > 0) {
for (size_t idx = 0; idx < num_matches; idx++) {
@@ -484,14 +484,16 @@ lldb::SBTypeList SBModule::GetTypes(uint32_t type_mask) {
SBTypeList sb_type_list;
ModuleSP module_sp(GetSP());
- if (module_sp) {
- SymbolVendor *vendor = module_sp->GetSymbolVendor();
- if (vendor) {
- TypeList type_list;
- vendor->GetTypes(NULL, type_mask, type_list);
- sb_type_list.m_opaque_ap->Append(type_list);
- }
- }
+ if (!module_sp)
+ return sb_type_list;
+ SymbolVendor *vendor = module_sp->GetSymbolVendor();
+ if (!vendor)
+ return sb_type_list;
+
+ TypeClass type_class = static_cast<TypeClass>(type_mask);
+ TypeList type_list;
+ vendor->GetTypes(NULL, type_class, type_list);
+ sb_type_list.m_opaque_ap->Append(type_list);
return sb_type_list;
}
@@ -584,7 +586,18 @@ lldb::SBAddress SBModule::GetObjectFileHeaderAddress() const {
if (module_sp) {
ObjectFile *objfile_ptr = module_sp->GetObjectFile();
if (objfile_ptr)
- sb_addr.ref() = objfile_ptr->GetHeaderAddress();
+ sb_addr.ref() = objfile_ptr->GetBaseAddress();
+ }
+ return sb_addr;
+}
+
+lldb::SBAddress SBModule::GetObjectFileEntryPointAddress() 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->GetEntryPointAddress();
}
return sb_addr;
}