summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
diff options
context:
space:
mode:
authorJim Ingham <jingham@apple.com>2012-06-06 00:32:39 +0000
committerJim Ingham <jingham@apple.com>2012-06-06 00:32:39 +0000
commitbabfc38abc9d8a3036a706d8b7abc9874da16d95 (patch)
tree424f7c76ae10c96159bd128b918ef67ae417be47 /lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
parentaacc31813e9615e56dc39e322e47ed423e5a3adb (diff)
downloadbcm5719-llvm-babfc38abc9d8a3036a706d8b7abc9874da16d95.tar.gz
bcm5719-llvm-babfc38abc9d8a3036a706d8b7abc9874da16d95.zip
Fix a place in GDBRemoteCommunicationClient::SendContinuePacketAndWaitForReply where we weren't taking
m_interrupt_sent into account. Also don't reset m_interrupt_sent in SendInterrupt but do so in SendPacketAndWaitForResponse when we know we've handled the interrupt. Fix a code path through ProcessGDBRemote::DoDestroy where we were tearing down the debug session but not setting the exit status. llvm-svn: 158043
Diffstat (limited to 'lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp')
-rw-r--r--lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
index dc5e8d1afea..90fb47eb7a3 100644
--- a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
+++ b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
@@ -289,6 +289,7 @@ GDBRemoteCommunicationClient::SendPacketAndWaitForResponse
{
if (m_interrupt_sent)
{
+ m_interrupt_sent = false;
TimeValue timeout_time;
timeout_time = TimeValue::Now();
timeout_time.OffsetWithSeconds (m_packet_timeout);
@@ -390,7 +391,7 @@ GDBRemoteCommunicationClient::SendContinuePacketAndWaitForResponse
BroadcastEvent(eBroadcastBitRunPacketSent, NULL);
m_public_is_running.SetValue (true, eBroadcastNever);
// Set the starting continue packet into "continue_packet". This packet
- // make change if we are interrupted and we continue after an async packet...
+ // may change if we are interrupted and we continue after an async packet...
std::string continue_packet(payload, packet_length);
bool got_stdout = false;
@@ -445,10 +446,9 @@ GDBRemoteCommunicationClient::SendContinuePacketAndWaitForResponse
const uint8_t signo = response.GetHexU8 (UINT8_MAX);
- bool continue_after_async = false;
- if (m_async_signal != -1 || m_async_packet_predicate.GetValue())
+ bool continue_after_async = m_async_signal != -1 || m_async_packet_predicate.GetValue();
+ if (continue_after_async || m_interrupt_sent)
{
- continue_after_async = true;
// We sent an interrupt packet to stop the inferior process
// for an async signal or to send an async packet while running
// but we might have been single stepping and received the
@@ -660,7 +660,6 @@ GDBRemoteCommunicationClient::SendInterrupt
bool &timed_out
)
{
- m_interrupt_sent = false;
timed_out = false;
LogSP log (ProcessGDBRemoteLog::GetLogIfAnyCategoryIsSet (GDBR_LOG_PROCESS | GDBR_LOG_PACKETS));
OpenPOWER on IntegriCloud