Skip to content
  1. Mar 08, 2011
    • Greg Clayton's avatar
      LLDB now has "Platform" plug-ins. Platform plug-ins are plug-ins that provide · e996fd30
      Greg Clayton authored
      an interface to a local or remote debugging platform. By default each host OS
      that supports LLDB should be registering a "default" platform that will be
      used unless a new platform is selected. Platforms are responsible for things
      such as:
      - getting process information by name or by processs ID
      - finding platform files. This is useful for remote debugging where there is 
        an SDK with files that might already or need to be cached for debug access.
      - getting a list of platform supported architectures in the exact order they
        should be selected. This helps the native x86 platform on MacOSX select the
        correct x86_64/i386 slice from universal binaries.
      - Connect to remote platforms for remote debugging
      - Resolving an executable including finding an executable inside platform
        specific bundles (macosx uses .app bundles that contain files) and also
        selecting the appropriate slice of universal files for a given platform.
      
      So by default there is always a local platform, but remote platforms can be
      connected to. I will soon be adding a new "platform" command that will support
      the following commands:
      (lldb) platform connect --name machine1 macosx connect://host:port
      Connected to "machine1" platform.
      (lldb) platform disconnect macosx
      
      This allows LLDB to be well setup to do remote debugging and also once 
      connected process listing and finding for things like:
      (lldb) process attach --name x<TAB>
      
      The currently selected platform plug-in can now auto complete any available
      processes that start with "x". The responsibilities for the platform plug-in
      will soon grow and expand.
      
      llvm-svn: 127286
      e996fd30
    • Stephen Wilson's avatar
      Fix ObjectFileElf::GetEntryPointAddress() · d126c8cc
      Stephen Wilson authored
      ELF object files do not implicitly have a symbol named "start" as an entry
      point.  For example, on Linux it is often named "_start", but can be trivially
      set to any symbol by passing an --entry argument to the linker.
      
      Use the ELF header to determine the entry point and resolve the associated
      section based on that address.
      
      Also, update the linux dynamic loader to call GetEntryPointAddress instead of
      GetEntryPoint.
      
      llvm-svn: 127218
      d126c8cc
    • Stephen Wilson's avatar
      Add Makefile support for the new DynamicLoaderStatic plugin. · 8f0daa28
      Stephen Wilson authored
      llvm-svn: 127215
      8f0daa28
    • Jim Ingham's avatar
      I didn't notice there was already an ObjectFile::GetEntryPoint. Move that... · bd3f2606
      Jim Ingham authored
      I didn't notice there was already an ObjectFile::GetEntryPoint.  Move that over to GetEntryPointAddress 'cause that's more consistent with other functions in ObjectFile, do the mutatis mutandi and also in the ELF case I return a section offset address rather than a bare load address.
      
      llvm-svn: 127205
      bd3f2606
    • Jim Ingham's avatar
      Reverting the part of the debug-in-ofile patch from earlier today that removes... · 5ca40258
      Jim Ingham authored
      Reverting the part of the debug-in-ofile patch from earlier today that removes them from the shared module list.  That was causing a bunch of asserts.  Greg is working on a better fix.
      
      llvm-svn: 127201
      5ca40258
    • 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
Loading