summaryrefslogtreecommitdiffstats
path: root/lldb/source/Commands/CommandObjectImage.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/Commands/CommandObjectImage.cpp')
-rw-r--r--lldb/source/Commands/CommandObjectImage.cpp51
1 files changed, 27 insertions, 24 deletions
diff --git a/lldb/source/Commands/CommandObjectImage.cpp b/lldb/source/Commands/CommandObjectImage.cpp
index 58907bfd2d1..1f6cd50941d 100644
--- a/lldb/source/Commands/CommandObjectImage.cpp
+++ b/lldb/source/Commands/CommandObjectImage.cpp
@@ -360,33 +360,36 @@ LookupFunctionInModule (CommandInterpreter &interpreter, Stream &strm, Module *m
if (module && name && name[0])
{
SymbolContextList sc_list;
-
- SymbolVendor *symbol_vendor = module->GetSymbolVendor();
- if (symbol_vendor)
+ const bool include_symbols = false;
+ const bool append = true;
+ uint32_t num_matches = 0;
+ if (name_is_regex)
{
- uint32_t num_matches = 0;
- if (name_is_regex)
- {
- RegularExpression function_name_regex (name);
- num_matches = symbol_vendor->FindFunctions(function_name_regex, true, sc_list);
-
- }
- else
- {
- ConstString function_name(name);
- num_matches = symbol_vendor->FindFunctions(function_name, eFunctionNameTypeBase | eFunctionNameTypeFull | eFunctionNameTypeMethod | eFunctionNameTypeSelector, true, sc_list);
- }
+ RegularExpression function_name_regex (name);
+ num_matches = module->FindFunctions (function_name_regex,
+ include_symbols,
+ append,
+ sc_list);
+ }
+ else
+ {
+ ConstString function_name (name);
+ num_matches = module->FindFunctions (function_name,
+ eFunctionNameTypeBase | eFunctionNameTypeFull | eFunctionNameTypeMethod | eFunctionNameTypeSelector,
+ include_symbols,
+ append,
+ sc_list);
+ }
- if (num_matches)
- {
- strm.Indent ();
- strm.Printf("%u match%s found in ", num_matches, num_matches > 1 ? "es" : "");
- DumpFullpath (strm, &module->GetFileSpec(), 0);
- strm.PutCString(":\n");
- DumpSymbolContextList (interpreter, strm, sc_list, true);
- }
- return num_matches;
+ if (num_matches)
+ {
+ strm.Indent ();
+ strm.Printf("%u match%s found in ", num_matches, num_matches > 1 ? "es" : "");
+ DumpFullpath (strm, &module->GetFileSpec(), 0);
+ strm.PutCString(":\n");
+ DumpSymbolContextList (interpreter, strm, sc_list, true);
}
+ return num_matches;
}
return 0;
}
OpenPOWER on IntegriCloud