summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/SymbolFile
Commit message (Collapse)AuthorAgeFilesLines
...
* Patch from Filipe!Johnny Chen2011-09-091-1/+1
| | | | | | | One fixes a trailing comma bug (g++ doesn't like them) The other gets the Error from the result of an expression evaluation and uses it as the error for the Process::LoadImage() method. llvm-svn: 139336
* Move the SourceManager from the Debugger to the Target. That way it can ↵Jim Ingham2011-09-082-15/+22
| | | | | | | | | | store the per-Target default Source File & Line. Set the default Source File & line to main (if it can be found.) at startup. Selecting the current thread & or frame resets the current source file & line, and "source list" as well as the breakpoint command "break set -l <NUM>" will use the current source file. llvm-svn: 139323
* Added alpha .debug_names and .debug_types support in the DWARF parser.Greg Clayton2011-09-024-24/+142
| | | | llvm-svn: 138996
* Added the ability for DWARF locations to use the ABI plug-ins to resolveGreg Clayton2011-09-021-168/+180
| | | | | | | | register names when dumping variable locations and location lists. Also did some cleanup where "int" types were being used for "lldb::RegisterKind" values. llvm-svn: 138988
* Added files I forget to checkin with my last checkin.Greg Clayton2011-09-012-0/+235
| | | | llvm-svn: 138981
* Added support for accessing and loading our new .debug_names and .debug_typesGreg Clayton2011-09-014-34/+258
| | | | | | | | | | | | | | | | | | DWARF accelerator table sections to the DWARF parser. These sections are similar to the .debug_pubnames and .debug_pubtypes, but they are designed to be hash tables that are saved to disc in a way that the sections can just be loaded into memory and used without any work on the debugger side. The .debug_pubnames and .debug_pubtypes sections are not ordered, contain a copy of the name in the section itself which makes these sections quite large, they only include publicly exported names (so no static functions, no types defined inside functions), many compilers put different information in them making them very unreliable so most debugger ignore these sections and parse the DWARF on their own. The tables must also be parsed and sorted in order to be used effectively. The new sections can be quickly loaded and very efficiently be used to do name to DIE lookups with very little up front work. The format of these new sections will be changing while we work out the bugs, but we hope to have really fast name to DIE lookups soon. llvm-svn: 138979
* Fix a bunch of places where we were passing Stream *'s but wereJim Ingham2011-08-2712-142/+142
| | | | | | never checking them for NULL. Pass a reference instead. llvm-svn: 138694
* Move DIE location reporting into the DWARFDebugInfo class, use it from there ↵Jim Ingham2011-08-263-15/+36
| | | | | | in SymbolFileDWARF::ParseType (and eventually in other interesting places as well.) llvm-svn: 138644
* Added code to test hash bucket sizes for an DWARF index that we can writeGreg Clayton2011-08-262-0/+77
| | | | | | to a file. llvm-svn: 138620
* Add logging to SymbolFileDWARF::ParseType so that we can tell the ↵Jim Ingham2011-08-251-0/+19
| | | | | | type/comp_unit/obj_file were being processed when something goes wrong... llvm-svn: 138600
* The Compilation Unit language was being stored in a variable called ↵Jim Ingham2011-08-241-2/+2
| | | | | | "class_language"... Changed that to "cu_language". llvm-svn: 138523
* Fixed an issue where we could end up creating multipleGreg Clayton2011-08-161-29/+59
| | | | | | | | | | | C++ methods for a function depending on how the DWARF was created. Now we parse the class type from the definition, and all methods that use DW_AT_specification or DW_AT_abstract_origin attributes to point to the definition, now won't create duplicate entries. This is in response to how clang++ creates much different DWARF than gcc. llvm-svn: 137737
* Factor out the code that parses ObjC Method names into a static methodJim Ingham2011-08-151-44/+17
| | | | | | | in ObjCLanguageRuntime. Add the category-free name of symbols to the Symtab name-to-index list. llvm-svn: 137600
* Taking care of an issue relating to mapping DeclContext's to DIE'sEnrico Granata2011-08-121-0/+1
| | | | llvm-svn: 137490
* Fixed the issue of a DW_TAG_subprogram in a DW_TAG_subprogram correctly thisGreg Clayton2011-08-122-19/+27
| | | | | | time after recently backing out another fix. llvm-svn: 137475
* Backout previous fix that was designed to allow functions within functions Greg Clayton2011-08-121-1/+1
| | | | | | as this function is what parses the blocks for a function... llvm-svn: 137461
* Fixed an assertion issue that can arise when a functionGreg Clayton2011-08-121-1/+1
| | | | | | is contained inside a function. llvm-svn: 137438
* Fixed some issues with parsing C++ methods where our detectionGreg Clayton2011-08-125-59/+85
| | | | | | | | | | | | | was failing if the DWARF was laid out in a certain way. The way we detect C++ classes is now more robust so that a class method can be defined outside of the class and refer to a definition inside the class with a DW_AT_specification or DW_AT_abstract_origin attribute. Fixed a case in Thread.cpp where we were looking up info in the frame when we didn't need to. This was from some changes to support external editors. Now the info is only looked up if needed. llvm-svn: 137436
* This is an overhaul of the expression parser codeSean Callanan2011-08-052-22/+78
| | | | | | | | | | | | | | | | | | | | | | | | | | | that detects what context the current expression is meant to execute in. LLDB now properly consults the method declaration in the debug information rather than trying to hunt down the "this" or "self" pointer by name, which can be misleading. Other fixes include: - LLDB now properly detects that it is inside an inlined C++ member function. - LLDB now allows access to non-const members when in const code. - The functions in SymbolFile that locate the DeclContext containing a DIE have been renamed to reflect what they actually do. I have added new functions that find the DeclContext for the DIE itself. I have also introduced testcases for C++ and Objective-C. llvm-svn: 136999
* Make sure we track CXX and objc method decls.Greg Clayton2011-08-041-0/+3
| | | | llvm-svn: 136920
* Fixed a bug in which the DWARF reader did not distinguishSean Callanan2011-08-022-3/+14
| | | | | | | | | | | | | appropriately between C++ static methods and non-static methods. This bug made it impossible to call most static methods, either because Clang did not recognize that a method could be called without providing a "this" parameter, or because Clang did not properly mangle the name of the method when searching for it in the target. Also added a testcase. llvm-svn: 136733
* This change brings in the latest LLVM/Clang, andSean Callanan2011-07-302-16/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | completes the support in the LLDB expression parser for incomplete types. Clang now imports types lazily, and we complete those types as necessary. Changes include: - ClangASTSource now supports three APIs which it passes to ClangExpressionDeclMap. CompleteType completes a TagDecl or an ObjCInterfaceDecl when needed; FindExternalVisibleDecls finds named entities that are visible in the expression's scope; and FindExternalLexicalDecls performs a (potentially restricted) search for entities inside a lexical scope like a namespace. These changes mean that entities in namespaces should work normally. - The SymbolFileDWARF code for searching a context for a specific name is now more general, and can search arbitrary contexts. - We are continuing to adapt our calls into LLVM from interfaces that take start and end iterators when accepting multiple items to interfaces that use ArrayRef. - I have cleaned up some code, especially our use of namespaces. This change is neutral for our testsuite and greatly improves correctness for large programs (like Clang) with complicated type systems. It should also lay the groundwork for improving the expression parser's performance as we are lazier and lazier about providing type information. llvm-svn: 136555
* Added the ability to _not_ skip the prologue when settings breakpoints Greg Clayton2011-07-122-10/+40
| | | | | | | | | | | | | | by name by adding an extra parameter to the lldb_private::Target breakpoint setting functions. Added a function in the DWARF symbol file plug-in that can dump errors and prints out which DWARF file the error is happening in so we can track down what used to be assertions easily. Fixed the MacOSX kernel plug-in to properly read the kext images and set the kext breakpoint to watch for kexts as they are loaded. llvm-svn: 134990
* Stop the lldb_private::RegularExpression class from implicitlyGreg Clayton2011-07-071-1/+1
| | | | | | | constructing itself and causing unexpected things to happen in LLDB. llvm-svn: 134598
* Added "target variable" command that allows introspection of globalGreg Clayton2011-07-071-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | variables prior to running your binary. Zero filled sections now get section data correctly filled with zeroes when Target::ReadMemory reads from the object file section data. Added new option groups and option values for file lists. I still need to hook up all of the options to "target variable" to allow more complete introspection by file and shlib. Added the ability for ValueObjectVariable objects to be created with only the target as the execution context. This allows them to be read from the object files through Target::ReadMemory(...). Added a "virtual Module * GetModule()" function to the ValueObject class. By default it will look to the parent variable object and return its module. The module is needed when we have global variables that have file addresses (virtual addresses that are specific to module object files) and in turn allows global variables to be displayed prior to running. Removed all of the unused proxy object support that bit rotted in lldb_private::Value. Replaced a lot of places that used "FileSpec::Compare (lhs, rhs) == 0" code with the more efficient "FileSpec::Equal (lhs, rhs)". Improved logging in GDB remote plug-in. llvm-svn: 134579
* Centralize all of the type name code so that we always strip the leadingGreg Clayton2011-06-301-1/+1
| | | | | | | | "struct ", "class ", and "union " from the start of any type names that are extracted from clang QualType objects. I had to fix test suite cases that were expecting the struct/union/class prefix to be there. llvm-svn: 134132
* This commit adds broad architectural support for hierarchicalGreg Clayton2011-06-253-6/+96
| | | | | | | | | | | | | | | | | | | | | | | inspection of namespaces in the expression parser. ClangExpressionDeclMap hitherto reported that namespaces had been completely imported, even though the namespaces are returned empty. To deal with this situation, ClangASTSource was recently extended with an API to complete incomplete type definitions, and, for greater efficiency, to complete these definitions partially, returning only those objects that have a given name. This commit supports these APIs on LLDB's side, and uses it to provide information on types resident in namespaces. Namespaces are now imported as they were -- that is to say, empty -- but with minimal import mode on. This means that Clang will come back and request their contents by name as needed. We now respond with information on the contained types; this will be followed soon by information on functions and variables. llvm-svn: 133852
* Make sure we have a valid object file before we try getting the symbol tableGreg Clayton2011-06-191-30/+32
| | | | | | so we avoid crashing. llvm-svn: 133376
* Fixed variable parsing to not parse block variables over and over due to anGreg Clayton2011-06-174-98/+206
| | | | | | | | | | | | | | | issue in the way block variables are marked as parsed. In the DWARF parser we always parse all blocks for a function at once, so we can mark all blocks as having all variables parsed and avoid recursive function calls to try and reparse things that have already been handled. Fixed an issue with how variables get scoped into blocks. The DWARF parser can now handle abtract class definitions that contain concrete static variables. When the concrete instance of the class functions get instantiated, they will track down the concrete block for the abtract block and add the variable to each block. llvm-svn: 133302
* Improved the packet throughput when debugging with GDB remote by over 3x onGreg Clayton2011-06-171-49/+78
| | | | | | | | | | | | | darwin (not sure about other platforms). Modified the communication and connection classes to not require the BytesAvailable function. Now the "Read(...)" function has a timeout in microseconds. Fixed a lot of assertions that were firing off in certain cases and replaced them with error output and code that can deal with the assertion case. llvm-svn: 133224
* Header file cleanup and moved an inline to the implementation file.Greg Clayton2011-06-102-6/+11
| | | | llvm-svn: 132828
* lldb-59.Greg Clayton2011-05-301-1/+5
| | | | llvm-svn: 132304
* Do not parse DIE's outside a compilation units range.Stephen Wilson2011-05-201-11/+19
| | | | | | | | | | | | | | | In DWARFCompileUnit::ExtractDIEsIfNeeded we are relying on a compilation units DIEs to be terminated by a null entry. I think the standard is fairly clear that all sibling chains are to be terminated by null, but at least gcc 4.5.2 disagrees -- the top level chain drops the final entry. This results in us interpreting the next compilation unit header as a DIE. Regardless of whether gcc is right or wrong, we should not overstep a compilation units extent. This patch ensures that we do not attempt to extract a DIE beyond the length specified for a given DWARFCompileUnit by ensuring our current offset is strictly less than the start of the next CU. llvm-svn: 131721
* Use the portable memchr function instead of the BSD-only strnstrPeter Collingbourne2011-05-191-2/+2
| | | | llvm-svn: 131646
* Removed some assertions that could crash the controlling programGreg Clayton2011-05-171-5/+11
| | | | | | and turned them into warnings to stderr. llvm-svn: 131470
* For the purposes of setting breakpoints treat methods defined in the class ↵Jim Ingham2011-05-141-0/+18
| | | | | | and methods defined in a category on the class as the same. llvm-svn: 131331
* Fixed a case where if a function, inlined function, or global with a mangledGreg Clayton2011-04-211-14/+42
| | | | | | | name had a DW_AT_name that was the same string as the DW_AT_MIPS_linkage_name, then it would get added twice to the DWARF index. llvm-svn: 129942
* Rename some variables, no functionality change.Johnny Chen2011-04-181-8/+7
| | | | llvm-svn: 129724
* Work around a llvm gcc bug where the name of a reference doesn't include the ↵Jim Ingham2011-04-151-1/+10
| | | | | | "&". llvm-svn: 129620
* Get rid the of set membership test (log(m)) and, instead, use an index ↵Johnny Chen2011-04-151-3/+4
| | | | | | | | | variable 'i' which advances when src collides with a purged slot. Hi Stephen, you're welcome to overwrite/or improve upon this version. Thanks. llvm-svn: 129611
* Update both the src and dst pointers at the end of the loop.Johnny Chen2011-04-151-1/+1
| | | | | | Stephen Wilson is working on a better performing patch in the meantime. llvm-svn: 129605
* Optimize address range coalescing.Johnny Chen2011-04-151-22/+35
| | | | | | | | | | | | | | | | | | | | | | | DWARFDebugAranges::Sort() calls std::stable_sort() over a set of address ranges and then proceeds to collapse neighboring ranges together. One problem with the current implementation is that it does an incomplete job. When a pair of ranges are merged the next pair considered does not include the just-merged range. IOW, three consecutive ranges are never collapsed into one. Another problem is that for each range merged we are calling std::vector::erase() which "shifts" all remaining elements of the vector by one position on every merge. The end result (in the worst case) is a quadratic algorithm -- not good when the input vector is large. The following patch merges all consecutive ranges and removes the quadratic behavior. The implementation uses an auxiliary vector of indices in order to remember all ranges that can be dropped, then performs the coalescing of ranges in a single pass. Patch from Stephen Wilson with some minor modification by me. llvm-svn: 129595
* Added auto completion for architecture names and for platforms.Greg Clayton2011-04-131-8/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Modified the OptionGroupOptions to be able to specify only some of the options that should be appended by using the usage_mask in the group defintions and also provided a way to remap them to a new usage mask after the copy. This allows options to be re-used and also targetted for specific option groups. Modfied the CommandArgumentType to have a new eArgTypePlatform enumeration. Taught the option parser to be able to automatically use the appropriate auto completion for a given options if nothing is explicitly specified in the option definition. So you don't have to specify it in the option definition tables. Renamed the default host platform name to "host", and the default platform hostname to be "localhost". Modified the "file" and "platform select" commands to make sure all options and args are good prior to creating a new platform. Also defer the computation of the architecture in the file command until all options are parsed and the platform has either not been specified or reset to a new value to avoid computing the arch more than once. Switch the PluginManager code over to using llvm::StringRef for string comparisons and got rid of all the AccessorXXX functions in lieu of the newer mutex + collection singleton accessors. llvm-svn: 129483
* Add missing headers.Stephen Wilson2011-04-081-0/+1
| | | | | | | | Something changed in commit r129112 where a few standard headers vanished from the include chain when building on Linux. Fix up by including limits.h for INT_MAX and PATH_MAX where needed, and stdio.h for printf(). llvm-svn: 129130
* Add the rest of the mechanisms to make ARM instruction emulation ↵Caroline Tice2011-04-051-0/+2
| | | | | | usable/possible. llvm-svn: 128907
* Added some functions to our API related to classifying symbols as code, data,Greg Clayton2011-03-311-1/+3
| | | | | | | | | | | | const data, etc, and also for SBAddress objects to classify their type of section they are in and also getting the module for a section offset address. lldb::SymbolType SBSymbol::GetType(); lldb::SectionType SBAddress::GetSectionType (); lldb::SBModule SBAddress::GetModule (); llvm-svn: 128602
* Fixed the LLDB build so that we can have private types, private enums andGreg Clayton2011-03-242-3/+11
| | | | | | | | public types and public enums. This was done to keep the SWIG stuff from parsing all sorts of enums and types that weren't needed, and allows us to abstract our API better. llvm-svn: 128239
* Split all of the core of LLDB.framework/lldb.so into aGreg Clayton2011-03-201-0/+3
| | | | | | | | | | | | | | | | | | | | static archive that can be linked against. LLDB.framework/lldb.so exports a very controlled API. Splitting the API into a static library allows other tools (debugserver for now) to use the power of the LLDB debugger core, yet not export it as its API is not portable or maintainable. The Host layer and many of the other internal only APIs can now be statically linked against. Now LLDB.framework/lldb.so links against "liblldb-core.a" instead of compiling the .o files only for the shared library. This fix is only for compiling with Xcode as the Makefile based build already does this. The Xcode projecdt compiler has been changed to LLVM. Anyone using Xcode 3 will need to manually change the compiler back to GCC 4.2, or update to Xcode 4. llvm-svn: 127963
* Added a fix that should help incorrect type uniquing. There was an issueGreg Clayton2011-03-153-13/+88
| | | | | | | | for templatized types that could cause parts of a std::vector (and I am sure other STL types) to be incorrectly uniqued to each other wreaking havoc on variable display for types within the same executable module. llvm-svn: 127662
* Added a fix to not re-use object files when doing DWARF with debug map.Greg Clayton2011-03-151-16/+7
| | | | llvm-svn: 127659
OpenPOWER on IntegriCloud