Skip to content
  1. Sep 27, 2011
  2. Aug 04, 2011
  3. Jul 23, 2011
    • Johnny Chen's avatar
      Add an additional formatter class RecursiveDecentFormatter which prints the · 36d7d916
      Johnny Chen authored
      value and the decendents.  For an example,
      
      rdf = lldbutil.RecursiveDecentFormatter(indent_child=2)
      print rdf.format(g_table)
      
      produces:
      
      (const char **[2]) g_table = 0x00000001055a80f0 (location)
        (const char **) [0] = 0x00000001055a8080
          (const char *) *[0] = "Sunday"
        (const char **) [1] = 0x00000001055a80c0
          (const char *) *[1] = "Monday"
      
      llvm-svn: 135815
      36d7d916
  4. Jul 22, 2011
    • Johnny Chen's avatar
      Fix comment. · efee1cdc
      Johnny Chen authored
      llvm-svn: 135737
      efee1cdc
    • Johnny Chen's avatar
      Add BasicFormatter and ChildVisitingFormatter utility classes to the lldbutil.py module · 989b7efd
      Johnny Chen authored
      which provide some convenient ways to print an SBValue object.  Use that in TestValueAPI.py
      to print the 'days_of_week' char* array variable.
      
      For an example:
      
      cvf = lldbutil.ChildVisitingFormatter(indent=2)
      print cvf.format(days_of_week)
      
      produces:
      
      (const char *[7]) days_of_week = 0x00000001026a5060 (location)
        (const char *) [0] = "Sunday"
        (const char *) [1] = "Monday"
        (const char *) [2] = "Tuesday"
        (const char *) [3] = "Wednesday"
        (const char *) [4] = "Thursday"
        (const char *) [5] = "Friday"
        (const char *) [6] = "Saturday"
      
      llvm-svn: 135736
      989b7efd
  5. Jul 14, 2011
  6. Jun 20, 2011
  7. Jun 17, 2011
    • Johnny Chen's avatar
      o lldbutil.py: · 0d4f6dd0
      Johnny Chen authored
        For the print_stacktrace(thread, string_buffer = False) function, if we have debug info
        for a frame function, let's also emit the args for the current function.
      
      o TestFrameUtils.py:
      
        Add stronger assertTrue for frame0's args.
      
      o TestPrintStackTraces.py:
      
        Launch the inferior with ["abc", "xyz"] and expect '(int)argc=3' in the stack traces, since
        by design the inferior is built with debug info.
      
      llvm-svn: 133204
      0d4f6dd0
  8. Jun 16, 2011
  9. May 26, 2011
  10. May 25, 2011
  11. May 13, 2011
  12. May 12, 2011
    • Johnny Chen's avatar
      Add two utility functions: · ad7372c5
      Johnny Chen authored
          o get_parent_frame(frame)
          o get_args_as_string(frame)
      
      to lldbutil.py and create TestFrameUtils.py to exercise the utils.
      Plus re-arrange the test/python_api/lldbutil to have three directories
      for testing iteration, process stack traces, and the just added frame utils.
      
      llvm-svn: 131213
      ad7372c5
  13. May 11, 2011
  14. May 10, 2011
    • Johnny Chen's avatar
      Add a utility function get_registers(frame, kind) to get the registers of a... · 64ff7e6e
      Johnny Chen authored
      Add a utility function get_registers(frame, kind) to get the registers of a given frame and of a given kind.
      Also add three convenience functions get_GPRs(frame), get_FPRs(frame), and get_ESRs(frame) to get the general
      purpose registers, the floating point registers, and the exception state registers.
      
      Add TestRegistersIterator.py to test these added functions of lldbutil.py.
      
      llvm-svn: 131144
      64ff7e6e
  15. May 08, 2011
  16. May 05, 2011
  17. Apr 29, 2011
  18. Apr 27, 2011
  19. Apr 26, 2011
  20. 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
  21. Apr 23, 2011
  22. Apr 18, 2011
  23. Apr 16, 2011
    • Jim Ingham's avatar
      Add support for "dynamic values" for C++ classes. This currently only works... · 78a685aa
      Jim Ingham authored
      Add support for "dynamic values" for C++ classes.  This currently only works for "frame var" and for the
      expressions that are simple enough to get passed to the "frame var" underpinnings.  The parser code will
      have to be changed to also query for the dynamic types & offsets as it is looking up variables.
      
      The behavior of "frame var" is controlled in two ways.  You can pass "-d {true/false} to the frame var
      command to get the dynamic or static value of the variables you are printing.
      
      There's also a general setting:
      
      target.prefer-dynamic-value (boolean) = 'true'
      
      which is consulted if you call "frame var" without supplying a value for the -d option.
      
      llvm-svn: 129623
      78a685aa
  24. Mar 30, 2011
  25. Mar 23, 2011
    • Johnny Chen's avatar
      Turns out that the test failure wrt: · ac77f3b2
      Johnny Chen authored
          rdar://problem/9173060 lldb hangs while running unique-types
      
      disappears if running with clang version >= 3.  Modify the TestUniqueTypes.py
      to detect if we are running with clang version < 3 and, if true, skip the test.
      
      Update the lldbtest.system() function to return a tuple of (stdoutdata, stderrdata)
      since we need the stderr data from "clang -v" command.  Modify existing clients of
      lldbtest.system() to now use, for example:
      
               # First, capture the golden output emitted by the oracle, i.e., the
               # series of printf statements.
      -        go = system("./a.out", sender=self)
      +        go = system("./a.out", sender=self)[0]
               # This golden list contains a list of (variable, value) pairs extracted
               # from the golden output.
               gl = []
      
      And add two utility functions to lldbutil.py.
      
      llvm-svn: 128162
      ac77f3b2
  26. Mar 10, 2011
  27. Mar 05, 2011
  28. Mar 03, 2011
    • Johnny Chen's avatar
      Add TestDisasmAPI.py which exercises the newly added SBFunction/SBSymbol.GetStartAddress(), · ed401980
      Johnny Chen authored
      among other things:
      
      // When stopped on breakppint 1, we can get the line entry using SBFrame API
      // SBFrame.GetLineEntry().  We'll get the start address for the the line entry
      // with the SBAddress type, resolve the symbol context using the SBTarget API
      // SBTarget.ResolveSymbolContextForAddress() in order to get the SBSymbol.
      //
      // We then stop at breakpoint 2, get the SBFrame, and the the SBFunction object.
      //
      // The address from calling GetStartAddress() on the symbol and the function
      // should point to the same address, and we also verify that.
      
      And add one utility function disassemble(target, function_or_symbol) to lldbutil.py:
      
          """Disassemble the function or symbol given a target.
      
          It returns the disassembly content in a string object.
          """
      
      TestDisasm.py uses the disassemble() function to do disassembly on the SBSymbol, and
      then the SBFunction object.
      
      llvm-svn: 126955
      ed401980
    • Johnny Chen's avatar
      Add TestTargetAPI.py: · d61816b5
      Johnny Chen authored
      // When stopped on breakppint 1, and then 2, we can get the line entries using
      // SBFrame API SBFrame.GetLineEntry().  We'll get the start addresses for the
      // two line entries; with the start address (of SBAddress type), we can then
      // resolve the symbol context using the SBTarget API
      // SBTarget.ResolveSymbolContextForAddress().
      //
      // The two symbol context should point to the same symbol, i.e., 'a' function.
      
      
      Add two utility functions to lldbutil.py:
      
      o get_stopped_threads(process, reason):
      
        return the list of threads with the specified stop reason or an empty list if not found
      
      o get_stopped_thread(process, reason):
      
        return the first thread with the given stop reason or None if not found
      
      llvm-svn: 126916
      d61816b5
  29. Mar 02, 2011
Loading