summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/SymbolFile/DWARF
Commit message (Collapse)AuthorAgeFilesLines
...
* Cleanup/rearrange includes:Virgile Bello2013-08-281-1/+0
| | | | | | | - factorize unistd.h and stdbool.h in lldb-types.h. - Add <functional> and <string> where required. llvm-svn: 189477
* Fixed a case where GCC was emitting a DW_TAG_class_type that has a ↵Greg Clayton2013-08-101-0/+24
| | | | | | DW_AT_declaration set to true, yet the class actually contains a definition for the class in that DIE. llvm-svn: 188124
* Updates the DW_AT_data_member_location handlers for the LLDB DWARF pluginAshok Thirumurthi2013-07-301-3/+22
| | | | | | | | | to handle the case of an integer constant (DWARF 3 and later). - Fixes tests that assert in RecordLayoutBuilder::updateExternalFieldOffset because LLDB was providing an external AST source with missing member offsets. llvm-svn: 187423
* Add explicit braces to quiet the "avoid dangling else" warning from clang.Greg Clayton2013-07-251-0/+2
| | | | llvm-svn: 187137
* Fixes LLDB address ranges with gcc 4.8Ashok Thirumurthi2013-07-252-10/+91
| | | | | | - Modifies the DWARF parser for DWARF 4 specification of hi_pc as an offset-from-low-pc. llvm-svn: 187125
* Fix issues with GCC debugging. GCC emits DWARF in unique ways that LLDB ↵Greg Clayton2013-07-152-0/+18
| | | | | | | | | | | wasn't handling. This fix will fix cases where classes are forward declared using DW_TAG_structure_type and then actually defined using DW_TAG_class_type. LLDB, when it finds a forward declaration, would try and find and parse the complete type. It does this by: 1 - looking up the type basename in the type index 2 - iterate through all matches and look for decl contexts (namespace/class hierarchy) that match The issue was the decl context matching wasn't watching for DW_TAG_class_type/DW_TAG_structure_type mismatches, and it wasn't also getting the name for DIE's that didn't have a DW_AT_name, but did have a DW_AT_specification that had a name. llvm-svn: 186347
* Fix the linux gcc 4.6.3 buildbot failures that happened after my recent ↵Greg Clayton2013-07-121-1/+3
| | | | | | types checkin. llvm-svn: 186195
* Huge change to clean up types.Greg Clayton2013-07-114-192/+160
| | | | | | | | A long time ago we start with clang types that were created by the symbol files and there were many functions in lldb_private::ClangASTContext that helped. Later we create ClangASTType which contains a clang::ASTContext and an opauque QualType, but we didn't switch over to fully using it. There were a lot of places where we would pass around a raw clang_type_t and also pass along a clang::ASTContext separately. This left room for error. This checkin change all type code over to use ClangASTType everywhere and I cleaned up the interfaces quite a bit. Any code that was in ClangASTContext that was type related, was moved over into ClangASTType. All code that used these types was switched over to use all of the new goodness. llvm-svn: 186130
* Cleanup on the unified section list changes. Main changes are:Greg Clayton2013-07-102-38/+44
| | | | | | | | | | | | | | | - ObjectFile::GetSymtab() and ObjectFile::ClearSymtab() no longer takes any flags - Module coordinates with the object files and contain a unified section list so that object file and symbol file can share sections when they need to, yet contain their own sections. Other cleanups: - Fixed Symbol::GetByteSize() to not have the symbol table compute the byte sizes on the fly - Modified the ObjectFileMachO class to compute symbol sizes all at once efficiently - Modified the Symtab class to store a file address lookup table for more efficient lookups - Removed Section::Finalize() and SectionList::Finalize() as they did nothing - Improved performance of the detection of symbol files that have debug maps by excluding stripped files and core files, debug files, object files and stubs - Added the ability to tell if an ObjectFile has been stripped with ObjectFile::IsStripped() (used this for the above performance improvement) llvm-svn: 185990
* Workaround for infinite recursion in InitOSO->GetByteSize->GetSymbolVendor.Jim Ingham2013-07-031-1/+7
| | | | llvm-svn: 185491
* Recognize "decltype(nullptr)" as a valid DW_AT_name for ↵Greg Clayton2013-07-011-1/+2
| | | | | | DW_TAG_unspecified_type tags as meaning the C++11 null pointer type. llvm-svn: 185382
* Split symbol support for ELF and Linux.Michael Sartain2013-07-012-11/+12
| | | | llvm-svn: 185366
* Adding support for extracting line table information from .o files that do ↵Enrico Granata2013-06-273-10/+52
| | | | | | not have aranges llvm-svn: 185055
* Unique types a bit more using the clang type to make sure we don't get ↵Greg Clayton2013-06-201-2/+8
| | | | | | multiple copies of the same type due to the debug info having multiple types that get uniqued. llvm-svn: 184388
* Added the ability to get a list of types from a SBModule or SBCompileUnit. ↵Greg Clayton2013-06-187-4/+279
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sebastien Metrot wanted this, and sent a hollowed out patch. I filled in the blanks and did the low level implementation. The new functions are: //------------------------------------------------------------------ /// Get all types matching \a type_mask from debug info in this /// module. /// /// @param[in] type_mask /// A bitfield that consists of one or more bits logically OR'ed /// together from the lldb::TypeClass enumeration. This allows /// you to request only structure types, or only class, struct /// and union types. Passing in lldb::eTypeClassAny will return /// all types found in the debug information for this module. /// /// @return /// A list of types in this module that match \a type_mask //------------------------------------------------------------------ lldb::SBTypeList SBModule::GetTypes (uint32_t type_mask) //------------------------------------------------------------------ /// Get all types matching \a type_mask from debug info in this /// compile unit. /// /// @param[in] type_mask /// A bitfield that consists of one or more bits logically OR'ed /// together from the lldb::TypeClass enumeration. This allows /// you to request only structure types, or only class, struct /// and union types. Passing in lldb::eTypeClassAny will return /// all types found in the debug information for this compile /// unit. /// /// @return /// A list of types in this compile unit that match \a type_mask //------------------------------------------------------------------ lldb::SBTypeList SBCompileUnit::GetTypes (uint32_t type_mask = lldb::eTypeClassAny); This lets you request types by filling out a mask that contains one or more bits from the lldb::TypeClass enumerations, so you can only get the types you really want. llvm-svn: 184251
* <rdar://problem/13455021>Greg Clayton2013-05-221-0/+2
| | | | | | Another fix to make sure that if we aren't able to extract an object file for any reason, we don't crash when trying to parse the debug map info. llvm-svn: 182441
* <rdar://problem/13893094>Greg Clayton2013-05-171-137/+134
| | | | | | Show variables that were in the debug info but optimized out. Also display a good error message when one of these variables get used in an expression. llvm-svn: 182066
* strncmp was checked incorrectly in the Linux symbol lookup fix.Matt Kopec2013-05-141-2/+2
| | | | llvm-svn: 181818
* Use mangled and demangled names when checking for a function in a namespace ↵Matt Kopec2013-05-101-3/+4
| | | | | | and a function in an anonymous namespace, respectively. llvm-svn: 181645
* <rdar://problem/13854277>Greg Clayton2013-05-106-54/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | <rdar://problem/13594769> Main changes in this patch include: - cleanup plug-in interface and use ConstStrings for plug-in names - Modfiied the BSD Archive plug-in to be able to pick out the correct .o file when .a files contain multiple .o files with the same name by using the timestamp - Modified SymbolFileDWARFDebugMap to properly verify the timestamp on .o files it loads to ensure we don't load updated .o files and cause problems when debugging The plug-in interface changes: Modified the lldb_private::PluginInterface class that all plug-ins inherit from: Changed: virtual const char * GetPluginName() = 0; To: virtual ConstString GetPluginName() = 0; Removed: virtual const char * GetShortPluginName() = 0; - Fixed up all plug-in to adhere to the new interface and to return lldb_private::ConstString values for the plug-in names. - Fixed all plug-ins to return simple names with no prefixes. Some plug-ins had prefixes and most ones didn't, so now they all don't have prefixed names, just simple names like "linux", "gdb-remote", etc. llvm-svn: 181631
* Add temporary fix for calling c++ global/anonymous functions on Linux.Matt Kopec2013-05-101-0/+30
| | | | llvm-svn: 181613
* Don't completely drop methods we don't want to putSean Callanan2013-05-091-2/+4
| | | | | | | | | into a CXXRecordDecl on the ground; rather, put them into the translation unit as functions. <rdar://problem/13834404> llvm-svn: 181560
* Cleanup logging to use the new "std::string FileSpec::GetPath()" function. ↵Greg Clayton2013-04-293-24/+14
| | | | | | | | | | | Also added a similar function for modules: std::string Module::GetSpecificationDescription () const; This returns the module as "/usr/lib/libfoo.dylib" for normal files (calls "std::string FileSpec::GetPath()" on m_file) but it also might include the object name in case the module is for a .o file in a BSD archive ("/usr/lib/libfoo.a(bar.o)"). Cleaned up necessary logging code to use it. llvm-svn: 180717
* <rdar://problem/13298695>Greg Clayton2013-04-231-4/+15
| | | | | | | | | | | | | Fixed LLDB to be able to correctly parse template parameters that have no name and no type. This can be triggered by the following LLVM/Clang code: template <typename T, typename = void> class SmallVectorTemplateCommon : public SmallVectorBase { The “typename = void” was emitting DWARF with an empty DW_AT_name and no DW_AT_type. We now correctly infer that no DW_AT_type means “void” and that an empty name is ok. This means you can now call functions on things that inherit from SmallVectorTemplateCommon. llvm-svn: 180155
* When parsing dwarf, add C functions to the fullname index.Matt Kopec2013-04-221-0/+5
| | | | | | This fixes function type resolution for C functions when requesting full function names. llvm-svn: 180048
* After discussing with Chris Lattner, we require C++11, so lets get rid of ↵Greg Clayton2013-04-186-20/+20
| | | | | | the macros and just use C++11. llvm-svn: 179805
* Since we use C++11, we should switch over to using std::unique_ptr when ↵Greg Clayton2013-04-184-18/+17
| | | | | | | | C++11 is being used. To do this, we follow what we have done for shared pointers and we define a STD_UNIQUE_PTR macro that can be used and it will "do the right thing". Due to some API differences in std::unique_ptr and due to the fact that we need to be able to compile without C++11, we can't use move semantics so some code needed to change so that it can compile with either C++. Anyone wanting to use a unique_ptr or auto_ptr should now use the "STD_UNIQUE_PTR(TYPE)" macro. llvm-svn: 179779
* Static variables inside classes were not being added to the RecordDecl, now ↵Greg Clayton2013-04-111-0/+11
| | | | | | they are. This gets us closer to being able to display static variables in classes. llvm-svn: 179296
* Don't erroneously put FunctionDecls into CXXRecordDeclsSean Callanan2013-04-091-0/+4
| | | | | | | | | | | if we didn't want to put in a CXXConstructorDecl. This prevents malformed classes (i.e., classes with regular C functions as members) from being generated from type information (and fixes a crash in the test suite). <rdar://problem/13550765> llvm-svn: 179136
* Added support "__attribute__((__vector_size__(B)))" and ↵Greg Clayton2013-04-052-16/+20
| | | | | | | | | | | "__attribute__((ext_vector_type(N)))". Now we can: 1 - see the return value for functions that return types that use the "ext_vector_size" 2 - dump values that use the vector attributes ("expr $ymm0") 3 - modified the DWARF parser to correctly parse GNU vector types from the DWARF by turning them into clang::Type::ExtVector types instead of just standard arrays llvm-svn: 178924
* More support for version 4 of DWARF.Greg Clayton2013-04-041-1/+1
| | | | llvm-svn: 178717
* <rdar://problem/13384801>Greg Clayton2013-04-031-5/+6
| | | | | | Make lldb_private::RegularExpression thread safe everywhere. This was done by removing the m_matches array from the lldb_private::RegularExpression class and putting it into the new lldb_private::RegularExpression::Match class. When executing a regular expression you now have the option to create a lldb_private::RegularExpression::Match object and pass a pointer in if you want to get parenthesized matching. If you don't want any matching, you pass in NULL. The lldb_private::RegularExpression::Match object is initialized with the number of matches you desire. Any matching strings are now extracted from the lldb_private::RegularExpression::Match objects. This makes the regular expression objects thread safe and as a result many more regex objects were turned into static objects that end up using a local lldb_private::RegularExpression::Match object when executing. llvm-svn: 178702
* <rdar://problem/13561911>Greg Clayton2013-04-032-7/+31
| | | | | | Modify LLDB to handle DW_FORM_ref_addr attributes for DWARF3 and DWARF4. llvm-svn: 178696
* <rdar://problem/13506727> Greg Clayton2013-04-031-140/+123
| | | | | | | | | | | | Symbol table function names should support lookups like symbols with debug info. To fix this I: - Gutted the way FindFunctions is used, there used to be way too much smarts only in the DWARF plug-in - Made it more efficient by chopping the name up once and using simpler queries so that SymbolFile and Symtab plug-ins don't need to do as much - Filter the results at a higher level - Make the lldb_private::Symtab able to chop up C++ mangled names and make as much sense out of them as possible and also be able to search by basename, fullname, method name, and selector name. llvm-svn: 178608
* <rdar://problem/13521159>Greg Clayton2013-03-279-114/+119
| | | | | | | | LLDB is crashing when logging is enabled from lldb-perf-clang. This has to do with the global destructor chain as the process and its threads are being torn down. All logging channels now make one and only one instance that is kept in a global pointer which is never freed. This guarantees that logging can correctly continue as the process tears itself down. llvm-svn: 178191
* Don't use a "uintptr_t" for the metadata key, use a "void *". This removes ↵Greg Clayton2013-03-271-12/+12
| | | | | | all of the casts that were being used and cleans the code up a bit. Also added the ability to dump the metadata. llvm-svn: 178113
* <rdar://problem/13502196>Greg Clayton2013-03-261-1/+12
| | | | | | We have the tag when figuring out the fully qualified name, append a suitable name for other types of tags when no name is available. llvm-svn: 177966
* <rdar://problem/13502196> Greg Clayton2013-03-261-1/+4
| | | | | | Functions in "(anonymous namespace)" was causing LLDB to crash when trying to complete a type and it would also cause functions arguments to appear in wrong place in frame display when showing function arguments. llvm-svn: 177965
* Don't need to resolve the .o file path.Greg Clayton2013-03-231-1/+1
| | | | llvm-svn: 177792
* <rdar://problem/13421412>Greg Clayton2013-03-141-1/+1
| | | | | | Many "byte size" members and variables were using a mixture of uint32_t and size_t. Switching over to using uint64_t everywhere. llvm-svn: 177091
* Add a missing check for getting a NULL oso module back from ↵Jim Ingham2013-03-131-0/+3
| | | | | | GetModuleByCompUnitInfo. llvm-svn: 176918
* Add a missing call to GetFileRangeMap. It's absence was causing debug info ↵Jim Ingham2013-03-131-0/+1
| | | | | | | | | | from .o files to sometimes not get processed. <rdar://problem/13406310> llvm-svn: 176914
* <rdar://problem/13361742>Greg Clayton2013-03-081-1/+1
| | | | | | Don't resolve .o file locations when setting the file spec for each .o file in DWARF with debug map. We should trust the path. llvm-svn: 176725
* <rdar://problem/13374267>Greg Clayton2013-03-081-1/+2
| | | | | | Fixed error where objective C methods with selectors names starting with ".cxx_" where causing errors for ARC built binaries. llvm-svn: 176683
* <rdar://problem/13119621>Greg Clayton2013-03-082-17/+53
| | | | | | | | Make dynamic type detection faster by using the AST metadata to help out and allow us not to complete types when we don't need to. After running "purge" on a MacOSX system, the Xcode variables view now populates more than 3x faster with this fix. llvm-svn: 176676
* Typeo in warning message.Jason Molenda2013-03-071-1/+1
| | | | llvm-svn: 176664
* <rdar://problem/13362109>Greg Clayton2013-03-061-20/+4
| | | | | | LLDB was not parsing line tables correctly for DWARF in .o files after recent debug map changes. This has now been fixed. llvm-svn: 176592
* Fixed enum printing for negative enums. There previously was no testing to ↵Greg Clayton2013-03-061-5/+13
| | | | | | | | validate that enum values were being displayed correctly. Also added C++11 enum test cases to cover enums as int8_t, int16_t int32_t, int64_t, uint8_t, uint16_t, uint32_t, and uint64_t both for DWARF and dSYM cases. The DWARF being emitted by clang is missing the enum integer type, but the code is now ready to accept and deal with the integral type if it is supplied. llvm-svn: 176548
* <rdar://problem/13341472>Greg Clayton2013-03-052-4/+13
| | | | | | LLDB wasn't printing the names for negative enums. Fixed the signed extraction of enumerators and how they were registered with clang's type system. llvm-svn: 176533
* <rdar://problem/13338643>Greg Clayton2013-03-046-503/+610
| | | | | | | | | | | | | | | | DWARF with .o files now uses 40-60% less memory! Big fixes include: - Change line table internal representation to contain "file addresses". Since each line table is owned by a compile unit that is owned by a module, it makes address translation into lldb_private::Address easy to do when needed. - Removed linked address members/methods from lldb_private::Section and lldb_private::Address - lldb_private::LineTable can now relink itself using a FileRangeMap to make it easier to re-link line tables in the future - Added ObjectFile::ClearSymtab() so that we can get rid of the object file symbol tables after we parse them once since they are not needed and kept memory allocated for no reason - Moved the m_sections_ap (std::auto_ptr to section list) and m_symtab_ap (std::auto_ptr to the lldb_private::Symtab) out of each of the ObjectFile subclasses and put it into lldb_private::ObjectFile. - Changed how the debug map is parsed and stored to be able to: - Lazily parse the debug map for each object file - not require the address map for a .o file until debug information is linked for a .o file llvm-svn: 176454
OpenPOWER on IntegriCloud