Skip to content
  1. May 11, 2011
  2. 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
  3. May 08, 2011
  4. May 05, 2011
  5. Apr 29, 2011
  6. Apr 27, 2011
  7. Apr 26, 2011
  8. 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
  9. Apr 23, 2011
  10. Apr 18, 2011
  11. 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
  12. Mar 30, 2011
  13. 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
  14. Mar 10, 2011
  15. Mar 05, 2011
  16. 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
  17. Mar 02, 2011
  18. Dec 08, 2010
    • Johnny Chen's avatar
      Add more docstring for the lldb_iter() utility function which provides a compact · b340e6bb
      Johnny Chen authored
      way of iterating through an aggregate data structure.  The added example usage
      is from an actual use in test/foundation/TestSymbolTable.py:
      
          2. Pass a container of aggregate which provides APIs to get to the size and
             the element of the aggregate:
      
          # Module is a container of symbol table 
          module = target.FindModule(filespec)
          for symbol in lldb_iter(module, 'GetNumSymbols', 'GetSymbolAtIndex'):
              name = symbol.GetName()
              ...
      
      llvm-svn: 121271
      b340e6bb
  19. Nov 03, 2010
  20. Oct 25, 2010
  21. Oct 22, 2010
  22. Oct 18, 2010
  23. Oct 16, 2010
  24. Oct 15, 2010
    • Johnny Chen's avatar
      Make sure to close the string buffer when finished. · 2f666190
      Johnny Chen authored
      llvm-svn: 116621
      2f666190
    • Johnny Chen's avatar
      This is an initial version of test driver enhanceent to be able to dump the · 150c3cc8
      Johnny Chen authored
      session info after a test case failure, allowing more direct inspection of
      debugger session which leads to the test failure.
      
      For a simple usage scenario:
      
      [18:06:26] johnny:/Volumes/data/lldb/svn/trunk/test $ ./dotest.py -v . 2> ~/Developer/Log/lldbtest.log 
      
      ...
      
      [18:14:43] johnny:/Volumes/data/lldb/svn/trunk/test $ ls -l .session-*
      -rw-r--r--  1 johnny  admin  1359 Oct 14 18:06 .session-TestArrayTypes.ArrayTypesTestCase.test_with_dwarf_and_run_command
      -rw-r--r--  1 johnny  admin  2054 Oct 14 18:07 .session-TestClassTypes.ClassTypesTestCase.test_with_dsym_and_expr_parser
      -rw-r--r--  1 johnny  admin  2055 Oct 14 18:07 .session-TestClassTypes.ClassTypesTestCase.test_with_dwarf_and_expr_parser
      -rw-r--r--  1 johnny  admin  1351 Oct 14 17:57 .session-TestClassTypes.ClassTypesTestCase.test_with_dwarf_and_run_command
      [18:14:51] johnny:/Volumes/data/lldb/svn/trunk/test $ 
      
      The test case which failed will have its recorded session info dumped to a
      .session-* file in the current working directory.  For test suite using
      relocated directory, expect to find the .session-* files there.
      
      In this checkin, I also add @skip decorator to the two test methods in
      test/foundation/TestObjCMethods.py as it looks like the test suite is
      deadlocking when running the tests.  More investigations are needed.
      
      llvm-svn: 116552
      150c3cc8
  25. Oct 10, 2010
  26. Oct 09, 2010
  27. Oct 08, 2010
  28. Oct 07, 2010
Loading