Allow debugserver to detach from the target if the connection is
unexpectedly closed.
llvm-svn: 202110
diff --git a/lldb/tools/debugserver/source/DNB.cpp b/lldb/tools/debugserver/source/DNB.cpp
index 6c725d5..cd23a40 100644
--- a/lldb/tools/debugserver/source/DNB.cpp
+++ b/lldb/tools/debugserver/source/DNB.cpp
@@ -650,6 +650,10 @@
MachProcessSP procSP;
if (GetProcessSP (pid, procSP))
{
+ const bool remove = true;
+ DNBLogThreaded("Disabling breakpoints and watchpoints, and detaching from %d.", pid);
+ procSP->DisableAllBreakpoints(remove);
+ procSP->DisableAllWatchpoints (remove);
return procSP->Detach();
}
return false;