Skip to content
  1. May 16, 2011
  2. May 02, 2011
  3. Apr 29, 2011
  4. Apr 28, 2011
    • Johnny Chen's avatar
      Move the iteration protocol of lldb objects to the auto-generated lldb Python module. · fbc0d271
      Johnny Chen authored
      This is so that the objects which support the iteration protocol are immediately obvious
      from looking at the lldb.py file.
      
      SBTarget supports two types of iterations: module and breakpoint.  For an SBTarget instance,
      you will need to issue either:
      
          for m in target.module_iter()
      
      or
      
          for b in target.breakpoint_iter()
      
      For other single iteration protocol objects, just use, for example:
      
          for thread in process:
              ID = thread.GetThreadID()
              for frame in thread:
                  frame.Disassemble()
                  ....
      
      llvm-svn: 130442
      fbc0d271
  5. Apr 25, 2011
    • Johnny Chen's avatar
      Make SBBreakpointLocation::GetDescription() API to be consistent with SBTarget, · fc87e2dd
      Johnny Chen authored
      i.e., with 'SBStream &description' first, followed by 'DescriptionLevel level'.
      
      Modify lldbutil.py so that get_description() for a target or breakpoint location
      can just take the lldb object itself without specifying an option to mean option
      lldb.eDescriptionLevelBrief.  Modify TestTargetAPI.py to exercise this logic path.
      
      llvm-svn: 130147
      fc87e2dd
  6. Apr 22, 2011
    • Greg Clayton's avatar
      Did some work on the "register read" command to only show the first register · 385aa28c
      Greg Clayton authored
      set by default when dumping registers. If you want to see all of the register
      sets you can use the "--all" option:
      
      (lldb) register read --all
      
      If you want to just see some register sets, you can currently specify them
      by index:
      
      (lldb) register read --set 0 --set 2
      
      We need to get shorter register set names soon so we can specify the register
      sets by name without having to type too much. I will make this change soon.
      
      You can also have any integer encoded registers resolve the address values
      back to any code or data from the object files using the "--lookup" option.
      Below is sample output when stopped in the libc function "puts" with some
      const strings in registers:
      
      Process 8973 stopped
      * thread #1: tid = 0x2c03, 0x00007fff828fa30f libSystem.B.dylib`puts + 1, stop reason = instruction step into
        frame #0: 0x00007fff828fa30f libSystem.B.dylib`puts + 1
      (lldb) register read --lookup 
      General Purpose Registers:
        rax          = 0x0000000100000e98  "----------------------------------------------------------------------"
        rbx          = 0x0000000000000000
        rcx          = 0x0000000000000001  
        rdx          = 0x0000000000000000
        rdi          = 0x0000000100000e98  "----------------------------------------------------------------------"
        rsi          = 0x0000000100800000
        rbp          = 0x00007fff5fbff710
        rsp          = 0x00007fff5fbff280
        r8           = 0x0000000000000040  
        r9           = 0x0000000000000000
        r10          = 0x0000000000000000
        r11          = 0x0000000000000246  
        r12          = 0x0000000000000000
        r13          = 0x0000000000000000
        r14          = 0x0000000000000000
        r15          = 0x0000000000000000
        rip          = 0x00007fff828fa30f  libSystem.B.dylib`puts + 1
        rflags       = 0x0000000000000246  
        cs           = 0x0000000000000027  
        fs           = 0x0000000000000000
        gs           = 0x0000000000000000
      
      As we can see, we see two constant strings and the PC (register "rip") is 
      showing the code it resolves to.
      
      I fixed the register "--format" option to work as expected.
      
      Added a setting to disable skipping the function prologue when setting 
      breakpoints as a target settings variable:
      
      (lldb) settings set target.skip-prologue false
      
      Updated the user settings controller boolean value handler funciton to be able
      to take the default value so it can correctly respond to the eVarSetOperationClear
      operation.
      
      Did some usability work on the OptionValue classes.
      
      Fixed the "image lookup" command to correctly respond to the "--verbose" 
      option and display the detailed symbol context information when looking up
      line table entries and functions by name. This previously was only working
      for address lookups.
      
      llvm-svn: 129977
      385aa28c
  7. Apr 14, 2011
  8. Apr 08, 2011
    • Greg Clayton's avatar
      Modified the ArchSpec to take an optional "Platform *" when setting the triple. · eb0103f2
      Greg Clayton authored
      This allows you to have a platform selected, then specify a triple using
      "i386" and have the remaining triple items (vendor, os, and environment) set
      automatically.
      
      Many interpreter commands take the "--arch" option to specify an architecture
      triple, so now the command options needed to be able to get to the current
      platform, so the Options class now take a reference to the interpreter on
      construction.
      
      Modified the build LLVM building in the Xcode project to use the new
      Xcode project level user definitions:
      
      LLVM_BUILD_DIR - a path to the llvm build directory
      LLVM_SOURCE_DIR - a path to the llvm sources for the llvm that will be used to build lldb
      LLVM_CONFIGURATION - the configuration that lldb is built for (Release, 
      Release+Asserts, Debug, Debug+Asserts).
      
      I also changed the LLVM build to not check if "lldb/llvm" is a symlink and
      then assume it is a real llvm build directory versus the unzipped llvm.zip
      package, so now you can actually have a "lldb/llvm" directory in your lldb
      sources.
      
      llvm-svn: 129112
      eb0103f2
  9. Mar 26, 2011
  10. Mar 24, 2011
  11. Mar 23, 2011
  12. Mar 22, 2011
    • Greg Clayton's avatar
      Abtracted the innards of lldb-core away from the SB interface. There was some · fc36f791
      Greg Clayton authored
      overlap in the SWIG integration which has now been fixed by introducing
      callbacks for initializing SWIG for each language (python only right now).
      There was also a breakpoint command callback that called into SWIG which has
      been abtracted into a callback to avoid cross over as well.
      
      Added a new binary: lldb-platform
      
      This will be the start of the remote platform that will use as much of the 
      Host functionality to do its job so it should just work on all platforms.
      It is pretty hollowed out for now, but soon it will implement a platform
      using the GDB remote packets as the transport.
      
      llvm-svn: 128053
      fc36f791
  13. Mar 15, 2011
  14. Mar 09, 2011
  15. Mar 07, 2011
    • Johnny Chen's avatar
      Add TestThreadAPI.py file to house the Python SBThread API test cases. · 2f6f7ba8
      Johnny Chen authored
      Currently it has only test cases for SBThread.GetStopDescription() API.
      
      Also modified lldb.swig to add typemap for (char *dst, size_t dst_len)
      which occurs for SBThread::GetStopDescription() C++ API.  For Python
      scripting:
      
          # Due to the typemap magic (see lldb.swig), we pass in an (int)length to GetStopDescription
          # and expect to get a Python string as the result object!
          # The 100 is just an arbitrary number specifying the buffer size.
          stop_description = thread.GetStopDescription(100)
      
      llvm-svn: 127173
      2f6f7ba8
  16. Mar 01, 2011
  17. Jan 27, 2011
  18. Jan 19, 2011
  19. Jan 14, 2011
    • Greg Clayton's avatar
      Fixed an error in the type map for "char **" that was a bad memory smasher. · ca512b39
      Greg Clayton authored
      Anytime we had a valid python list that was trying to go from Python down into
      our C++ API, it was allocating too little memory and it ended up smashing
      whatever was next to the allocated memory.
      
      Added typemap conversions for "void *, size_t" so we can get 
      SBProcess::ReadMemory() working. Also added a typemap for "const void *, size_t"
      so we can get SBProcess::WriteMemory() to work.
      
      Fixed an issue in the DWARF parser where we weren't correctly calculating the
      DeclContext for all types and classes. We now should be a lot more accurate.
      Fixes include: enums should now be setting their parent decl context correctly.
      We saw a lot of examples where enums in classes were not being properly
      namespace scoped. Also, classes within classes now get properly scoped.
      
      Fixed the objective C runtime pointer checkers to let "nil" pointers through
      since these are accepted by compiled code. We also now don't call "abort()"
      when a pointer doesn't validate correctly since this was wreaking havoc on
      the process due to the way abort() works. We now just dereference memory
      which should give us an exception from which we can easily and reliably 
      recover.
      
      llvm-svn: 123428
      ca512b39
    • Caroline Tice's avatar
      Split up the Python script interpreter code to allow multiple script interpreter objects to · 2f88aadf
      Caroline Tice authored
      exist within the same process (one script interpreter object per debugger object).  The
      python script interpreter objects are all using the same global Python script interpreter;
      they use separate dictionaries to keep their data separate, and mutex's to prevent any object
      attempting to use the global Python interpreter when another object is already using it.
      
      llvm-svn: 123415
      2f88aadf
  20. Dec 16, 2010
  21. Dec 13, 2010
  22. Dec 03, 2010
  23. Nov 19, 2010
  24. Nov 18, 2010
  25. Oct 29, 2010
  26. Oct 28, 2010
  27. Oct 26, 2010
    • Caroline Tice's avatar
      First pass at adding logging capabilities for the API functions. At the moment · ceb6b139
      Caroline Tice authored
      it logs the function calls, their arguments and the return values.  This is not
      complete or polished, but I am committing it now, at the request of someone who
      really wants to use it, even though it's not really done.  It currently does not
      attempt to log all the functions, just the most important ones.  I will be 
      making further adjustments to the API logging code over the next few days/weeks.
      (Suggestions for improvements are welcome).
      
      
      Update the Python build scripts to re-build the swig C++ file whenever 
      the python-extensions.swig file is modified.
      
      Correct the help for 'log enable' command (give it the correct number & type of
      arguments).
      
      llvm-svn: 117349
      ceb6b139
  28. Oct 19, 2010
  29. Oct 14, 2010
  30. Oct 12, 2010
    • Caroline Tice's avatar
      Fix some memory leaks. · 4ab31c98
      Caroline Tice authored
      Add call to lldb.SBDebugger.Initialize() to lldb.py, so it automatically gets called when
      the lldb Python module gets loaded.
      
      llvm-svn: 116345
      4ab31c98
Loading