Skip to content
  1. Jan 29, 2012
    • Greg Clayton's avatar
      Switching back to using std::tr1::shared_ptr. We originally switched away · e1cd1be6
      Greg Clayton authored
      due to RTTI worries since llvm and clang don't use RTTI, but I was able to 
      switch back with no issues as far as I can tell. Once the RTTI issue wasn't
      an issue, we were looking for a way to properly track weak pointers to objects
      to solve some of the threading issues we have been running into which naturally
      led us back to std::tr1::weak_ptr. We also wanted the ability to make a shared 
      pointer from just a pointer, which is also easily solved using the 
      std::tr1::enable_shared_from_this class. 
      
      The main reason for this move back is so we can start properly having weak
      references to objects. Currently a lldb_private::Thread class has a refrence
      to its parent lldb_private::Process. This doesn't work well when we now hand
      out a SBThread object that contains a shared pointer to a lldb_private::Thread
      as this SBThread can be held onto by external clients and if they end up
      using one of these objects we can easily crash.
      
      So the next task is to start adopting std::tr1::weak_ptr where ever it makes
      sense which we can do with lldb_private::Debugger, lldb_private::Target,
      lldb_private::Process, lldb_private::Thread, lldb_private::StackFrame, and
      many more objects now that they are no longer using intrusive ref counted
      pointer objects (you can't do std::tr1::weak_ptr functionality with intrusive
      pointers).
      
      llvm-svn: 149207
      e1cd1be6
    • Greg Clayton's avatar
      Removed an incorrectly added property from SBTarget.i · bbb032e2
      Greg Clayton authored
      llvm-svn: 149192
      bbb032e2
    • Greg Clayton's avatar
      Added the ability to get the target triple, byte order and address byte size · 13d1950a
      Greg Clayton authored
      from the SBTarget and SBModule interfaces. Also added many python properties
      for easier access to many things from many SB objects.
      
      llvm-svn: 149191
      13d1950a
  2. Jan 28, 2012
  3. Jan 27, 2012
    • Johnny Chen's avatar
      Add an InstanceSettings::NotifyOwnerIsShuttingDown() method so that the owner... · aefcf999
      Johnny Chen authored
      Add an InstanceSettings::NotifyOwnerIsShuttingDown() method so that the owner can notify InstanceSettings instances
      that their owner reference is no longer valid.
      
      llvm-svn: 149145
      aefcf999
    • Greg Clayton's avatar
      Disable the ConnectionFileDescriptor mutex for now as it is deadlocking our · 9620f466
      Greg Clayton authored
      test suite and I need to investigate this.
      
      llvm-svn: 149141
      9620f466
    • Johnny Chen's avatar
      Fix typo. · f8f0fd76
      Johnny Chen authored
      llvm-svn: 149140
      f8f0fd76
    • Johnny Chen's avatar
      Emit the message about putting ' -- ' between the end of command options and... · 921ca5d4
      Johnny Chen authored
      Emit the message about putting ' -- ' between the end of command options and the raw input conditionally,
      that is, only if the command object does not want completion.  An example is the "settings set" command.
      
      llvm-svn: 149139
      921ca5d4
    • Greg Clayton's avatar
      Added a ModuleList::Destroy() method which will reclaim the std::vector · 29ad7b91
      Greg Clayton authored
      memory by doing a swap.
      
      Also added a few utilty functions that can be enabled for debugging issues
      with modules staying around too long when external clients still have references
      to them.
      
      llvm-svn: 149138
      29ad7b91
    • Greg Clayton's avatar
      NULL out the "ptr_" member of shared pointers for debug and release · a896f574
      Greg Clayton authored
      builds (not build and integration builds) to help catch when a shared pointer
      that might be in a collection class is used after the collection
      has been freed.
      
      llvm-svn: 149136
      a896f574
    • Greg Clayton's avatar
      Enable extra error checking for debug builds in our mutexes by · ecc61169
      Greg Clayton authored
      watching for errors from pthread_mutex_destroy () (usually "Resource
      busy" errors for when you have a mutex locked and try to destroy
      it), and pthread_mutex_lock, and pthread_mutex_unlock (usually for
      trying to lock an invalid mutex that might have possible already
      been freed).
      
      llvm-svn: 149135
      ecc61169
    • Greg Clayton's avatar
      There is no need to hold onto an ExecutionContext as a member variable. · a73d2692
      Greg Clayton authored
      ExecutionContext objects have shared pointers to Target, Process, Thread
      and Frame objects and they can end up being held onto for too long.
      
      llvm-svn: 149133
      a73d2692
    • Greg Clayton's avatar
      Fixed a location where we would never end up unlocking our mutex in · e3f6b5ce
      Greg Clayton authored
      the ClusterManager. Also switched to using Mutex::Locker where we can.
      
      llvm-svn: 149132
      e3f6b5ce
    • Greg Clayton's avatar
      Fixed an issue that could happen during global object destruction in our · b26e6beb
      Greg Clayton authored
      map that tracks all live Module classes. We must leak our mutex for our
      collection class as it might be destroyed in an order we can't control.
      
      llvm-svn: 149131
      b26e6beb
    • Greg Clayton's avatar
      <rdar://problem/10760649> · 23f7793b
      Greg Clayton authored
      Fixed another double file descriptor close issue that could occur when destroying a ProcessGDBRemote() object. There was a race which was detected by our fd_interposing library:
      
      error: /Applications/Xcode.app/Contents/MacOS/Xcode (pid=55222): close (fd=60) resulted in EBADF:
      0   libFDInterposing.dylib              0x00000001082be8ca close$__interposed__ + 666
      1   LLDB                                0x00000001194fde91 lldb_private::ConnectionFileDescriptor::Close(int&, lldb_private::Error*) + 97
      2   LLDB                                0x00000001194fddcd lldb_private::ConnectionFileDescriptor::Disconnect(lldb_private::Error*) + 143
      3   LLDB                                0x00000001194fe249 lldb_private::ConnectionFileDescriptor::Read(void*, unsigned long, unsigned int, lldb::ConnectionStatus&, lldb_private::Error*) + 835
      4   LLDB                                0x00000001194fc320 lldb_private::Communication::Read(void*, unsigned long, unsigned int, lldb::ConnectionStatus&, lldb_private::Error*) + 634
      5   LLDB                                0x000000011959c7f4 GDBRemoteCommunication::WaitForPacketWithTimeoutMicroSecondsNoLock(StringExtractorGDBRemote&, unsigned int) + 228
      6   LLDB                                0x000000011959c6b5 GDBRemoteCommunication::WaitForPacketWithTimeoutMicroSeconds(StringExtractorGDBRemote&, unsigned int) + 49
      7   LLDB                                0x0000000119629a71 GDBRemoteCommunicationClient::SendContinuePacketAndWaitForResponse(ProcessGDBRemote*, char const*, unsigned long, StringExtractorGDBRemote&) + 509
      8   LLDB                                0x00000001195a4076 ProcessGDBRemote::AsyncThread(void*) + 514
      9   LLDB                                0x0000000119568094 ThreadCreateTrampoline(void*) + 91
      10  libsystem_c.dylib                   0x00007fff8ca028bf _pthread_start + 335
      11  libsystem_c.dylib                   0x00007fff8ca05b75 thread_start + 13
      
      fd=60 was previously closed with this event:
      pid=55222: close (fd=60) => 0
      0   libFDInterposing.dylib              0x00000001082be870 close$__interposed__ + 576
      1   LLDB                                0x00000001194fde91 lldb_private::ConnectionFileDescriptor::Close(int&, lldb_private::Error*) + 97
      2   LLDB                                0x00000001194fddcd lldb_private::ConnectionFileDescriptor::Disconnect(lldb_private::Error*) + 143
      3   LLDB                                0x00000001194fbf00 lldb_private::Communication::Disconnect(lldb_private::Error*) + 92
      4   LLDB                                0x00000001195a2a77 ProcessGDBRemote::StopAsyncThread() + 89
      5   LLDB                                0x00000001195a2bf6 ProcessGDBRemote::DoDestroy() + 310
      6   LLDB                                0x00000001195f938d lldb_private::Process::Destroy() + 85
      7   LLDB                                0x0000000118819b48 lldb::SBProcess::Kill() + 72
      8   DebuggerLLDB                        0x0000000117264358 DBGLLDBSessionThread(void*) + 4450
      9   LLDB                                0x0000000119568094 ThreadCreateTrampoline(void*) + 91
      10  libsystem_c.dylib                   0x00007fff8ca028bf _pthread_start + 335
      11  libsystem_c.dylib                   0x00007fff8ca05b75 thread_start + 13
      
      fd=60 was created with this event:
      pid=55222: socket (domain = 2, type = 1, protocol = 6) => fd=60
      0   libFDInterposing.dylib              0x00000001082bc968 socket$__interposed__ + 600
      1   LLDB                                0x00000001194fd75f lldb_private::ConnectionFileDescriptor::ConnectTCP(char const*, lldb_private::Error*) + 179
      .....
      
      llvm-svn: 149103
      23f7793b
    • Greg Clayton's avatar
      <rdar://problem/10750012> · 9ea3fcd8
      Greg Clayton authored
      Remove a pseudo terminal master open and slave file descriptor that was being
      used for pythong stdin. It was not hooked up correctly and was causing file
      descriptor leaks.
      
      llvm-svn: 149098
      9ea3fcd8
  4. Jan 26, 2012
  5. Jan 25, 2012
  6. Jan 24, 2012
    • Sean Callanan's avatar
      Added a mechanism for the IR interpreter to return · 175a0d04
      Sean Callanan authored
      an error along with its boolean result.  The
      expression parser reports this error if the 
      interpreter fails and the expression could not be
      run in the target.
      
      llvm-svn: 148870
      175a0d04
    • Jim Ingham's avatar
      Better name for the Python Scripting. · feb332c0
      Jim Ingham authored
      llvm-svn: 148770
      feb332c0
    • Jim Ingham's avatar
      Better name for the python reference. · 6ae0f99f
      Jim Ingham authored
      llvm-svn: 148769
      6ae0f99f
    • Jim Ingham's avatar
      Proof-reading the python docs. · 87a59368
      Jim Ingham authored
      llvm-svn: 148768
      87a59368
    • Johnny Chen's avatar
      Modify redo.py script so that if sessin_dir is left unspecified, it uses the heuristic · d0077903
      Johnny Chen authored
      to find the possible session directories with names starting with %Y-%m-%d- (for example,
      2012-01-23-) and employs the one with the latest timestamp.  For example:
      
      johnny:/Volumes/data/lldb/svn/latest/test $ ./redo.py 
      Using session dir path: /Volumes/data/lldb/svn/latest/test/2012-01-23-11_28_30
      adding filterspec: DisassembleRawDataTestCase.test_disassemble_raw_data
      Running ./dotest.py  -C clang  -v -t -f DisassembleRawDataTestCase.test_disassemble_raw_data
      LLDB build dir: /Volumes/data/lldb/svn/latest/build/Debug
      LLDB-108
      Path: /Volumes/data/lldb/svn/latest
      URL: https://johnny@llvm.org/svn/llvm-project/lldb/trunk
      Repository Root: https://johnny@llvm.org/svn/llvm-project
      Repository UUID: 91177308-0d34-0410-b5e6-96231b3b80d8
      Revision: 148710
      Node Kind: directory
      Schedule: normal
      Last Changed Author: gclayton
      Last Changed Rev: 148650
      Last Changed Date: 2012-01-21 18:55:08 -0800 (Sat, 21 Jan 2012)
      
      
      
      Session logs for test failures/errors/unexpected successes will go into directory '2012-01-23-17_04_48'
      Command invoked: python ./dotest.py -C clang -v -t -f DisassembleRawDataTestCase.test_disassemble_raw_data
      
      Configuration:  compiler=clang
      ----------------------------------------------------------------------
      Collected 1 test
      
      Change dir to: /Volumes/data/lldb/svn/latest/test/python_api/disassemble-raw-data
      1: test_disassemble_raw_data (TestDisassembleRawData.DisassembleRawDataTestCase)
         Test disassembling raw bytes with the API. ... 
      Raw bytes:    ['0x48', '0x89', '0xe5']
      Disassembled: movq   %rsp, %rbp
      ok
      Restore dir to: /Volumes/data/lldb/svn/latest/test
      
      ----------------------------------------------------------------------
      Ran 1 test in 0.233s
      
      OK
      
      llvm-svn: 148766
      d0077903
    • Johnny Chen's avatar
Loading