summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/SymbolFile/DWARF
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix an API missues in ParseTypeFromDWARFTamas Berghammer2015-10-261-1/+1
| | | | | | | The arguments for ClangASTContext::CreateMemberPointerType was passed in in the wrong order. llvm-svn: 251319
* Re-use prologue parsing code that was already written instead of having two ↵Greg Clayton2015-10-262-66/+37
| | | | | | | | copies of code that parse line table prologues. Also since we always read in the DWARF data or mmap it, we don't need to make a copy of the strings for the directories and file names, we can just store "cosnt char *" values. Every place that uses the prologues use them temporarily and then throw them away so no one is expecting the directory and filename strings to live longer than the parse functions. llvm-svn: 251310
* Fix a fission expression evaluation issueTamas Berghammer2015-10-263-1/+10
| | | | | | | This fix should eliminate the duplicate definition errors when debug info is available in multiple dwo symbol file for the same type. llvm-svn: 251282
* Re-commit "Make dwarf parsing multi-threaded"Tamas Berghammer2015-10-233-22/+78
| | | | | | | | | | | | | | | Re-commit the change after fixing a lot of race condition in LLDB exposed by this change Loading the debug info from a large application is the slowest task LLDB do. This CL makes most of the dwarf parsing code multi-threaded. As a result the speed of "attach; backtrace; exit;" when the inferior is an LLDB with full debug info increased by a factor of 2. Differential revision: http://reviews.llvm.org/D13662 llvm-svn: 251106
* Make SymbolFileDWARF::GetCachedSectionData thread safeTamas Berghammer2015-10-224-151/+94
| | | | | | Differential revision: http://reviews.llvm.org/D13942 llvm-svn: 251007
* Revert "Make dwarf parsing multi-threaded"Tamas Berghammer2015-10-203-71/+23
| | | | | | | | | Revert it bacuse it introduces several race condition detected by the build bots. This reverts commit 5107a5ebdb7c4571a30a7098b40bf8098b678447. llvm-svn: 250832
* Make dwarf parsing multi-threadedTamas Berghammer2015-10-203-23/+71
| | | | | | | | | | | | Loading the debug info from a large application is the slowest task LLDB do. This CL makes most of the dwarf parsing code multi-threaded. As a result the speed of "attach; backtrace; exit;" when the inferior is an LLDB with full debug info increased by a factor of 2 (on my machine). Differential revision: http://reviews.llvm.org/D13662 llvm-svn: 250821
* Fix Clang-tidy modernize-use-override warnings in some files in ↵Eugene Zelenko2015-10-195-90/+63
| | | | | | | | source/Plugins; other minor fixes. Differential Revision: http://reviews.llvm.org/D13840 llvm-svn: 250721
* Silence -Wqual-cast warnings from GCC 5.2Saleem Abdulrasool2015-10-181-1/+1
| | | | | | | | There were a number of const qualifiers being cast away which caused warnings. This cluttered the output hiding real errors. Silence them by explicit casting. NFC. llvm-svn: 250662
* Silence some -Wunused-but-set-variable with gcc 5.2.0Saleem Abdulrasool2015-10-181-4/+2
| | | | | | Cleanup some unused variables. NFC. llvm-svn: 250661
* Fix broken assert in DWARFDIE.cpp on OS XTodd Fiala2015-10-151-1/+1
| | | | | | | See: http://reviews.llvm.org/D13777 llvm-svn: 250426
* Fix a crash, an UB and add some assert to dwo symbol file handlingTamas Berghammer2015-10-094-0/+15
| | | | llvm-svn: 249827
* Testcase and fix for bug 24074Ravitheja Addepally2015-10-084-4/+17
| | | | | | | | | | | | | | | | | | | | Summary: In bug 24074, the type information is not shown correctly. This commit includes the following - -> Changes for displaying correct type based on current lexical scope for the command "image lookup -t" -> The corresponding testcase. -> This patch was reverted due to segfaults in FreeBSD and Mac, I fixed the problems for both now. Reviewers: emaste, granata.enrico, jingham, clayborg Differential Revision: http://reviews.llvm.org/D13290 llvm-svn: 249673
* [DWARFASTParserClang] Strengthen incomplete type handling.Siva Chandra2015-10-071-47/+84
| | | | | | | | | | | | Summary: This change fixes pr24916. As associated test has been added. Reviewers: clayborg Subscribers: zturner, lldb-commits Differential Revision: http://reviews.llvm.org/D13224 llvm-svn: 249629
* Fix the TestCppNsImport test case for DWARF. It was failing for DWARF in .o ↵Greg Clayton2015-10-072-0/+11
| | | | | | | | | | | files because SymbolFileDWARFDebugMap didn't implement the following function: void ParseDeclsForContext (lldb_private::CompilerDeclContext decl_ctx) override; Now it does and the test works. llvm-svn: 249626
* Remove instance reference of static member function.Zachary Turner2015-10-021-9/+8
| | | | llvm-svn: 249207
* Moved more Clang-specific parts of the expression parser into the Clang plugin.Sean Callanan2015-09-251-1/+1
| | | | | | | | | There are still a bunch of dependencies on the plug-in, but this helps to identify them. There are also a few more bits we need to move (and abstract, for example the ClangPersistentVariables). llvm-svn: 248612
* Rename clang_type -> compiler_type for variables.Bruce Mitchener2015-09-248-55/+55
| | | | | | | | | | Reviewers: clayborg Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D13102 llvm-svn: 248461
* Revert 248366 "Testcase and fix for bug 24074"Enrico Granata2015-09-234-17/+4
| | | | | | This commit introduced regressions in several test cases on FreeBSD and Mac OS X llvm-svn: 248421
* DWARFASTParserClang::CompleteTypeFromDWARF: Handle incomplete baseclass or childSiva Chandra2015-09-232-34/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: With this change DWARFASTParserClang::CompleteTypeFromDWARF returns false if DWARFASTParserClang::ParseChildMembers returns false. Similarly, it returns false if any base class is of an incomplete type. This helps in cases like these: class Foo { public: std::string str; }; ... Foo f; If a file with the above code is compiled with a modern clang but without the -fno-limit-debug-info (or similar) option, then the DWARF has only a forward declration for std::string. In which case, the type for "class Foo" cannot be completed. If LLDB does not detect that a child member has incomplete type, then it wrongly conveys to clang (the LLDB compiler) that "class Foo" is complete, and consequently crashes due to an assertion failure in clang when running commands like "p f" or "frame var f". Reviewers: clayborg Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D13066 llvm-svn: 248401
* Testcase and fix for bug 24074Ravitheja Addepally2015-09-234-4/+17
| | | | | | | | | | | | | | | | Summary: In bug 24074, the type information is not shown correctly. This commit includes the following - -> Changes for displaying correct type based on current lexical scope for the command "image lookup -t" -> The corresponding testcase. Reviewers: jingham, ovyalov, spyffe, richard.mitton, clayborg Differential Revision: http://reviews.llvm.org/D12404 llvm-svn: 248366
* Rename clang_type_t to opaque_compiler_type_t.Bruce Mitchener2015-09-221-2/+2
| | | | | | | | | | | | | | Summary: This is no longer related to Clang and is just an opaque pointer to data for a compiler type. Reviewers: clayborg Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D13039 llvm-svn: 248288
* [LLDB][MIPS] microMIPS breakpoints, disassembly and compressed addressesJaydeep Patil2015-09-221-1/+24
| | | | | | | | | | | | SUMMARY: This patch detects microMIPS symbols, sets breakpoints using un-compressed address and display disassembly in mixed mode for microMIPS applications (running on bare-iron targets). Reviewers: clayborg Subscribers: nitesh.jain, mohit.bhakkad, sagar, bhushan and lldb-commits Differential Revision: http://reviews.llvm.org/D12079 llvm-svn: 248248
* Further reduction of Clang-related header inclusion.Bruce Mitchener2015-09-214-2/+5
| | | | | | | | | | Reviewers: clayborg Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D13018 llvm-svn: 248176
* Reduce inclusion of clang headers.Bruce Mitchener2015-09-183-18/+0
| | | | | | | | | | | | | | Summary: With the recent changes to separate clang from the core structures of LLDB, many inclusions of clang headers can be removed. Reviewers: clayborg Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D12954 llvm-svn: 248004
* TypeSystem is now a plugin interface and removed any "ClangASTContext ↵Greg Clayton2015-09-174-23/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | &Class::GetClangASTContext()" functions. This cleans up type systems to be more pluggable. Prior to this we had issues: - Module, SymbolFile, and many others has "ClangASTContext &GetClangASTContext()" functions. All have been switched over to use "TypeSystem *GetTypeSystemForLanguage()" - Cleaned up any places that were using the GetClangASTContext() functions to use TypeSystem - Cleaned up Module so that it no longer has dedicated type system member variables: lldb::ClangASTContextUP m_ast; ///< The Clang AST context for this module. lldb::GoASTContextUP m_go_ast; ///< The Go AST context for this module. Now we have a type system map: typedef std::map<lldb::LanguageType, lldb::TypeSystemSP> TypeSystemMap; TypeSystemMap m_type_system_map; ///< A map of any type systems associated with this module - Many places in code were using ClangASTContext static functions to place with CompilerType objects and add modifiers (const, volatile, restrict) and to make typedefs, L and R value references and more. These have been made into CompilerType functions that are abstract: class CompilerType { ... //---------------------------------------------------------------------- // Return a new CompilerType that is a L value reference to this type if // this type is valid and the type system supports L value references, // else return an invalid type. //---------------------------------------------------------------------- CompilerType GetLValueReferenceType () const; //---------------------------------------------------------------------- // Return a new CompilerType that is a R value reference to this type if // this type is valid and the type system supports R value references, // else return an invalid type. //---------------------------------------------------------------------- CompilerType GetRValueReferenceType () const; //---------------------------------------------------------------------- // Return a new CompilerType adds a const modifier to this type if // this type is valid and the type system supports const modifiers, // else return an invalid type. //---------------------------------------------------------------------- CompilerType AddConstModifier () const; //---------------------------------------------------------------------- // Return a new CompilerType adds a volatile modifier to this type if // this type is valid and the type system supports volatile modifiers, // else return an invalid type. //---------------------------------------------------------------------- CompilerType AddVolatileModifier () const; //---------------------------------------------------------------------- // Return a new CompilerType adds a restrict modifier to this type if // this type is valid and the type system supports restrict modifiers, // else return an invalid type. //---------------------------------------------------------------------- CompilerType AddRestrictModifier () const; //---------------------------------------------------------------------- // Create a typedef to this type using "name" as the name of the typedef // this type is valid and the type system supports typedefs, else return // an invalid type. //---------------------------------------------------------------------- CompilerType CreateTypedef (const char *name, const CompilerDeclContext &decl_ctx) const; }; Other changes include: - Removed "CompilerType TypeSystem::GetIntTypeFromBitSize(...)" and CompilerType TypeSystem::GetFloatTypeFromBitSize(...) and replaced it with "CompilerType TypeSystem::GetBuiltinTypeForEncodingAndBitSize(lldb::Encoding encoding, size_t bit_size);" - Fixed code in Type.h to not request the full type for a type for no good reason, just request the forward type and let the type expand as needed llvm-svn: 247953
* Fix caching for clang::Decl in DWARFASTParserClangPaul Herman2015-09-171-4/+22
| | | | | | | | | | Reviewers: sivachandra, chaoren, clayborg, tberghammer Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D12942 llvm-svn: 247923
* Add using directives to the clang::DeclContext and fix decls for variables ↵Paul Herman2015-09-166-4/+50
| | | | | | | | | | | | | | inside namespaces Summary: Supports the parsing of the "using namespace XXX" and "using XXX::XXX" directives. Added ambiguity errors when it two decls with the same name are encountered (see comments in TestCppNsImport). Fixes using directives being duplicated for anonymous namespaces. Fixes GetDeclForUID for specification DIEs. Reviewers: sivachandra, chaoren, clayborg Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D12897 llvm-svn: 247836
* Add newline at end of file to avoid compiler warning.Greg Clayton2015-09-161-1/+1
| | | | llvm-svn: 247823
* Add support for the DWARFLocationList used by split-dwarfTamas Berghammer2015-09-1611-339/+32
| | | | | | | | | Split-dwarf uses a different header format to specify the address range for the elements of the location lists. Differential revision: http://reviews.llvm.org/D12880 llvm-svn: 247789
* Search variables based on clang::DeclContext and clang::Decl treePaul Herman2015-09-156-10/+197
| | | | | | | | | | | | Summary: SymbolFileDWARF now creates VarDecl and BlockDecl and adds them to the Decl tree. Then, in ClangExpressionDeclMap it uses the Decl tree to search for a variable. This fixes lots of variable scoping problems. Reviewers: sivachandra, chaoren, spyffe, clayborg Subscribers: tberghammer, jingham, lldb-commits Differential Revision: http://reviews.llvm.org/D12658 llvm-svn: 247746
* Add support for DW_OP_GNU_const_index to dwarf expressionTamas Berghammer2015-09-151-0/+1
| | | | | | | | DW_OP_GNU_const_index is a new opcode used when split dwarf is enabled Differential revision: http://reviews.llvm.org/D12849 llvm-svn: 247672
* Fix several issues arount dwo symbol file handlingTamas Berghammer2015-09-154-8/+30
| | | | | | Differential revision: http://reviews.llvm.org/D12804 llvm-svn: 247671
* Darwin has a debug info format that stores module types in stand alone files ↵Greg Clayton2015-09-141-2/+5
| | | | | | and it uses some of the DWO attributes. Don't assert in SymbolFileDWARFDwo, just return null so everything works. llvm-svn: 247638
* Remove include that isn't needed.Greg Clayton2015-09-141-1/+0
| | | | llvm-svn: 247630
* Add a TypeSystem for GoRyan Brown2015-09-145-2/+907
| | | | | | | | Add GoASTContext and DWARFASTParserGo to support go. Differential Revision: http://reviews.llvm.org/D12585 llvm-svn: 247629
* Remove a debugging printf that got left in SymbolFileDWARFDebugMap.Jim Ingham2015-09-141-1/+0
| | | | llvm-svn: 247589
* Fix a possible SEGV in SymbolFileDWARFTamas Berghammer2015-09-141-4/+5
| | | | | | | | The iterator pointing to an element of a dense map was used after the element from was removed from the map what isn't guaranteed to be valid at that time. llvm-svn: 247571
* Add basic fission support to SymbolFileDWARFTamas Berghammer2015-09-0921-512/+989
| | | | | | | | | | | | | * Create new dwo symbol file class * Add handling for .dwo sections * Change indexes in SymbolFileDWARF to store compile unit offset next to DIE offset * Propagate queries from dwarf compile unit to the dwo compile unit where applicable Differential revision: http://reviews.llvm.org/D12291 llvm-svn: 247132
* Code cleanup in preparation of adding split dwarf supportTamas Berghammer2015-09-098-859/+865
| | | | | | | | | | | | * Remove some unused code * Remove usage of DWARFDebugInfoEntry::Attributes where usage isn't reasonable * Cleanup DWARFMappedHash with separating it to header and implementation file and fixing the visibility of the functions Differential revision: http://reviews.llvm.org/D12374 llvm-svn: 247131
* Use LLVM casting for TypeSystem so you can cast it to subclasses.Greg Clayton2015-09-081-3/+2
| | | | | | | | | | | | | | This will keep our code cleaner and it removes the need for intrusive additions to TypeSystem like: class TypeSystem { virtual ClangASTContext * AsClangASTContext() = 0; } As you can now just use the llvm::dyn_cast and other casts. llvm-svn: 247041
* Check for null compile unit so we don't crash.Greg Clayton2015-09-041-0/+3
| | | | llvm-svn: 246887
* [cmake] Remove LLVM_NO_RTTI.Bruce Mitchener2015-09-031-2/+0
| | | | | | | | | | | | | | Summary: This doesn't exist in other LLVM projects any longer and doesn't do anything. Reviewers: chaoren, labath Subscribers: emaste, tberghammer, lldb-commits, danalbert Differential Revision: http://reviews.llvm.org/D12586 llvm-svn: 246749
* Move more functionality from the LanguageRuntimes to the Languages.Jim Ingham2015-09-023-12/+15
| | | | llvm-svn: 246616
* Move things from the LanguageRuntime that obviously belong in the new ↵Jim Ingham2015-09-022-2/+5
| | | | | | Language plugin instead. llvm-svn: 246611
* Made a new abstract class named "DWARFASTParser" which lives in ↵Greg Clayton2015-08-289-33/+3912
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "source/Plugins/SymbolFile/DWARF": class DWARFASTParser { public: virtual ~DWARFASTParser() {} virtual lldb::TypeSP ParseTypeFromDWARF (const lldb_private::SymbolContext& sc, const DWARFDIE &die, lldb_private::Log *log, bool *type_is_new_ptr) = 0; virtual lldb_private::Function * ParseFunctionFromDWARF (const lldb_private::SymbolContext& sc, const DWARFDIE &die) = 0; virtual bool CompleteTypeFromDWARF (const DWARFDIE &die, lldb_private::Type *type, lldb_private::CompilerType &clang_type) = 0; virtual lldb_private::CompilerDeclContext GetDeclContextForUIDFromDWARF (const DWARFDIE &die) = 0; virtual lldb_private::CompilerDeclContext GetDeclContextContainingUIDFromDWARF (const DWARFDIE &die) = 0; }; We have one subclass named DWARFASTParserClang that implements all of the clang specific AST type parsing. This keeps all DWARF parsing in the DWARF plug-in. Moved all of the DWARF parsing code that was in ClangASTContext over into DWARFASTParserClang. lldb_private::TypeSystem classes no longer have any DWARF parsing functions in them, but they can hand out a DWARFASTParser: virtual DWARFASTParser * GetDWARFParser () { return nullptr; } This keeps things clean and makes for easy merging when we have different AST's for different languages. llvm-svn: 246242
* More cleanup to make sure no one plays with DWARFDebugInfoEntry. Clients ↵Greg Clayton2015-08-2712-452/+74
| | | | | | outside of DWARFDebugInfoEntry of DWARFCompileUnit should use DWARFDIE only. llvm-svn: 246172
* Major DWARF cleanup.Greg Clayton2015-08-2625-1395/+1651
| | | | | | | | | | Added a new class called DWARFDIE that contains a DWARFCompileUnit and DWARFDebugInfoEntry so that these items always stay together. There were many places where we just handed out DWARFDebugInfoEntry pointers and then use them with a compile unit that may or may not be the correct one. Clients outside of DWARFCompileUnit and DWARFDebugInfoEntry should all be dealing with DWARFDIE instances instead of playing with DWARFCompileUnit/DWARFDebugInfoEntry pairs manually. This paves to the way for some modifications that are coming for DWO. llvm-svn: 246100
* http://reviews.llvm.org/D12380: remove DWARFCompileUnit printf spam.Todd Fiala2015-08-261-1/+0
| | | | llvm-svn: 246091
* Handle DW_OP_GNU_addr_index in DWARF expressionsTamas Berghammer2015-08-252-1/+3
| | | | | | Differential revision: http://reviews.llvm.org/D12290 llvm-svn: 245932
OpenPOWER on IntegriCloud