[Lldb-commits] [lldb] r143174 - /lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
Jim Ingham
jingham at apple.com
Thu Oct 27 18:11:35 PDT 2011
Author: jingham
Date: Thu Oct 27 20:11:35 2011
New Revision: 143174
URL: http://llvm.org/viewvc/llvm-project?rev=143174&view=rev
Log:
Fix up how we shut down the communication with debugserver so we don't rely on
debugserver being responsive to shut down.
Modified:
lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
Modified: lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp?rev=143174&r1=143173&r2=143174&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp (original)
+++ lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp Thu Oct 27 20:11:35 2011
@@ -1511,9 +1511,6 @@
// Sleep for one second to let the process get all detached...
StopAsyncThread ();
- m_gdb_comm.StopReadThread();
- m_gdb_comm.Disconnect(); // Disconnect from the debug server.
-
SetPrivateState (eStateDetached);
ResumePrivateStateThread();
@@ -1532,13 +1529,7 @@
// Interrupt if our inferior is running...
if (m_gdb_comm.IsConnected())
{
- if (m_public_state.GetValue() == eStateAttaching)
- {
- // We are being asked to halt during an attach. We need to just close
- // our file handle and debugserver will go away, and we can be done...
- m_gdb_comm.Disconnect();
- }
- else
+ if (m_public_state.GetValue() != eStateAttaching)
{
StringExtractorGDBRemote response;
@@ -1561,9 +1552,7 @@
}
}
StopAsyncThread ();
- m_gdb_comm.StopReadThread();
KillDebugserverProcess ();
- m_gdb_comm.Disconnect(); // Disconnect from the debug server.
return error;
}
@@ -2294,6 +2283,9 @@
log->Printf ("ProcessGDBRemote::%s ()", __FUNCTION__);
m_async_broadcaster.BroadcastEvent (eBroadcastBitAsyncThreadShouldExit);
+
+ // This will shut down the async thread.
+ m_gdb_comm.Disconnect(); // Disconnect from the debug server.
// Stop the stdio thread
if (IS_VALID_LLDB_HOST_THREAD(m_async_thread))
More information about the lldb-commits
mailing list