summaryrefslogtreecommitdiffstats
path: root/lldb/scripts/Python/interface/SBModule.i
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/scripts/Python/interface/SBModule.i')
-rw-r--r--lldb/scripts/Python/interface/SBModule.i16
1 files changed, 13 insertions, 3 deletions
diff --git a/lldb/scripts/Python/interface/SBModule.i b/lldb/scripts/Python/interface/SBModule.i
index ccfbed6b2db..b98afdecde9 100644
--- a/lldb/scripts/Python/interface/SBModule.i
+++ b/lldb/scripts/Python/interface/SBModule.i
@@ -177,6 +177,15 @@ public:
lldb::SBSymbol
GetSymbolAtIndex (size_t idx);
+ lldb::SBSymbol
+ FindSymbol (const char *name,
+ lldb::SymbolType type = eSymbolTypeAny);
+
+ lldb::SBSymbolContextList
+ FindSymbols (const char *name,
+ lldb::SymbolType type = eSymbolTypeAny);
+
+
size_t
GetNumSections ();
@@ -269,9 +278,10 @@ public:
return self.sbmodule.GetSymbolAtIndex(key)
elif type(key) is str:
matches = []
- for idx in range(count):
- symbol = self.sbmodule.GetSymbolAtIndex(idx)
- if symbol.name == key or symbol.mangled == key:
+ sc_list = self.sbmodule.FindSymbols(key)
+ for sc in sc_list:
+ symbol = sc.symbol
+ if symbol:
matches.append(symbol)
return matches
elif isinstance(key, self.re_compile_type):
OpenPOWER on IntegriCloud