summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/SymbolFile/DWARF
Commit message (Collapse)AuthorAgeFilesLines
...
* So we can't use .debug_pubtypes as it, as designed, does not tell us about Greg Clayton2010-09-159-548/+431
| | | | | | | | | | | | | | | | | all types in all compile units. I added a new kind of accelerator table to the DWARF that allows us to index the DWARF compile units and DIEs in a way that doesn't require the data to stay loaded. Currently when indexing the DWARF we check if the compile unit had parsed its DIEs and if it hasn't we index the data and free all of the DIEs so we can reparse later when we need to after using one of our complete accelerator tables to determine we need to reparse some DWARF. If the DIEs had already been parsed we leave them loaded. The new accelerator table uses the "const char *" pointers from our ConstString class as the keys, and NameToDIE::Info as the value. This info contains the compile unit index and the DIE index which means we are pointed right to the DIE we need unlike the other DWARF accelerator tables that often just point us to the compile unit we would find our answer in. llvm-svn: 113933
* Looking at some of the test suite failures in DWARF in .o files with theGreg Clayton2010-09-1411-78/+207
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | debug map showed that the location lists in the .o files needed some refactoring in order to work. The case that was failing was where a function that was in the "__TEXT.__textcoal_nt" in the .o file, and in the "__TEXT.__text" section in the main executable. This made symbol lookup fail due to the way we were finding a real address in the debug map which was by finding the section that the function was in in the .o file and trying to find this in the main executable. Now the section list supports finding a linked address in a section or any child sections. After fixing this, we ran into issue that were due to DWARF and how it represents locations lists. DWARF makes a list of address ranges and expressions that go along with those address ranges. The location addresses are expressed in terms of a compile unit address + offset. This works fine as long as nothing moves around. When stuff moves around and offsets change between the remapped compile unit base address and the new function address, then we can run into trouble. To deal with this, we now store supply a location list slide amount to any location list expressions that will allow us to make the location list addresses into zero based offsets from the object that owns the location list (always a function in our case). With these fixes we can now re-link random address ranges inside the debugger for use with our DWARF + debug map, incremental linking, and more. Another issue that arose when doing the DWARF in the .o files was that GCC 4.2 emits a ".debug_aranges" that only mentions functions that are externally visible. This makes .debug_aranges useless to us and we now generate a real address range lookup table in the DWARF parser at the same time as we index the name tables (that are needed because .debug_pubnames is just as useless). llvm-gcc doesn't generate a .debug_aranges section, though this could be fixed, we aren't going to rely upon it. Renamed a bunch of "UINT_MAX" to "UINT32_MAX". llvm-svn: 113829
* Added a work in the DWARF parser when we parse an array that ends up having Greg Clayton2010-09-131-1/+16
| | | | | | | | | | | | | no elements so that they at least have 1 element. Added the ability to show the declaration location of variables to the "frame variables" with the "--show-declaration" option ("-c" for short). Changed the "frame variables" command over to use the value object code so that we use the same code path as the public API does when accessing and displaying variable values. llvm-svn: 113733
* Fixed a crash that would happen when using "frame variables" on any struct,Greg Clayton2010-09-121-2/+3
| | | | | | | | | | | | | | union, or class that contained an enumeration type. When I was creating the clang enumeration decl, I wasn't calling "EnumDecl::setIntegerType (QualType)" which means that if the enum decl was ever asked to figure out it's bit width (getTypeInfo()) it would crash. We didn't run into this with enum types that weren't inside classes because the DWARF already told us how big the type was and when we printed an enum we would never need to calculate the size, we would use the pre-cached byte size we got from the DWARF. When the enum was in a struct/union/class and we tried to layout the struct, the layout code would attempt to get the type info and segfault. llvm-svn: 113729
* Remove the eSymbolTypeFunction, eSymbolTypeGlobal, and eSymbolTypeStatic.Greg Clayton2010-09-112-29/+84
| | | | | | | | | | | | | | | | | | | They will now be represented as: eSymbolTypeFunction: eSymbolTypeCode with IsDebug() == true eSymbolTypeGlobal: eSymbolTypeData with IsDebug() == true and IsExternal() == true eSymbolTypeStatic: eSymbolTypeData with IsDebug() == true and IsExternal() == false This simplifies the logic when dealing with symbols and allows for symbols to be coalesced into a single symbol most of the time. Enabled the minimal symbol table for mach-o again after working out all the kinks. We now get nice concise symbol tables and debugging with DWARF in the .o files with a debug map in the binary works well again. There were issues where the SymbolFileDWARFDebugMap symbol file parser was using symbol IDs and symbol indexes interchangeably. Now that all those issues are resolved debugging is working nicely. llvm-svn: 113678
* Improved name demangling performance by 20% on darwin.Greg Clayton2010-09-031-6/+11
| | | | llvm-svn: 113032
* Modified the host process monitor callback function ↵Greg Clayton2010-08-212-25/+45
| | | | | | | | | | | | | | | | | | Host::StartMonitoringChildProcess to spawn a thread for each process that is being monitored. Previously LLDB would spawn a single thread that would wait for any child process which isn't ok to do as a shared library (LLDB.framework on Mac OSX, or lldb.so on linux). The old single thread used to call wait4() with a pid of -1 which could cause it to reap child processes that it shouldn't have. Re-wrote the way Function blocks are handles. Previously I attempted to keep all blocks in a single memory allocation (in a std::vector). This made the code somewhat efficient, but hard to work with. I got rid of the old BlockList class, and went to a straight parent with children relationship. This new approach will allow for partial parsing of the blocks within a function. llvm-svn: 111706
* Remove redundant call to ParseCompileUnitLineTable. The call to ↵Jim Ingham2010-08-201-5/+1
| | | | | | sc.comp_unit->GetLineTable() will parse the line table if it hasn't been read in. llvm-svn: 111605
* Avoid an assertion crash by avoiding a circular dependency in the objectiveGreg Clayton2010-08-181-3/+0
| | | | | | C builtin type conversion. llvm-svn: 111381
* Fixed an issue where we would return matches for DWARF in the .o files whenGreg Clayton2010-08-171-4/+38
| | | | | | | | | | | | | | | | the resulting function from the .o file DWARF didn't make it into the final executable. I recently changed the way FindFunctions() worked in the DWARF with debug map case that caused regressions in our test suite for dead stripped functions. The previous changes allowed us to leverage the powerful searching added to the DWARF parser (search by full name, basename, selector, or method name), without having to chop up the symbol names from the symbol table and do any special parsing of the names to extract the basename, selector or method. Previously we would look through the symbol table for matches first, then try and find the .o file with DWARF for that symbol and only search those .o files. Now we let the DWARF for the .o file search using the new search styles, and filter out any functions that didn't make it. llvm-svn: 111322
* Fixed FindFunctions so it works with all the new name types for the DWARF in ↵Greg Clayton2010-08-171-17/+18
| | | | | | object files case. llvm-svn: 111215
* Few little fixes to reading in inlined functions. Also added a test case ↵Jim Ingham2010-08-121-6/+27
| | | | | | with some inlining. llvm-svn: 110892
* Fixed namespace visibility problems that wereSean Callanan2010-08-062-21/+21
| | | | | | | breaking the build for me on a non-internal SnowLeopard system. llvm-svn: 110412
* Added support for objective C built-in types: id, Class, and SEL. This Greg Clayton2010-08-034-180/+104
| | | | | | | | | | | | | | | | | | | | | | | | | | involved watching for the objective C built-in types in DWARF and making sure when we convert the DWARF types into clang types that we use the appropriate ASTContext types. Added a way to find and dump types in lldb (something equivalent to gdb's "ptype" command): image lookup --type <TYPENAME> This only works for looking up types by name and won't work with variables. It also currently dumps out verbose internal information. I will modify it to dump more appropriate user level info in my next submission. Hookup up the "FindTypes()" functions in the SymbolFile and SymbolVendor so we can lookup types by name in one or more images. Fixed "image lookup --address <ADDRESS>" to be able to correctly show all symbol context information, but it will only show this extra information when the new "--verbose" flag is used. Updated to latest LLVM to get a few needed fixes. llvm-svn: 110089
* Created lldb::LanguageType by moving an enumeration from the Greg Clayton2010-07-283-16/+65
| | | | | | | | | | | | lldb_private::Language class into the enumerations header so it can be freely used by other interfaces. Added correct objective C class support to the DWARF symbol parser. Prior to this fix we were parsing objective C classes as C++ classes and now that the expression parser is ready to call functions we need to make sure the objective C classes have correct AST types. llvm-svn: 109574
* Added a new enumeration named "ClangASTContext::AccessType" that abstracts ↵Greg Clayton2010-07-222-33/+31
| | | | | | | | the type creation from the various access enumerations in Clang. Currently there are clang::AccessSpecifier and the objective C ivars have their own enumeration. So I added a new enumeration that will allow a consistent interface when creating types through ClangASTContext. I also added new functions to create an Objective C class, ivar and set an objective C superclass. They aren't hooked up in the DWARF parser yet. That is the next step, though I am unsure if I will do this in the DWARF parser or try and do it generically in the existing Record manipulation functions. llvm-svn: 109130
* Modified both the ObjectFileMachO and ObjectFileELF to correctly set theGreg Clayton2010-07-212-104/+31
| | | | | | | | | | | | | SectionType for Section objects for DWARF. Modified the DWARF plug-in to get the DWARF sections by SectionType so we can safely abstract the LLDB core from section names for the various object file formats. Modified the SectionType definitions for .debug_pubnames and .debug_pubtypes to use the correct case. llvm-svn: 109054
* Remove use of STL collection class use of the "data()" method since it isn'tGreg Clayton2010-07-201-6/+7
| | | | | | | part of C++'98. Most of these were "std::vector<T>::data()" and "std::string::data()". llvm-svn: 108957
* I enabled some extra warnings for hidden local variables and for hiddenGreg Clayton2010-07-142-9/+7
| | | | | | virtual functions and caught some things and did some general code cleanup. llvm-svn: 108299
* A few more misc warning fixes.Eli Friedman2010-07-091-1/+1
| | | | llvm-svn: 108030
* Misc warning fixes.Eli Friedman2010-07-091-2/+2
| | | | llvm-svn: 108029
* Merged Eli Friedman's linux build changes where he added Makefile files thatGreg Clayton2010-07-093-3/+16
| | | | | | | enabled LLVM make style building and made this compile LLDB on Mac OS X. We can now iterate on this to make the build work on both linux and macosx. llvm-svn: 108009
* Fix build for newer versions of GCC that don't include cstring implicitly. ↵Benjamin Kramer2010-07-071-1/+2
| | | | | | Based on a patch by Pawel Wodnicki! llvm-svn: 107763
* Switch over to using llvm's dwarf constants file.Jason Molenda2010-07-064-2361/+592
| | | | llvm-svn: 107716
* Remove extraneous semicolon after if condition (from Jean-Daniel Dupas).Greg Clayton2010-07-061-1/+1
| | | | llvm-svn: 107694
* More leaks detection:Greg Clayton2010-07-021-0/+4
| | | | | | | | | | - fixed 3 posix spawn attributes leaks - fixed us always leaking CXXBaseSpecifier objects when we create class base classes. Clang apparently copies the base classes we pass in. Fixed some code formatting in ClangASTContext.cpp. llvm-svn: 107459
* Added function name types to allow us to set breakpoints by name moreGreg Clayton2010-06-286-55/+141
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | intelligently. The four name types we currently have are: eFunctionNameTypeFull = (1 << 1), // The function name. // For C this is the same as just the name of the function // For C++ this is the demangled version of the mangled name. // For ObjC this is the full function signature with the + or // - and the square brackets and the class and selector eFunctionNameTypeBase = (1 << 2), // The function name only, no namespaces or arguments and no class // methods or selectors will be searched. eFunctionNameTypeMethod = (1 << 3), // Find function by method name (C++) with no namespace or arguments eFunctionNameTypeSelector = (1 << 4) // Find function by selector name (ObjC) names this allows much more flexibility when setting breakoints: (lldb) breakpoint set --name main --basename (lldb) breakpoint set --name main --fullname (lldb) breakpoint set --name main --method (lldb) breakpoint set --name main --selector The default: (lldb) breakpoint set --name main will inspect the name "main" and look for any parens, or if the name starts with "-[" or "+[" and if any are found then a full name search will happen. Else a basename search will be the default. Fixed some command option structures so not all options are required when they shouldn't be. Cleaned up the breakpoint output summary. Made the "image lookup --address <addr>" output much more verbose so it shows all the important symbol context results. Added a GetDescription method to many of the SymbolContext objects for the more verbose output. llvm-svn: 107075
* Move Args.{cpp,h} and Options.{cpp,h} to Interpreter where they really belong.Jim Ingham2010-06-151-1/+1
| | | | llvm-svn: 106034
* Fixed an issue with the new DW_TAG_ptr_to_member_type changes where the ↵Greg Clayton2010-06-121-1/+1
| | | | | | clang type that was being created was using the pointee_type for both the class and the member pointer. llvm-svn: 105883
* Anders Carlsson patch for member pointers. Thanks Anders.Greg Clayton2010-06-121-0/+42
| | | | llvm-svn: 105868
* Initial checkin of lldb code from internal Apple repo.Chris Lattner2010-06-0843-0/+17584
llvm-svn: 105619
OpenPOWER on IntegriCloud