Skip to content
  1. Nov 21, 2011
  2. Nov 19, 2011
    • Greg Clayton's avatar
      Further performance improvements in the DWARF parser: · 3b608422
      Greg Clayton authored
      1 - the DIE collections no longer have the NULL tags which saves up to 25%
          of the memory on typical C++ code
      2 - faster parsing by not having to run the SetDIERelations() function anymore
          it is done when parsing the DWARF very efficiently.
      
      llvm-svn: 144983
      3b608422
    • Jim Ingham's avatar
      Handle stepping through a trampoline where the jump target is calculated a... · 9683ff12
      Jim Ingham authored
      Handle stepping through a trampoline where the jump target is calculated a runtime - and so doesn't match
      the name of the PLT entry.  This solution assumes a naming convention agreed upon by us and the system folks,
      and isn't general.  The general solution requires actually finding & calling the resolver function if it
      hasn't been called yet.  That's more tricky.
      
      llvm-svn: 144981
      9683ff12
  3. Nov 18, 2011
    • Greg Clayton's avatar
      Added optional calls to lldb_private::Process for getting memory region info · 46fb558d
      Greg Clayton authored
      from a process and hooked it up to the new packet that was recently added
      to our GDB remote executable named debugserver. Now Process has the following
      new calls:
      
      virtual Error
      Process::GetMemoryRegionInfo (lldb::addr_t load_addr, MemoryRegionInfo &range_info);
      
      virtual uint32_t
      GetLoadAddressPermissions (lldb::addr_t load_addr);
      
      Only the first one needs to be implemented by subclasses that can add this
      support.
      
      Cleaned up the way the new packet was implemented in debugserver to be more
      useful as an API inside debugserver. Also found an error where finding a region
      for an address actually will pick up the next region that follows the address
      in the query so we also need ot make sure that the address we requested the
      region for falls into the region that gets returned.
      
      llvm-svn: 144976
      46fb558d
    • Greg Clayton's avatar
      Looking at our memory usage with Instruments when debugging a large application · 7ba18027
      Greg Clayton authored
      we say that the vectors of DWARFDebugInfoEntry objects were the highest on the
      the list. 
      
      With these changes we cut our memory usage by 40%!!! I did this by reducing
      the size of the DWARFDebugInfoEntry from a previous:
      
      uint32_t offset
      uint32_t parent_idx
      uint32_t sibling_idx
      Abbrev * abbrev_ptr
      
      which was 20 bytes, but rounded up to 24 bytes due to alignment. Now we have:
      
      uint32_t offset
      uint32_t parent_idx
      uint32_t sibling_idx
      uint32_t abbr_idx:15,       // 32767 possible abbreviation codes
               has_children:1,    // 0 = no children, 1 = has children
               tag:16;            // DW_TAG_XXX value
      
      This gets us down to 16 bytes per DIE. I tested some VERY large DWARF files
      (900MB) and found there were only ~700 unique abbreviations, so 32767 should
      be enough for any sane compiler. If it isn't there are built in assertions
      that will fire off and tell us.
      
      llvm-svn: 144975
      7ba18027
  4. Nov 17, 2011
  5. Nov 16, 2011
    • Greg Clayton's avatar
      Made the darwin host layer properly reap any child processes that it spawns. · e4e45924
      Greg Clayton authored
      After recent changes we weren't reaping child processes resulting in many
      zombie processes. 
      
      This was fixed by adding more settings to the ProcessLaunchOptions class
      that allow clients to specify a callback function and baton to be notified
      when their process dies. If one is not supplied a default callback will be
      used that "does the right thing". 
      
      Cleaned up a race condition in the ProcessGDBRemote class that would attempt
      to monitor when debugserver died. 
      
      Added an extra boolean to the process monitor callbacks that indicate if a
      process exited or not. If your process exited with a zero exit status and no
      signal, both items could be zero.
      
      Modified the process monitor functions to not require a callback function
      in order to reap the child process.
      
      llvm-svn: 144780
      e4e45924
  6. Nov 15, 2011
    • Greg Clayton's avatar
      Added a new class to Process.h: ProcessAttachInfo. This class contains enough · 144f3a9c
      Greg Clayton authored
      info for us to attach by pid, or by name and will also allow us to eventually
      do a lot more powerful attaches. If you look at the options for the "platform
      process list" command, there are many options which we should be able to
      specify. This will allow us to do things like "attach to a process named 'tcsh'
      that has a parent process ID of 123", or "attach to a process named 'x' which
      has an effective user ID of 345". 
      
      I finished up the --shell implementation so that it can be used without the
      --tty option in "process launch". The "--shell" option now can take an 
      optional argument which is the path to the shell to use (or a partial name
      like "sh" which we will find using the current PATH environment variable).
      
      Modified the Process::Attach to use the new ProcessAttachInfo as the sole
      argument and centralized a lot of code that was in the "process attach"
      Execute function so that everyone can take advantage of the powerful new
      attach functionality.
      
      llvm-svn: 144615
      144f3a9c
  7. Nov 13, 2011
    • Greg Clayton's avatar
      <rdar://problem/10103980> · 93e8619d
      Greg Clayton authored
      A long time ago we started to centralized the STDOUT in lldb_private::Process
      but we missed a few things still in ProcessGDBRemote.
      
      llvm-svn: 144491
      93e8619d
    • Greg Clayton's avatar
      <rdar://problem/10338439> · 2fc93eab
      Greg Clayton authored
      This is the actual fix for the above radar where global variables that weren't
      initialized were not being shown correctly when leaving the DWARF in the .o 
      files. Global variables that aren't intialized have symbols in the .o files
      that specify they are undefined and external to the .o file, yet document the
      size of the variable. This allows the compiler to emit a single copy, but makes
      it harder for our DWARF in .o files with the executable having a debug map
      because the symbol for the global in the .o file doesn't exist in a section
      that we can assign a fixed up linked address to, and also the DWARF contains
      an invalid address in the "DW_OP_addr" location (always zero). This means that
      the DWARF is incorrect and actually maps all such global varaibles to the
      first file address in the .o file which is usually the first function. So we
      can fix this in either of two ways: make a new fake section in the .o file
      so that we have a file address in the .o file that we can relink, or fix the 
      the variable as it is created in the .o file DWARF parser and actually give it
      the file address from the executable. Each variable contains a 
      SymbolContextScope, or a single pointer that helps us to recreate where the
      variables came from (which module, file, function, etc). This context helps
      us to resolve any file addresses that might be in the location description of
      the variable by pointing us to which file the file address comes from, so we
      can just replace the SymbolContextScope and also fix up the location, which we
      would have had to do for the other case as well, and update the file address.
      Now globals display correctly.
      
      The above changes made it possible to determine if a variable is a global
      or static variable when parsing DWARF. The DWARF emits a DW_TAG_variable tag
      for each variable (local, global, or static), yet DWARF provides no way for
      us to classify these variables into these categories. We can now detect when
      a variable has a simple address expressions as its location and this will help
      us classify these correctly.
      
      While making the above changes I also noticed that we had two symbol types:
      eSymbolTypeExtern and eSymbolTypeUndefined which mean essentially the same
      thing: the symbol is not defined in the current object file. Symbol objects
      also have a bit that specifies if a symbol is externally visible, so I got
      rid of the eSymbolTypeExtern symbol type and moved all code locations that
      used it to use the eSymbolTypeUndefined type.
       
      
      llvm-svn: 144489
      2fc93eab
  8. Nov 12, 2011
  9. Nov 11, 2011
  10. Nov 10, 2011
  11. Nov 05, 2011
  12. Nov 04, 2011
    • Greg Clayton's avatar
      Fixed the Xcode project building of LLVM to be a bit more user friendly: · dce502ed
      Greg Clayton authored
      - If you download and build the sources in the Xcode project, x86_64 builds
        by default using the "llvm.zip" checkpointed LLVM.
      - If you delete the "lldb/llvm.zip" and the "lldb/llvm" folder, and build the
        Xcode project will download the right LLVM sources and build them from 
        scratch
      - If you have a "lldb/llvm" folder already that contains a "lldb/llvm/lib"
        directory, we will use the sources you have placed in the LLDB directory.
        
      Python can now be disabled for platforms that don't support it. 
      
      Changed the way the libllvmclang.a files get used. They now all get built into
      arch specific directories and never get merged into universal binaries as this
      was causing issues where you would have to go and delete the file if you wanted
      to build an extra architecture slice.
      
      llvm-svn: 143678
      dce502ed
  13. Nov 03, 2011
  14. Nov 02, 2011
    • Sean Callanan's avatar
      Sometimes the debug information includes artifically- · dbb58399
      Sean Callanan authored
      generated special member functions (constructors,
      destructors, etc.) for classes that don't really have
      them.  We needed to mark these as artificial to reflect
      the debug information; this bug does that for
      constructors and destructors.
      
      The "etc." case (certain assignment operators, mostly)
      remains to be fixed.
      
      llvm-svn: 143526
      dbb58399
  15. Nov 01, 2011
    • Sean Callanan's avatar
      Added the capability (turned off for now) to mark a · c1b732d7
      Sean Callanan authored
      method as __attribute__ ((used)) when adding it to a
      class.  This functionality is useful when stopped in
      anonymous namespaces: expressions attached to classes
      in anonymous namespaces are typically elided by Clang's
      CodeGen because they have no namespaces are intended
      not to be externally visible.  __attribute__ ((used))
      forces CodeGen to emit the function.
      
      Right now, __attribute__ ((used)) causes the JIT not to
      emit the function, so we're not enabling it until we
      fix that.
      
      llvm-svn: 143469
      c1b732d7
    • Jason Molenda's avatar
      Restructure the relationship between UnwindLLDB and the · 707fec47
      Jason Molenda authored
      RegisterContextLLDBs it contains.
      
      Previously RegisterContextLLDB objects had a pointer to their "next"
      frame down the stack.  e.g. stack starts at frame 0; frame 3 has a
      pointer to frame 2.  This is used to retreive callee saved register
      values.  When debugging an inferior that has blown out its own stack,
      however, this could result in lldb blowing out its own stack while
      recursing down to retrieve register values.
      
      RegisterContextLLDB no longer has a pointer to its next frame; it 
      has a reference to the UnwindLLDB which contains it.  When it needs
      to retrieve a reg value, it asks the UnwindLLDB for that reg value
      and UnwindLLDB iterates through the frames until it finds a location.
      
      llvm-svn: 143423
      707fec47
    • Jim Ingham's avatar
      Enhanced the ObjC DynamicCheckerFunction to test for "object responds to selector" as well as · ce553d88
      Jim Ingham authored
      "object borked"...  Also made the error when the checker fails reflect this fact rather than
      report a crash at 0x0.
      
      Also a little cleanup:
      - StopInfoMachException had a redundant copy of the description string.
      - ThreadPlanCallFunction had a redundant copy of the thread, and had a 
      copy of the process that it didn't really need.
      
      llvm-svn: 143419
      ce553d88
    • Greg Clayton's avatar
      Fixed some warnings after enabling some stricter warnings in the Xcode project · 9d3d6886
      Greg Clayton authored
      settings.
      
      Also fixed an issue where we weren't creating anonymous namepaces correctly:
      <rdar://problem/10371295>
      
      llvm-svn: 143403
      9d3d6886
    • Daniel Dunbar's avatar
      build: Add the Darwin-Kernel Makefile. · 3344d2b9
      Daniel Dunbar authored
      llvm-svn: 143398
      3344d2b9
    • Daniel Dunbar's avatar
      a6ad0e29
  16. Oct 31, 2011
  17. Oct 29, 2011
  18. Oct 28, 2011
  19. Oct 27, 2011
    • Greg Clayton's avatar
      Added support for the new ".apple_objc" accelerator tables. These tables are · 5009f9d5
      Greg Clayton authored
      in the same hashed format as the ".apple_names", but they map objective C
      class names to all of the methods and class functions. We need to do this 
      because in the DWARF the methods for Objective C are never contained in the
      class definition, they are scattered about at the translation unit level and
      they don't even have attributes that say the are contained within the class
      itself. 
      
      Added 3 new formats which can be used to display data:
      
          eFormatAddressInfo
          eFormatHexFloat
          eFormatInstruction
          
      eFormatAddressInfo describes an address such as function+offset and file+line,
      or symbol + offset, or constant data (c string, 2, 4, 8, or 16 byte constants).
      The format character for this is "A", the long format is "address".
      
      eFormatHexFloat will print out the hex float format that compilers tend to use.
      The format character for this is "X", the long format is "hex float".
      
      eFormatInstruction will print out disassembly with bytes and it will use the
      current target's architecture. The format character for this is "i" (which
      used to be being used for the integer format, but the integer format also has
      "d", so we gave the "i" format to disassembly), the long format is 
      "instruction".
      
      Mate the lldb::FormatterChoiceCriterion enumeration private as it should have
      been from the start. It is very specialized and doesn't belong in the public 
      API.
      
      llvm-svn: 143114
      5009f9d5
Loading