diff options
author | Greg Clayton <gclayton@apple.com> | 2011-05-19 03:54:16 +0000 |
---|---|---|
committer | Greg Clayton <gclayton@apple.com> | 2011-05-19 03:54:16 +0000 |
commit | af247d7b98c9bfac07602907c34a4bf5bac806b0 (patch) | |
tree | 050933809c9aac94fd63199d49b32621993baad6 /lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp | |
parent | 41025dc95bd215cf5aeb5e3eb675f835183e1f7e (diff) | |
download | bcm5719-llvm-af247d7b98c9bfac07602907c34a4bf5bac806b0.tar.gz bcm5719-llvm-af247d7b98c9bfac07602907c34a4bf5bac806b0.zip |
Fixed a crasher that was happened when a log shared pointer wasn't valid.
Fixed ThreadPlanCallFunction::ReportRegisterState(...) to only dump when
verbose logging is enabled and fixed the function to use the new
RegisterValue method of reading registers.
Fixed the GDB remote client to not send a continue packet after receiving
stdout or stderr from the inferior process.
llvm-svn: 131628
Diffstat (limited to 'lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp')
-rw-r--r-- | lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp index f4e67022fc6..bfb4755931b 100644 --- a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp +++ b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp @@ -361,14 +361,21 @@ GDBRemoteCommunicationClient::SendContinuePacketAndWaitForResponse // make change if we are interrupted and we continue after an async packet... std::string continue_packet(payload, packet_length); + bool got_stdout = false; + while (state == eStateRunning) { - if (log) - log->Printf ("GDBRemoteCommunicationClient::%s () sending continue packet: %s", __FUNCTION__, continue_packet.c_str()); - if (SendPacket(continue_packet.c_str(), continue_packet.size()) == 0) - state = eStateInvalid; + if (!got_stdout) + { + if (log) + log->Printf ("GDBRemoteCommunicationClient::%s () sending continue packet: %s", __FUNCTION__, continue_packet.c_str()); + if (SendPacket(continue_packet.c_str(), continue_packet.size()) == 0) + state = eStateInvalid; + + m_private_is_running.SetValue (true, eBroadcastNever); + } - m_private_is_running.SetValue (true, eBroadcastNever); + got_stdout = false; if (log) log->Printf ("GDBRemoteCommunicationClient::%s () WaitForPacket(%.*s)", __FUNCTION__); @@ -489,6 +496,7 @@ GDBRemoteCommunicationClient::SendContinuePacketAndWaitForResponse case 'O': // STDOUT { + got_stdout = true; std::string inferior_stdout; inferior_stdout.reserve(response.GetBytesLeft () / 2); char ch; |