summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/SymbolFile
Commit message (Collapse)AuthorAgeFilesLines
...
* 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
* <rdar://problem/13287629>Greg Clayton2013-02-261-2/+8
| | | | | | Fixed an issue with clang 500's new way to represent static class variables where it emits a DW_TAG_member with a DW_AT_external(0x01) attribute and no DW_AT_data_member_location. llvm-svn: 176140
* A quick variable rename Sean and I had discussed earlier to make things a ↵Greg Clayton2013-02-261-9/+9
| | | | | | bit clearer. llvm-svn: 176071
* Fixed several problems with class uniq'ing in theSean Callanan2013-02-262-47/+150
| | | | | | | | | | | | | | | | | | | | | | | | | | | SymbolFileDWARF code: - If a class is being uniqued to another copy of itself and the method lists don't match exactly, take a slow path and at least unique the methods that they have in common. - Sort name_to_die maps before querying them. This would otherwise result in uniquing failures because looking up a name in a map that contains it would often fail. - Tolerate classes in other symbol files in the case of debugging with .o files rather than with a .dSYM. We used to assume that the classes being uniqued were in the same symbol file, causing unpredictable results. This will dramatically reduce the number of cases where a function does not have a valid DeclContext. <rdar://problem/12153915> llvm-svn: 176067
* <rdar://problem/13265297> Greg Clayton2013-02-231-1/+1
| | | | | | StackFrame assumes m_sc is additive, but m_sc can lose its target. So now the SymbolContext::Clear() method takes a bool that indicates if the target should be cleared. Modified all existing code to properly set the bool argument. llvm-svn: 175953
* Fix clang warnings related to python macro redefinition and printf format ↵Matt Kopec2013-02-211-1/+1
| | | | | | specifiers. llvm-svn: 175829
* Adding CMake build system to LLDB. Some known issues remain:Daniel Malea2013-02-213-0/+35
| | | | | | | | | | | | | | - generate-vers.pl has to be called by cmake to generate the version number - parallel builds not yet supported; dependency on clang must be explicitly specified Tested on Linux. - Building on Mac will require code-signing logic to be implemented. - Building on Windows will require OS-detection logic and some selective directory inclusion Thanks to Carlo Kok (who originally prepared these CMakefiles for Windows) and Ben Langmuir who ported them to Linux! llvm-svn: 175795
* Improved handling for DW_AT_const_valueAndrew Kaylor2013-02-131-2/+44
| | | | llvm-svn: 175071
* Be ready for fully qualified hash names in the __apples_types tables.Greg Clayton2013-02-062-9/+97
| | | | llvm-svn: 174558
* Fixed a problem that would cause LLDB to crashSean Callanan2013-02-061-0/+7
| | | | | | | | | | | if it encountered bad debug information. This debug information had an Objective-C method whose selector disagreed with the true number of arguments to that method. <rdar://problem/12992864> llvm-svn: 174557
* <rdar://problem/11109570>Greg Clayton2013-02-062-192/+223
| | | | | | The first part of the fix for having LLDB handle LTO debugging when the DWARF is in the .o files. This part separates the object file's modules into a separate cache map that maps unique C strings for the N_OSO path to the ModuleSP since one object file might be mentioned more than once in LTO binaries. llvm-svn: 174476
* <rdar://problem/12866706>Greg Clayton2013-02-051-20/+34
| | | | | | Removed asserts and replaced them with conditional code and appropriate errors that prompt for a bug to be filed. llvm-svn: 174420
* <rdar://problem/13130975>Greg Clayton2013-02-011-7/+7
| | | | | | Class global variables were not being linked correctly when debugging with DWARF in .o files. llvm-svn: 174227
* <rdar://problem/9141269>Greg Clayton2013-01-302-40/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Cleaned up the objective C name parsing code to use a class. Now breakpoints that are set by name that are objective C methods without the leading '+' or '-' will resolve. We do this by expanding all the objective C names for a given string. For example: (lldb) b [MyString cStringUsingEncoding:] Will set a breakpoint with multiple possible names: -[MyString cStringUsingEncoding:] +[MyString cStringUsingEncoding:] Also if you have a category, it will strip the category and set a breakpoint in all variants: (lldb) [MyString(my_category) cStringUsingEncoding:] Will resolve to the following names: -[MyString(my_category) cStringUsingEncoding:] +[MyString(my_category) cStringUsingEncoding:] -[MyString cStringUsingEncoding:] +[MyString cStringUsingEncoding:] Likewise when we have: (lldb) b -[MyString(my_category) cStringUsingEncoding:] It will resolve to two names: -[MyString(my_category) cStringUsingEncoding:] -[MyString cStringUsingEncoding:] llvm-svn: 173858
* <rdar://problem/13069948>Greg Clayton2013-01-2533-194/+145
| | | | | | | | | | | | Major fixed to allow reading files that are over 4GB. The main problems were that the DataExtractor was using 32 bit offsets as a data cursor, and since we mmap all of our object files we could run into cases where if we had a very large core file that was over 4GB, we were running into the 4GB boundary. So I defined a new "lldb::offset_t" which should be used for all file offsets. After making this change, I enabled warnings for data loss and for enexpected implicit conversions temporarily and found a ton of things that I fixed. Any functions that take an index internally, should use "size_t" for any indexes and also should return "size_t" for any sizes of collections. llvm-svn: 173463
* Handle the case of unordered sequences in a DWARF line table.Andrew Kaylor2013-01-041-15/+33
| | | | llvm-svn: 171548
* Clang sometimes emits "objc_object*" rather than "id"Sean Callanan2013-01-031-39/+68
| | | | | | | | | | | for id types with protocols on them. We detect this and report "id" instead. Also added a testcase. <rdar://problem/12595644> llvm-svn: 171431
* This patch removes the SymbolFileSymtab support Sean Callanan2012-12-191-58/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | for reporting class types from Objective-C runtime class symbols. Instead, LLDB now queries the Objective-C runtime for class types. We have also added a (minimal) Objective-C runtime type vendor for Objective-C runtime version 1, to prevent regressions when calling class methods in the V1 runtime. Other components of this fix include: - We search the Objective-C runtime in a few more places. - We enable enumeration of all members of Objective-C classes, which Clang does in certain circumstances. - SBTarget::FindFirstType and SBTarget::FindTypes now query the Objective-C runtime as needed. - I fixed several test cases. <rdar://problem/12885034> llvm-svn: 170601
* Remove unused variable.Greg Clayton2012-12-141-2/+0
| | | | llvm-svn: 170253
* Cleaned up the UUID mismatch just printing itself whenever it wants to by ↵Greg Clayton2012-12-141-2/+2
| | | | | | allowing an optional feedback stream to be passed along when getting the symbol vendor. llvm-svn: 170174
* <rdar://problem/12878674>Greg Clayton2012-12-141-1/+0
| | | | | | Remove debug asserts. llvm-svn: 170173
* Some incorrect debug information caused LLDBSean Callanan2012-12-141-1/+37
| | | | | | | | | | | | to report a structure with an array of size 1 at the end without accounting for that array when reporting the struct's total size to Clang. LLDB now coerces such an array to size 0. <rdar://problem/12822204> llvm-svn: 170168
OpenPOWER on IntegriCloud