diff options
| -rw-r--r-- | lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp | 6 | ||||
| -rw-r--r-- | lldb/tools/debugserver/source/RNBRemote.cpp | 12 |
2 files changed, 14 insertions, 4 deletions
diff --git a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp index 9b9de22808c..e27186ff86c 100644 --- a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp +++ b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp @@ -1756,14 +1756,16 @@ GDBRemoteCommunicationClient::Detach (bool keep_stopped) } else { - PacketResult packet_result = SendPacket ("D1", 2); + StringExtractorGDBRemote response; + PacketResult packet_result = SendPacketAndWaitForResponse ("D1", 1, response, false); if (packet_result != PacketResult::Success) error.SetErrorString ("Sending extended disconnect packet failed."); } } else { - PacketResult packet_result = SendPacket ("D", 1); + StringExtractorGDBRemote response; + PacketResult packet_result = SendPacketAndWaitForResponse ("D", 1, response, false); if (packet_result != PacketResult::Success) error.SetErrorString ("Sending disconnect packet failed."); } diff --git a/lldb/tools/debugserver/source/RNBRemote.cpp b/lldb/tools/debugserver/source/RNBRemote.cpp index 2d8b36688e4..a74fdf1e189 100644 --- a/lldb/tools/debugserver/source/RNBRemote.cpp +++ b/lldb/tools/debugserver/source/RNBRemote.cpp @@ -3605,9 +3605,17 @@ RNBRemote::HandlePacket_C (const char *p) rnb_err_t RNBRemote::HandlePacket_D (const char *p) { - SendPacket ("OK"); if (m_ctx.HasValidProcessID()) - DNBProcessDetach(m_ctx.ProcessID()); + { + if (DNBProcessDetach(m_ctx.ProcessID())) + SendPacket ("OK"); + else + SendPacket ("E"); + } + else + { + SendPacket ("E"); + } return rnb_success; } |

