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
      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
      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 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
  7. Jan 23, 2012
  8. Jan 21, 2012
  9. Jan 20, 2012
  10. Jan 19, 2012
Loading