Changed the SymbolFile::FindFunction() function calls to only return
lldb_private::Function objects. Previously the SymbolFileSymtab subclass
would return lldb_private::Symbol objects when it was asked to find functions.
The Module::FindFunctions (...) now take a boolean "bool include_symbols" so
that the module can track down functions and symbols, yet functions are found
by the SymbolFile plug-ins (through the SymbolVendor class), and symbols are
gotten through the ObjectFile plug-ins.
Fixed and issue where the DWARF parser might run into incomplete class member
function defintions which would make clang mad when we tried to make certain
member functions with invalid number of parameters (such as an operator=
operator that had no parameters). Now we just avoid and don't complete these
incomplete functions.
git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@124359 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/source/Commands/CommandObjectImage.cpp b/source/Commands/CommandObjectImage.cpp
index 58907bf..1f6cd50 100644
--- a/source/Commands/CommandObjectImage.cpp
+++ b/source/Commands/CommandObjectImage.cpp
@@ -360,33 +360,36 @@
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);
- }
-
- 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;
+ 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;
}
return 0;
}