summaryrefslogtreecommitdiffstats
path: root/lldb/include/lldb/Symbol/SymbolVendor.h
diff options
context:
space:
mode:
authorGreg Clayton <gclayton@apple.com>2015-12-02 00:43:32 +0000
committerGreg Clayton <gclayton@apple.com>2015-12-02 00:43:32 +0000
commit5dfc4a4d0271e9b919702b7a638bb4ee624ec940 (patch)
treef5f58ea734c0d206886cfc43e24df14dc7fe8ae1 /lldb/include/lldb/Symbol/SymbolVendor.h
parentf3be9d5c0ba0731a16797e2b823f2eddcb1e36a1 (diff)
downloadbcm5719-llvm-5dfc4a4d0271e9b919702b7a638bb4ee624ec940.tar.gz
bcm5719-llvm-5dfc4a4d0271e9b919702b7a638bb4ee624ec940.zip
Added support for -gmodule debugging when debug info is left in the .o files on Darwin.
This is done by finding the types that are forward declarations that come from a module, and loading that module's debug info in a separate lldb_private::Module, and copying the type over into the current module using a ClangASTImporter object. ClangASTImporter objects are already used to copy types from on clang::ASTContext to another for expressions so the type copying code has been around for a while. A new FindTypes variant was added to SymbolVendor and SymbolFile: size_t SymbolVendor::FindTypes (const std::vector<CompilerContext> &context, bool append, TypeMap& types); size_t SymbolVendor::FindTypes (const std::vector<CompilerContext> &context, bool append, TypeMap& types); The CompilerContext is a way to represent the exact context of a type and pass it through an agnostic API boundary so that we can find that exact context elsewhere in another file. This was required here because we can have a module that has submodules, both of which have a "foo" type. I am not able to add tests for this yet as we currently don't build our C/C++/ObjC binaries with the clang binary that we build. There are some driver issues where it can't find the header files for the C and C++ standard library which makes compiling these tests hard. We can't also guarantee that if we are building with clang that it supporst the exact format of -gmodule debugging that we are trying to test. We have had other versions of clang that had a different implementation of -gmodule debugging that we are no longer supporting, so we can't enable tests if we are building with clang without compiling something and looking at the structure of the DWARF that was generated to ensure that it is the format we can actually use. llvm-svn: 254476
Diffstat (limited to 'lldb/include/lldb/Symbol/SymbolVendor.h')
-rw-r--r--lldb/include/lldb/Symbol/SymbolVendor.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/lldb/include/lldb/Symbol/SymbolVendor.h b/lldb/include/lldb/Symbol/SymbolVendor.h
index e57e8e3d050..c57ac8800c4 100644
--- a/lldb/include/lldb/Symbol/SymbolVendor.h
+++ b/lldb/include/lldb/Symbol/SymbolVendor.h
@@ -128,6 +128,9 @@ public:
size_t max_matches,
TypeMap& types);
+ virtual size_t
+ FindTypes (const std::vector<CompilerContext> &context, bool append, TypeMap& types);
+
virtual CompilerDeclContext
FindNamespace (const SymbolContext& sc,
const ConstString &name,
OpenPOWER on IntegriCloud