diff options
author | Greg Clayton <gclayton@apple.com> | 2010-09-03 21:14:27 +0000 |
---|---|---|
committer | Greg Clayton <gclayton@apple.com> | 2010-09-03 21:14:27 +0000 |
commit | ef3cf2b95460f12d1f69a4dd3babc74b9406d45a (patch) | |
tree | 6d70bf7b022ea327e9eb5cd297af86366749b5c1 /lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp | |
parent | 9bb67f4d1ab7afb7840aaee490e6213e83ebca85 (diff) | |
download | bcm5719-llvm-ef3cf2b95460f12d1f69a4dd3babc74b9406d45a.tar.gz bcm5719-llvm-ef3cf2b95460f12d1f69a4dd3babc74b9406d45a.zip |
Added some extra logging to track asynchronous packet activity.
llvm-svn: 113012
Diffstat (limited to 'lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp')
-rw-r--r-- | lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp index 0f7787bf2ce..e917804b727 100644 --- a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp +++ b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp @@ -194,6 +194,7 @@ GDBRemoteCommunication::SendContinuePacketAndWaitForResponse ) { Log *log = ProcessGDBRemoteLog::GetLogIfAllCategoriesSet (GDBR_LOG_PROCESS); + Log *async_log = ProcessGDBRemoteLog::GetLogIfAllCategoriesSet (GDBR_LOG_ASYNC); if (log) log->Printf ("GDBRemoteCommunication::%s ()", __FUNCTION__); @@ -226,6 +227,9 @@ GDBRemoteCommunication::SendContinuePacketAndWaitForResponse case 'S': if (m_async_signal != -1) { + if (async_log) + async_log->Printf ("async: send signo = %s", Host::GetSignalAsCString (m_async_signal)); + // Save off the async signal we are supposed to send const int async_signal = m_async_signal; // Clear the async signal member so we don't end up @@ -235,6 +239,9 @@ GDBRemoteCommunication::SendContinuePacketAndWaitForResponse uint8_t signo = response.GetHexU8(255); if (signo == async_signal) { + if (async_log) + async_log->Printf ("async: stopped with signal %s, we are done running", Host::GetSignalAsCString (signo)); + // We already stopped with a signal that we wanted // to stop with, so we are done response.SetFilePos (0); @@ -251,8 +258,16 @@ GDBRemoteCommunication::SendContinuePacketAndWaitForResponse "C%2.2x", async_signal); + if (async_log) + async_log->Printf ("async: stopped with signal %s, resume with %s", + Host::GetSignalAsCString (signo), + Host::GetSignalAsCString (async_signal)); + if (SendPacket(signal_packet, signal_packet_len) == 0) { + if (async_log) + async_log->Printf ("async: error: failed to resume with %s", + Host::GetSignalAsCString (async_signal)); state = eStateInvalid; break; } @@ -262,6 +277,10 @@ GDBRemoteCommunication::SendContinuePacketAndWaitForResponse } else if (m_async_packet_predicate.GetValue()) { + if (async_log) + async_log->Printf ("async: send async packet: %s", + m_async_packet.c_str()); + // We are supposed to send an asynchronous packet while // we are running. m_async_response.Clear(); @@ -277,6 +296,10 @@ GDBRemoteCommunication::SendContinuePacketAndWaitForResponse // packet know that the packet has been sent. m_async_packet_predicate.SetValue(false, eBroadcastAlways); + if (async_log) + async_log->Printf ("async: resume after async response received: %s", + m_async_response.GetStringRef().c_str()); + // Continue again if (SendPacket("c", 1) == 0) { |