summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/SymbolFile/DWARF
Commit message (Collapse)AuthorAgeFilesLines
...
* Add support for DW_FORM_GNU_[addr,str]_indexTamas Berghammer2015-08-259-90/+150
| | | | | | | | | These are 2 new value currently in experimental status used when split debug info is enabled. Differential revision: http://reviews.llvm.org/D12238 llvm-svn: 245931
* Fix buffer overflow for fixed_form_sizesTamas Berghammer2015-08-257-25/+67
| | | | | | | | | | The array is indexed by the value in the DW_FORM filed what can be bigger then the size of the array. This CL add bound checking to avoid buffer overflows Differential revision: http://reviews.llvm.org/D12239 llvm-svn: 245930
* Final bit of type system cleanup that abstracts declaration contexts into ↵Greg Clayton2015-08-245-292/+446
| | | | | | | | | | | | | | | | | | | | lldb_private::CompilerDeclContext and renames ClangType to CompilerType in many accessors and functions. Create a new "lldb_private::CompilerDeclContext" class that will replace all direct uses of "clang::DeclContext" when used in compiler agnostic code, yet still allow for conversion to clang::DeclContext subclasses by clang specific code. This completes the abstraction of type parsing by removing all "clang::" references from the SymbolFileDWARF. The new "lldb_private::CompilerDeclContext" class abstracts decl contexts found in compiler type systems so they can be used in internal API calls. The TypeSystem is required to support CompilerDeclContexts with new pure virtual functions that start with "DeclContext" in the member function names. Converted all code that used lldb_private::ClangNamespaceDecl over to use the new CompilerDeclContext class and removed the ClangNamespaceDecl.cpp and ClangNamespaceDecl.h files. Removed direct use of clang APIs from SBType and now use the abstract type systems to correctly explore types. Bulk renames for things that used to return a ClangASTType which is now CompilerType: "Type::GetClangFullType()" to "Type::GetFullCompilerType()" "Type::GetClangLayoutType()" to "Type::GetLayoutCompilerType()" "Type::GetClangForwardType()" to "Type::GetForwardCompilerType()" "Value::GetClangType()" to "Value::GetCompilerType()" "Value::SetClangType (const CompilerType &)" to "Value::SetCompilerType (const CompilerType &)" "ValueObject::GetClangType ()" to "ValueObject::GetCompilerType()" many more renames that are similar. llvm-svn: 245905
* Fix BuildAddressRangeTable function when no debug arranges presentTamas Berghammer2015-08-211-2/+4
| | | | llvm-svn: 245696
* Fix resolution conflict between global and class static variables in C++Paul Herman2015-08-181-2/+5
| | | | llvm-svn: 245381
* More abstraction to get almost all clang specific DWARF parsing code into ↵Greg Clayton2015-08-184-306/+31
| | | | | | ClangASTContext. llvm-svn: 245376
* Make sure to save the types we parse in our SymbolFile's type list so they ↵Greg Clayton2015-08-171-3/+11
| | | | | | don't get deleted. llvm-svn: 245237
* Fix Android build.Oleksiy Vyalov2015-08-141-1/+1
| | | | llvm-svn: 245129
* Unbreak the windows and linux buildbots.Greg Clayton2015-08-141-3/+3
| | | | llvm-svn: 245122
* Don't crash if we don't have a type system for a language.Greg Clayton2015-08-141-1/+1
| | | | llvm-svn: 245121
* Move all clang type system DWARF type parsing into ClangASTContext.cpp.Greg Clayton2015-08-145-3911/+239
| | | | | | Another step towards isolating all language/AST specific code into the files to further abstract specific implementations of parsing types for a given language. llvm-svn: 245090
* Remove printf most likely left from some debugging sectionTamas Berghammer2015-08-121-1/+0
| | | | llvm-svn: 244759
* ClangASTType is now CompilerType.Greg Clayton2015-08-114-40/+40
| | | | | | This is more preparation for multiple different kinds of types from different compilers (clang, Pascal, Go, RenderScript, Swift, etc). llvm-svn: 244689
* First step in getting LLDB ready to support multiple different type systems.Greg Clayton2015-08-111-77/+105
| | | | | | | | This is the work done by Ryan Brown from http://reviews.llvm.org/D8712 that makes a TypeSystem class and abstracts types to be able to use a type system. All tests pass on MacOSX and passed on linux the last time this was submitted. llvm-svn: 244679
* Move the computation of whether a DWARF compile unitJason Molenda2015-07-313-6/+32
| | | | | | | | is optimized into DWARFCompileUnit, where it should have been. Next I'll need to call this from another section of code for DWARF-in-.o-file behavior correctness. llvm-svn: 243736
* Make DWARF at_comp_dir symbolic links configurable via ↵Oleksiy Vyalov2015-07-292-9/+78
| | | | | | | | plugin.symbol-file.dwarf.comp-dir-symlink-paths setting. http://reviews.llvm.org/D11586 llvm-svn: 243580
* First part of an attempt to indicate to the user when they are Jason Molenda2015-07-292-2/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | debugging optimized code. Adds new methods on Function/SBFunction to query whether a given function is optimized. Adds a new function.is-optimized format entity and changes the default frame-format to append "[opt]" if the function was built with optimization. The only indication that a binary was built with optimization that we have right now is the presence of the DW_AT_APPLE_optimized attribute (DW_FORM_flag value 1) in the DW_TAG_compile_unit. The absence of this flag may mean that the compile_unit was not compiled with optimization, or it may mean that the producer does not generate this attribute. Currently this only works for dSYM debugging. When we create the CompileUnit with dwarf-in-.o-file debugging we don't have the attribute value yet so it's not set. I need to find the flag value when we do start to read the .o file DWARF and set the CompileUnit's status at that point - but haven't done it yet. I'm also going to add a mechanism for issuing warnings to users such that they're only issued once in a debug session and there is away for users to suppress these warnings altogether via .lldbinit file settings. But I want to get this changeset committed now that it's at a useful state. <rdar://problem/19281172> llvm-svn: 243508
* If a path contains a '/' before a ':', then the ':' is not a hostname ↵Enrico Granata2015-07-271-3/+9
| | | | | | separator, but just a part of the path (e.g. /tmp/fi:lename vs. pro:/tmp/fi:lename) llvm-svn: 243330
* Fix warnings found by -Wextra-semiPavel Labath2015-07-221-3/+2
| | | | | | patch by Eugene Zelenko. llvm-svn: 242875
* Fix typos.Bruce Mitchener2015-07-221-2/+2
| | | | | | | | | | | | Summary: Fix a bunch of typos. Reviewers: clayborg Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D11386 llvm-svn: 242856
* Improve the performance of DWARFDebugInfo::GetCompileUnitContainingDIE() by ↵Greg Clayton2015-07-211-22/+41
| | | | | | | | using a binary search. Also switched DWARFDebugInfo::GetCompileUnit() over to using the same kind of binary search instead of using bsearch(). llvm-svn: 242852
* Resolve DW_AT_comp_dir path if it contains a symlinkOleksiy Vyalov2015-07-211-8/+40
| | | | | | http://reviews.llvm.org/D11357 llvm-svn: 242757
* Don't crash if we are unable to get the member type.Greg Clayton2015-07-131-1/+1
| | | | | | <rdar://problem/21624447> llvm-svn: 242076
* Make many mangled functions that might demangle a name be allowed to specify ↵Greg Clayton2015-07-083-10/+15
| | | | | | a language to use in order to soon support Pascal and Java demangling. Dawn Perchik will take care of making this so. llvm-svn: 241751
* Tolerate DWARF compile unit without filename.David Srbecky2015-07-081-14/+28
| | | | | | | | | | | Summary: The DW_AT_name attribute of compile unit is optional. If it is missing, try to get filename from the debug_line section. This allows the compile unit to be useful without the filename. Differential Revision: http://reviews.llvm.org/D11003 llvm-svn: 241679
* Resubmitting 240466 after fixing the linux test suite failures.Greg Clayton2015-06-252-8/+8
| | | | | | | | | | | | | | | A few extras were fixed - Symbol::GetAddress() now returns an Address object, not a reference. There were places where people were accessing the address of a symbol when the symbol's value wasn't an address symbol. On MacOSX, undefined symbols have a value zero and some places where using the symbol's address and getting an absolute address of zero (since an Address object with no section and an m_offset whose value isn't LLDB_INVALID_ADDRESS is considered an absolute address). So fixing this required some changes to make sure people were getting what they expected. - Since some places want to access the address as a reference, I added a few new functions to symbol: Address &Symbol::GetAddressRef(); const Address &Symbol::GetAddressRef() const; Linux test suite passes just fine now. <rdar://problem/21494354> llvm-svn: 240702
* Fix a variety of typos.Bruce Mitchener2015-06-181-1/+1
| | | | | | No functional change. llvm-svn: 239995
* Fix enum LanguageType values and language string table lookups.Dawn Perchik2015-06-173-8/+23
| | | | | | | | | | | | | | | Summary: * Fix enum LanguageType values so that they can be used as indexes into array language_names and g_languages as assumed by LanguageRuntime::GetNameForLanguageType, Language::SetLanguageFromCString and Language::AsCString. * Add DWARFCompileUnit::LanguageTypeFromDWARF to convert from DWARF DW_LANG_* values to enum LanguageType values. Reviewed By: clayborg, abidh Differential Revision: http://reviews.llvm.org/D10484 llvm-svn: 239963
* Rename `FileSpec::IsRelativeToCurrentWorkingDirectory` to `IsRelative`.Chaoren Lin2015-06-092-3/+3
| | | | | | | | | | | | | | | | | Summary: `IsRelativeToCurrentWorkingDirectory` was misleading, because relative paths are sometimes appended to other directories, not just the cwd. Plus, the new name is shorter. Also added `IsAbsolute` for completeness. Reviewers: clayborg, ovyalov Reviewed By: ovyalov Subscribers: tberghammer, lldb-commits Differential Revision: http://reviews.llvm.org/D10262 llvm-svn: 239419
* Revert "Introduce a TypeSystem interface to support adding non-clang languages."Pavel Labath2015-06-081-105/+77
| | | | | | This seems to break expression evaluation on the linux build. llvm-svn: 239366
* Introduce a TypeSystem interface to support adding non-clang languages.Pavel Labath2015-06-081-77/+105
| | | | | | | | | | | | | Reviewers: clayborg Reviewed By: clayborg Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D8712 Original Author: Ryan Brown <ribrdb@google.com> llvm-svn: 239360
* Delegate path operations to FileSpec.Chaoren Lin2015-06-052-75/+30
| | | | | | | | | | | | | | | | | Summary: - Added PrependPathComponent utility functions to FileSpec. - Delegate path operations in ParseCompileUnit to FileSpec. - Delegate path operations in ParseSupportFiles to FileSpec. Reviewers: clayborg, vharron, ovyalov Reviewed By: ovyalov Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D10253 llvm-svn: 239127
* Parse function name from DWARF DW_AT_abstract_originTamas Berghammer2015-05-271-9/+13
| | | | | | | | | | | | | | | A DW_TAG_subprogram entry can contain a reference to a DW_AT_abstract_origin entry instead of duplicating the information from it (e.g.: name) when the same function is inlined in some case and not inlined in other cases. This CL fixes name parsing for the case when the DW_TAG_subprogram for the non inlined version contains just a reference to the DW_AT_abstract_origin entry instead of the full information. Differential revision: http://reviews.llvm.org/D10034 llvm-svn: 238307
* Quiet compiler warnings about virtual and override not being consistent.Greg Clayton2015-05-251-38/+38
| | | | llvm-svn: 238128
* Don't crash if we have bad debug info that has a DW_TAG_inheritance with a ↵Greg Clayton2015-05-151-2/+9
| | | | | | | | bad DW_AT_type reference. Emit an error with instructions to file a bug. <rdar://problem/20944860> llvm-svn: 237485
* Don't crash if a function has no name by calling 'strcmp(name, "main")'.Greg Clayton2015-05-151-1/+1
| | | | | | <rdar://problem/20925061> llvm-svn: 237484
* Only check _ZN function prefix in Linux and FreeBSD targets in SymbolFileDWARFRobert Flack2015-05-151-5/+15
| | | | | | | | | | | | | | | | | | | | | | In http://reviews.llvm.org/D9754 I enabled the mangled symbol name lookup workaround used to find global and anonymous namespace symbols in linux binaries for all platforms, however we should still only check for these symbols when processing Linux or FreeBSD binaries where they are relevant. This patch makes this change. Test Plan: The tests from the original revision still pass: TestCallCPPFunction.py TestCallStopAndContinue.py TestExprs.py TestExprsChar.py TestNamespace.py TestOverloadedFunctions.py TestRvalueReferences.py TestThreadExit.py Differential Revision: http://reviews.llvm.org/D9782 llvm-svn: 237467
* Enable workaround for finding functions in global namespace on linux binaries onRobert Flack2015-05-131-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | all hosts. We require a workaround to be able to locate global and anonymous namespace functions in the dwarf symbols on linux binaries. This patch enables this code on all platforms so that we can still find these symbols when debugging from a different host platform. Test Plan: The following tests begin passing when running with a mac host to linux client: TestCallCPPFunction.py TestCallStopAndContinue.py TestExprs.py TestExprsChar.py TestNamespace.py TestOverloadedFunctions.py TestRvalueReferences.py TestThreadExit.py Differential Revision: http://reviews.llvm.org/D9754 llvm-svn: 237270
* Fix a few compile warningsIlia K2015-05-131-1/+1
| | | | llvm-svn: 237238
* Fixed a ton of gcc compile warningsVince Harron2015-05-132-2/+2
| | | | | | | | | | Removed some unused variables, added some consts, changed some casts to const_cast. I don't think any of these changes are very controversial. Differential Revision: http://reviews.llvm.org/D9674 llvm-svn: 237218
* Placate clang. lldb can build on FreeBSD with -Werror again.Davide Italiano2015-04-211-1/+1
| | | | llvm-svn: 235387
* This patch implements several improvements to theSean Callanan2015-04-205-14/+131
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | module-loading support for the expression parser. - It adds support for auto-loading modules referred to by a compile unit. These references are currently in the form of empty translation units. This functionality is gated by the setting target.auto-import-clang-modules (boolean) = false - It improves and corrects support for loading macros from modules, currently by textually pasting all #defines into the user's expression. The improvements center around including only those modules that are relevant to the current context - hand-loaded modules and the modules that are imported from the current compile unit. - It adds an "opt-in" mechanism for all of this functionality. Modules have to be explicitly imported (via @import) or auto-loaded (by enabling the above setting) to enable any of this functionality. It also adds support to the compile unit and symbol file code to deal with empty translation units that indicate module imports, and plumbs this through to the CompileUnit interface. Finally, it makes the following changes to the test suite: - It adds a testcase that verifies that modules are automatically loaded when the appropriate setting is enabled (lang/objc/modules-auto-import); and - It modifies lanb/objc/modules-incomplete to test the case where a module #undefs something that is #defined in another module. <rdar://problem/20299554> llvm-svn: 235313
* Fix -Wformat-pedantic warningsDavid Blaikie2015-04-081-1/+1
| | | | llvm-svn: 234429
* Fixed a bug where we didn't return a value from aSean Callanan2015-04-011-0/+1
| | | | | | | | lambda in SymbolFileDWARFDebugMap. <rdar://problem/20261196> llvm-svn: 233858
* Fixed the way SymbolFileDWARFDebugMap iterates across objectSean Callanan2015-04-012-77/+80
| | | | | | | | | | | files. Before we'd give up if we found a .o that doesn't have DWARF associated with it; now we iterate through them all. Also made this iteration a higher-order function so that people don't have to remember to do this right. <rdar://problem/20261196> llvm-svn: 233838
* [DWARF] Generate qualified names of functions if linkage names are missing.Siva Chandra2015-03-271-1/+48
| | | | | | | | | | | | | | | | | | | | | | | | Summary: This is similar to the change introduced for variable DIEs in r233098. If the linkage names of functions are missing in the DWARF, then their fully qualified names (similar to the name that would be got by demangling their linkage name) is generated using the decl context. This change fixes TestNamespace when the test case is compiled with GCC, hence it is enabled for GCC. The test and the test case are also enhanced to cover variadic functions. Test Plan: dotest.py -C <clang|gcc> -p TestNamespace Reviewers: clayborg Reviewed By: clayborg Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D8623 llvm-svn: 233336
* [DWARF] Remove an unused arg to SymbolFileDWARF::ParseChildParameters.Siva Chandra2015-03-252-3/+0
| | | | | | | | | | | | Test Plan: Build LLDB Reviewers: clayborg Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D8621 llvm-svn: 233230
* Fix error introduced by changing function signatures.Zachary Turner2015-03-244-51/+59
| | | | | | | | | | | | | | | | | Since ClangASTSource::layoutRecordType() was overriding a virtual function in the base, this was inadvertently causing a new method to be introduced rather than an override. To fix this all method signatures are changed back to taking DenseMaps, and the `override` keyword is added to make sure this type of error doesn't happen again. To keep the original fix intact, which is that fields and bases must be added in offset order, the ImportOffsetMap() function now copies the DenseMap into a vector and then sorts the vector on the value type (e.g. the offset) before iterating over the sorted vector and inserting the items. llvm-svn: 233099
* [DWARF] If linkages names are missing, use decl context to get qualified names.Siva Chandra2015-03-244-0/+46
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: This commit adds this alternate route only when parsing variable dies corresponding to global or static variables. The motivation for this is that GCC does not emit linkage names for functions and variables declared/defined in anonymous namespaces. Having this alternate route fixes one part of TestNamespace which fails when the test case is compiled with GCC. An alternate route to get fully qualified names of functions whose linkage names are missing will be added with a followup change. With that, the other failing part of TestNamespace will also be fixed. Test Plan: dotest.py -C gcc -p TestNamespace Reviewers: clayborg Reviewed By: clayborg Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D8569 llvm-svn: 233098
* Fix record layout when synthesizing class types.Zachary Turner2015-03-244-89/+66
| | | | | | | | | | | | | | | | | Prior to this patch, we would try to synthesize class types by iterating over a DenseMap of FieldDecls and adding each one to a CXXRecordDecl. Since a DenseMap doesn't provide a deterministic ordering of the elements, this would not add the fields in FieldOffset order, but rather in some random order determined by the memory layout of the DenseMap. This patch fixes the issue by changing DenseMaps to vectors. The ability to lookup a value in the DenseMap was hardly being used, and where it is sufficient to do a vector lookup. Differential Revision: http://reviews.llvm.org/D8512 llvm-svn: 233090
OpenPOWER on IntegriCloud