summaryrefslogtreecommitdiffstats
path: root/lldb/source/Core/Disassembler.cpp
diff options
context:
space:
mode:
authorGreg Clayton <gclayton@apple.com>2011-01-27 06:44:37 +0000
committerGreg Clayton <gclayton@apple.com>2011-01-27 06:44:37 +0000
commit931180e644bc086a16dcad43713b0ac5b7d0a83f (patch)
treeeb89d8a5cf048706e1c7246bb2fbc2c40a4453be /lldb/source/Core/Disassembler.cpp
parentebd8db7d0032f881cbdfdb4bbceead2052562141 (diff)
downloadbcm5719-llvm-931180e644bc086a16dcad43713b0ac5b7d0a83f.tar.gz
bcm5719-llvm-931180e644bc086a16dcad43713b0ac5b7d0a83f.zip
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. llvm-svn: 124359
Diffstat (limited to 'lldb/source/Core/Disassembler.cpp')
-rw-r--r--lldb/source/Core/Disassembler.cpp53
1 files changed, 29 insertions, 24 deletions
diff --git a/lldb/source/Core/Disassembler.cpp b/lldb/source/Core/Disassembler.cpp
index e6fe1b018a5..64a4c2c762b 100644
--- a/lldb/source/Core/Disassembler.cpp
+++ b/lldb/source/Core/Disassembler.cpp
@@ -99,39 +99,44 @@ Disassembler::Disassemble
Stream &strm
)
{
- if (exe_ctx.target == NULL && name)
- return false;
-
SymbolContextList sc_list;
-
- if (module)
- {
- if (!module->FindFunctions (name,
- eFunctionNameTypeBase |
- eFunctionNameTypeFull |
- eFunctionNameTypeMethod |
- eFunctionNameTypeSelector,
- true,
- sc_list))
- return false;
- }
- else
+ if (name)
{
- if (exe_ctx.target->GetImages().FindFunctions (name,
+ const bool include_symbols = true;
+ if (module)
+ {
+ module->FindFunctions (name,
+ eFunctionNameTypeBase |
+ eFunctionNameTypeFull |
+ eFunctionNameTypeMethod |
+ eFunctionNameTypeSelector,
+ include_symbols,
+ true,
+ sc_list);
+ }
+ else if (exe_ctx.target)
+ {
+ exe_ctx.target->GetImages().FindFunctions (name,
eFunctionNameTypeBase |
eFunctionNameTypeFull |
eFunctionNameTypeMethod |
eFunctionNameTypeSelector,
+ include_symbols,
false,
- sc_list))
- {
- return Disassemble (debugger, arch, exe_ctx, sc_list, num_mixed_context_lines, show_bytes, strm);
- }
- else if (exe_ctx.target->GetImages().FindSymbolsWithNameAndType(name, eSymbolTypeCode, sc_list))
- {
- return Disassemble (debugger, arch, exe_ctx, sc_list, num_mixed_context_lines, show_bytes, strm);
+ sc_list);
}
}
+
+ if (sc_list.GetSize ())
+ {
+ return Disassemble (debugger,
+ arch,
+ exe_ctx,
+ sc_list,
+ num_mixed_context_lines,
+ show_bytes,
+ strm);
+ }
return false;
}
OpenPOWER on IntegriCloud