Skip to content
  1. Mar 08, 2011
    • Jim Ingham's avatar
      Add a method "GetEntryPoint" to the ObjectFile class, and implement it on... · 672e6f59
      Jim Ingham authored
      Add a method "GetEntryPoint" to the ObjectFile class, and implement it on MachO & ELF - though the ELF implementation is probably a little weak.  Then use this method in place of directly looking for "start" in the ThreadPlanCallFunction constructor to find the stopping point for our function evaluation.
      
      llvm-svn: 127194
      672e6f59
    • Caroline Tice's avatar
      · 6258c53e
      Caroline Tice authored
      Add thread state initialization to the thread where the interactive
      interpreter is run (which is separate from the thread where
      Py_Initialize is called, where this normally gets set up).
      
      llvm-svn: 127191
      6258c53e
  2. Mar 07, 2011
  3. Mar 05, 2011
  4. Mar 04, 2011
    • Greg Clayton's avatar
      Allow the macosx frame backchain to use 32/64 bit as the selector when · 87447258
      Greg Clayton authored
      chosing which FP back-chain methods to use since we can rely upon generic 
      register numbers after that.
      
      llvm-svn: 127044
      87447258
    • Johnny Chen's avatar
      Add docstrings for unittest framework's test methods. · 3ef86dc7
      Johnny Chen authored
      llvm-svn: 127025
      3ef86dc7
    • Johnny Chen's avatar
      Change the CFLAGS variable assignment operator to ?= (conditional variable assignment operator). · 5f45f6c0
      Johnny Chen authored
      This allows us to override CFLAGS on the command line:
      
      $ CFLAGS='-arch $(ARCH) -gdwarf-2 -O0' ./dotest.py -C clang -A i386 -v objc-optimized
      
      Session logs for test failures/errors will go into directory '2011-03-04-10_33_57'
      Command invoked: python ./dotest.py -C clang -A i386 -v objc-optimized
      ----------------------------------------------------------------------
      Collected 2 tests
      
      1: test_break_with_dsym (TestObjcOptimized.ObjcOptimizedTestCase)
         Test 'expr member' continues to work for optimized build. ... ok
      2: test_break_with_dwarf (TestObjcOptimized.ObjcOptimizedTestCase)
         Test 'expr member' continues to work for optimized build. ... ok
      
      ----------------------------------------------------------------------
      Ran 2 tests in 1.902s
      
      OK
      $
      
      llvm-svn: 127011
      5f45f6c0
    • Johnny Chen's avatar
      Add TestObjcOptimized.py under the objc-optimized directory to · 3b83d63a
      Johnny Chen authored
      test that objective-c expression parser continues to work for optimized build.
      
      Radar filed:
      # rdar://problem/9087739
      # test failure: objc_optimized does not work for "-C clang -A i386"
      
      llvm-svn: 127009
      3b83d63a
    • Johnny Chen's avatar
      Add objc source file and Makefile. Test case to follow. · 60a084a2
      Johnny Chen authored
      llvm-svn: 126980
      60a084a2
    • Johnny Chen's avatar
      Add the ability for the test suite to specify a list of compilers and a list of architectures · e0ec9ea5
      Johnny Chen authored
      on the command line.  For example, use '-A x86_64^i386' to launch the inferior use both x86_64
      and i386.
      
      This is an example of building the debuggee using both clang and gcc compiers:
      
      [17:30:46] johnny:/Volumes/data/lldb/svn/trunk/test $ ./dotest.py -C clang^gcc -v -f SourceManagerTestCase.test_modify_source_file_while_debugging
      
      Session logs for test failures/errors will go into directory '2011-03-03-17_31_39'
      Command invoked: python ./dotest.py -C clang^gcc -v -f SourceManagerTestCase.test_modify_source_file_while_debugging
      
      Configuration:  compiler=clang
      ----------------------------------------------------------------------
      Collected 1 test
      
      1: test_modify_source_file_while_debugging (TestSourceManager.SourceManagerTestCase)
         Modify a source file while debugging the executable. ... Command 'run' failed!
      
      original content: #include <stdio.h>
      
      int main(int argc, char const *argv[]) {
          printf("Hello world.\n"); // Set break point at this line.
          return 0;
      }
      
      new content: #include <stdio.h>
      
      int main(int argc, char const *argv[]) {
          printf("Hello lldb.\n"); // Set break point at this line.
          return 0;
      }
      
      os.path.getmtime() after writing new content: 1299202305.0
      content restored to: #include <stdio.h>
      
      int main(int argc, char const *argv[]) {
          printf("Hello world.\n"); // Set break point at this line.
          return 0;
      }
      
      os.path.getmtime() after restore: 1299202307.0
      ok
      
      ----------------------------------------------------------------------
      Ran 1 test in 8.259s
      
      OK
      
      Configuration:  compiler=gcc
      ----------------------------------------------------------------------
      Collected 1 test
      
      1: test_modify_source_file_while_debugging (TestSourceManager.SourceManagerTestCase)
         Modify a source file while debugging the executable. ... original content: #include <stdio.h>
      
      int main(int argc, char const *argv[]) {
          printf("Hello world.\n"); // Set break point at this line.
          return 0;
      }
      
      new content: #include <stdio.h>
      
      int main(int argc, char const *argv[]) {
          printf("Hello lldb.\n"); // Set break point at this line.
          return 0;
      }
      
      os.path.getmtime() after writing new content: 1299202307.0
      content restored to: #include <stdio.h>
      
      int main(int argc, char const *argv[]) {
          printf("Hello world.\n"); // Set break point at this line.
          return 0;
      }
      
      os.path.getmtime() after restore: 1299202309.0
      ok
      
      ----------------------------------------------------------------------
      Ran 1 test in 2.301s
      
      OK
      [17:31:49] johnny:/Volumes/data/lldb/svn/trunk/test $ 
      
      llvm-svn: 126979
      e0ec9ea5
    • James McIlree's avatar
      Expose ConnectRemote API through SBTarget and SBProcess. · 9631aae2
      James McIlree authored
      Patch verified by Greg Clayton prior to checkin.
      
      llvm-svn: 126974
      9631aae2
    • Sean Callanan's avatar
      Fixed a bug in the expression parser where the 'this' · 54366f12
      Sean Callanan authored
      or 'self' variable was not properly read if the compiler
      optimized it into a register.
      
      llvm-svn: 126973
      54366f12
  5. Mar 03, 2011
    • Caroline Tice's avatar
      · 94f87e37
      Caroline Tice authored
      Add code to emulate RFE Arm instruction.
      
      Add new instruction context for RFE instruction.
      
      Add several new helper functions to help emulate RFE instruction
      (including CurrentModeIsPrivileged, BadMode, and CPSRWriteByInstr).
      
      llvm-svn: 126965
      94f87e37
    • 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
    • Caroline Tice's avatar
      · c8d0d3ae
      Caroline Tice authored
      Add code to emulate UXTH Arm instruction.
      
      llvm-svn: 126954
      c8d0d3ae
    • Caroline Tice's avatar
      · 9c35f321
      Caroline Tice authored
      Add code to emulate UXTB Arm instruction.
      
      llvm-svn: 126953
      9c35f321
    • Caroline Tice's avatar
      · 8678f2a1
      Caroline Tice authored
      Add code to emulate SXTH Arm instruction.
      
      llvm-svn: 126951
      8678f2a1
    • Caroline Tice's avatar
      · 67735bf0
      Caroline Tice authored
      Add code to emulate SXTB Arm instruction.
      
      llvm-svn: 126949
      67735bf0
    • 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
    • Caroline Tice's avatar
      · edc103e2
      Caroline Tice authored
      Fix bug where bitwise-AND was being used and it should have been bitwise-OR.
      
      llvm-svn: 126904
      edc103e2
    • Caroline Tice's avatar
      · 30f40c68
      Caroline Tice authored
      Add code to emulate ADD (immediate, Thumb) Arm instruction.
      
      Add addition context to EmulateInstruction contexts.
      
      llvm-svn: 126903
      30f40c68
    • Greg Clayton's avatar
      Export the ability to get the start and end addresses for functions · 93d00df5
      Greg Clayton authored
      and symbols, and also allow clients to get the prologue size in bytes:
      
          SBAddress
          SBFunction::GetStartAddress ();
          
          SBAddress
          SBFunction::GetEndAddress ();
          
          uint32_t
          SBFunction::GetPrologueByteSize ();
      
          SBAddress
          SBSymbol::GetStartAddress ();
          
          SBAddress
          SBSymbol::GetEndAddress ();
          
          uint32_t
          SBSymbol::GetPrologueByteSize ();
      
      llvm-svn: 126892
      93d00df5
  6. Mar 02, 2011
    • Caroline Tice's avatar
      · 1a234ff4
      Caroline Tice authored
      Add code to emulate MUL Arm instruction.
      
      Add new context type & info structure for  mul instruction.
      
      llvm-svn: 126891
      1a234ff4
    • Greg Clayton's avatar
      Added a missing API call in SBTarget that enables one to get · 5f2a4f99
      Greg Clayton authored
      anything in a SBSymbolContext filled in given an SBAddress:
      
      SBSymbolContext
      SBTarget::ResolveSymbolContextForAddress (const SBAddress& addr, uint32_t resolve_scope);
      
      Also did a little cleanup on the ProcessGDBRemote stdio file handle
      code.
      
      llvm-svn: 126885
      5f2a4f99
    • Caroline Tice's avatar
      · a0d3b675
      Caroline Tice authored
      Add code to emulate LDRSH (register) Arm instruction.
      
      llvm-svn: 126881
      a0d3b675
    • Johnny Chen's avatar
      43e587c1
    • Jim Ingham's avatar
      Add some function docs. · 843d20aa
      Jim Ingham authored
      llvm-svn: 126868
      843d20aa
    • Johnny Chen's avatar
      Add some comments. · 4e90a7e5
      Johnny Chen authored
      llvm-svn: 126867
      4e90a7e5
    • Caroline Tice's avatar
      · 1cd4459b
      Caroline Tice authored
      Add code to emulate LDRSH (literal) Arm instruction.
      
      llvm-svn: 126866
      1cd4459b
    • Johnny Chen's avatar
      Add two utility functions to lldbutil.py: · 43766d6f
      Johnny Chen authored
      o int_to_bytearray()
      o bytearray_to_int()
      
      They return/interpret the bytearray in the little endian format.
      For big endian, simply perform ba.reverse() on the bytearray object.
      
      And modify TestProcessAPI.py to take advantage of the functions.
      
      llvm-svn: 126813
      43766d6f
    • Caroline Tice's avatar
      · d3e57ee4
      Caroline Tice authored
      Add code to emulate LDRSH (immediate) Arm instruction.
      
      llvm-svn: 126807
      d3e57ee4
    • Caroline Tice's avatar
      · 4776fbbd
      Caroline Tice authored
      Add code to emulate LDRSB (register) Arm instruction.
      
      llvm-svn: 126802
      4776fbbd
  7. Mar 01, 2011
Loading