Skip to content
  1. May 14, 2011
  2. Apr 21, 2011
  3. Jan 26, 2011
  4. Jan 23, 2011
  5. Nov 14, 2010
    • Greg Clayton's avatar
      Just like functions can have a basename and a mangled/demangled name, variable · 83c5cd9d
      Greg Clayton authored
      can too. So now the lldb_private::Variable class has support for this.
      
      Variables now have support for having a basename ("i"), and a mangled name 
      ("_ZN12_GLOBAL__N_11iE"), and a demangled name ("(anonymous namespace)::i").
      
      Nowwhen searching for a variable by name, users might enter the fully qualified
      name, or just the basename. So new test functions were added to the Variable 
      and Mangled classes as:
      
      	bool NameMatches (const ConstString &name);
      	bool NameMatches (const RegularExpression &regex);
      
      I also modified "ClangExpressionDeclMap::FindVariableInScope" to also search
      for global variables that are not in the current file scope by first starting
      with the current module, then moving on to all modules.
      
      Fixed an issue in the DWARF parser that could cause a varaible to get parsed
      more than once. Now, once we have parsed a VariableSP for a DIE, we cache
      the result even if a variable wasn't made so we don't do any re-parsing. Some
      DW_TAG_variable DIEs don't have locations, or are missing vital info that 
      stops a debugger from being able to display anything for it, we parse a NULL
      variable shared pointer for these DIEs so we don't keep trying to reparse it.
      
      llvm-svn: 119085
      83c5cd9d
  6. Nov 10, 2010
    • Greg Clayton's avatar
      Did a lot of code cleanup. · 7a34528d
      Greg Clayton authored
      Fixed the DWARF plug-in such that when it gets all attributes for a DIE, that
      it omits the DW_AT_sibling and DW_AT_declaration when getting attributes
      from a DW_AT_abstract_origin or DW_AT_specification DIE.
      
      llvm-svn: 118654
      7a34528d
  7. Nov 08, 2010
  8. Oct 15, 2010
    • Greg Clayton's avatar
      Did a bit of parameter renaming. · 9476d957
      Greg Clayton authored
      llvm-svn: 116562
      9476d957
    • Greg Clayton's avatar
      Separated the DWARF index for types from that the index of the namespaces · 69b0488d
      Greg Clayton authored
      since we can't parse DW_TAG_namespace DIEs as types. They are only decls in
      clang. All of the types we handle right now have both clang "XXXType" classes
      to go with the "XXXDecl" classes which means they can be used within the 
      lldb_private::Type class. I need to check to see which other decls that don't
      have associated type objects need to float around the debugger and possibly
      make a lldb_private::Decl class to manage them.
      
      llvm-svn: 116558
      69b0488d
  9. Oct 13, 2010
    • Greg Clayton's avatar
      Fixed C++ class clang type creation and display by making sure we omit · 24739923
      Greg Clayton authored
      artifical members (like the vtable pointer member that shows up in the DWARF).
      We were adding this to each class which was making all member variables be off
      by a pointer size.
      
      Added a test case so we can track this with "test/forward".
      
      Fixed the type name index in DWARF to include all the types after finding
      some types were being omitted due to the DW_AT_specification having the
      DW_AT_declaration attribute which was being read into the real type instances
      when there were forward declarations in the DWARF, causing the type to be
      omitted. We now check to make sure any DW_AT_declaration values are only
      respected when parsing types if the attribute is from the current DIE.
      
      After fixing the missing types, we ran into some issues with the expression
      parser finding duplicate entries for __va_list_tag since they are built in
      types and would result in a "duplicate __va_list_tag definition" error. We
      are now just ignoring this name during lookup, but we will need to see if
      we can get the name lookup function to not get called in these cases.
      
      Fixed an issue that would cause an assertion where DW_TAG_subroutine_types
      that had no children, would not properly make a clang function type of:
      "void (*) (void)".
      
      llvm-svn: 116392
      24739923
  10. Oct 12, 2010
  11. Oct 01, 2010
  12. Sep 15, 2010
    • Greg Clayton's avatar
      15-20% speed improvement when parsing DWARF. I used instruments to · d88d759a
      Greg Clayton authored
      find the hotspots in our code when indexing the DWARF. A combination of
      using SmallVector to avoid collection allocations, using fixed form
      sizes when possible, and optimizing the hot loops contributed to the
      speedup.
      
      llvm-svn: 113961
      d88d759a
    • Greg Clayton's avatar
      So we can't use .debug_pubtypes as it, as designed, does not tell us about · c685f8e5
      Greg Clayton authored
      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
      c685f8e5
  13. Sep 14, 2010
    • Greg Clayton's avatar
      Looking at some of the test suite failures in DWARF in .o files with the · 016a95eb
      Greg Clayton authored
      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
      016a95eb
  14. Sep 04, 2010
  15. Jul 14, 2010
  16. Jul 09, 2010
  17. Jun 28, 2010
    • Greg Clayton's avatar
      Added function name types to allow us to set breakpoints by name more · 0c5cd90d
      Greg Clayton authored
      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
      0c5cd90d
  18. Jun 08, 2010
Loading