Fixed an lldb infrastructure bug, where the debugger should reaaly update its
execution context only when the process is still alive. When running the test
suite, the debugger is launching and killing processes constantly.
This might be the cause of the test hang as reported in rdar://problem/8377854,
where the debugger was looping infinitely trying to update a supposedly stale
thread list.
git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@113022 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp b/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
index 815cece..c9f864f 100644
--- a/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
+++ b/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
@@ -1171,6 +1171,7 @@
StopAsyncThread ();
m_gdb_comm.StopReadThread();
KillDebugserverProcess ();
+ m_gdb_comm.Disconnect(); // Disconnect from the debug server.
return error;
}