summaryrefslogtreecommitdiffstats
path: root/lldb/source/Symbol/SymbolFile.cpp
diff options
context:
space:
mode:
authorGreg Clayton <gclayton@apple.com>2010-11-10 04:57:04 +0000
committerGreg Clayton <gclayton@apple.com>2010-11-10 04:57:04 +0000
commit2d95dc9b2240626afe998a04c091c394ffd9067a (patch)
tree078e7a1388009ad9da5aa97e3173038fc8af2b37 /lldb/source/Symbol/SymbolFile.cpp
parentf23b2d9d8d257994e4b819f64b5963db0d452822 (diff)
downloadbcm5719-llvm-2d95dc9b2240626afe998a04c091c394ffd9067a.tar.gz
bcm5719-llvm-2d95dc9b2240626afe998a04c091c394ffd9067a.zip
Modified lldb_private::SymboleFile to be able to override where its TypeList
comes from by using a virtual function to provide it from the Module's SymbolVendor by default. This allows the DWARF parser, when being used to parse DWARF in .o files with a parent DWARF + debug map parser, to get its type list from the DWARF + debug map parser so when we go and find full definitions for types (that might come from other .o files), we can use the type list from the debug map parser. Otherwise we ended up mixing clang types from one .o file (say a const pointer to a forward declaration "class A") with the a full type from another .o file. This causes expression parsing, when copying the clang types from those parsed by the DWARF parser into the expression AST, to fail -- for good reason. Now all types are created in the same list. Also added host support for crash description strings that can be set before doing a piece of work. On MacOSX, this ties in with CrashReporter support that allows a string to be dispalyed when the app crashes and allows LLDB.framework to print a description string in the crash log. Right now this is hookup up the the CommandInterpreter::HandleCommand() where each command notes that it is about to be executed, so if we crash while trying to do this command, we should be able to see the command that caused LLDB to exit. For all other platforms, this is a nop. llvm-svn: 118672
Diffstat (limited to 'lldb/source/Symbol/SymbolFile.cpp')
-rw-r--r--lldb/source/Symbol/SymbolFile.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/lldb/source/Symbol/SymbolFile.cpp b/lldb/source/Symbol/SymbolFile.cpp
index edfd56d3bd9..3f684a40cfa 100644
--- a/lldb/source/Symbol/SymbolFile.cpp
+++ b/lldb/source/Symbol/SymbolFile.cpp
@@ -9,7 +9,9 @@
#include "lldb/lldb-private.h"
#include "lldb/Symbol/SymbolFile.h"
+#include "lldb/Core/Module.h"
#include "lldb/Core/PluginManager.h"
+#include "lldb/Symbol/ObjectFile.h"
using namespace lldb_private;
@@ -47,4 +49,8 @@ SymbolFile::FindPlugin (ObjectFile* obj_file)
return best_sym_file_ap.release();
}
-
+TypeList *
+SymbolFile::GetTypeList ()
+{
+ return m_obj_file->GetModule()->GetTypeList();
+}
OpenPOWER on IntegriCloud