From 78baa19781920bf2b1332ffd1a88884bd2ba42be Mon Sep 17 00:00:00 2001 From: Ewan Crawford Date: Wed, 13 May 2015 09:18:18 +0000 Subject: Remote Non-Stop Support Summary: This patch is the beginnings of support for Non-stop mode in the remote protocol. Letting a user examine stopped threads, while other threads execute freely. Non-stop mode is enabled using the setting target.non-stop-mode, which sends a QNonStop packet when establishing the remote connection. Changes are also made to treat the '?' stop reply packet differently in non-stop mode, according to spec https://sourceware.org/gdb/current/onlinedocs/gdb/Remote-Non_002dStop.html#Remote-Non_002dStop. A setting for querying the remote for default thread on setup is also included. Handling of '%' async notification packets will be added next. Reviewers: clayborg Subscribers: lldb-commits, ADodds, ted, deepak2427 Differential Revision: http://reviews.llvm.org/D9656 llvm-svn: 237239 --- lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp') diff --git a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp index fbd2047..2700ffc 100644 --- a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp +++ b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp @@ -424,6 +424,7 @@ GDBRemoteCommunication::CheckForPacket (const uint8_t *src, size_t src_len, Stri content_length = total_length = 1; // The command is one byte long... break; + case '%': // Async notify packet case '$': // Look for a standard gdb packet? { @@ -466,6 +467,7 @@ GDBRemoteCommunication::CheckForPacket (const uint8_t *src, size_t src_len, Stri case '+': case '-': case '\x03': + case '%': case '$': done = true; break; @@ -586,7 +588,7 @@ GDBRemoteCommunication::CheckForPacket (const uint8_t *src, size_t src_len, Stri } } - if (m_bytes[0] == '$') + if (m_bytes[0] == '$' || m_bytes[0] == '%') { assert (checksum_idx < m_bytes.size()); if (::isxdigit (m_bytes[checksum_idx+0]) || -- cgit v1.1