summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/SymbolFile
Commit message (Collapse)AuthorAgeFilesLines
...
* [cmake] Remove LLVM_NO_RTTI.Bruce Mitchener2015-09-032-4/+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
* 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-247-378/+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-186-308/+33
| | | | | | 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-116-42/+42
| | | | | | 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
* Fix issues with separate symbolfile handlingTamas Berghammer2015-07-301-0/+1
| | | | | | Differential revision: http://reviews.llvm.org/D11595 llvm-svn: 243637
* 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-293-3/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-084-11/+16
| | | | | | 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-253-9/+9
| | | | | | | | | | | | | | | 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
OpenPOWER on IntegriCloud