aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp
diff options
context:
space:
mode:
authorMichał Górny <mgorny@moritz.systems>2022-06-20 08:59:27 +0200
committerMichał Górny <mgorny@moritz.systems>2022-06-24 17:20:24 +0200
commit630da0e309ef4764465dcaf559676633e948f5c0 (patch)
tree67b651608ec845a55cf1bdb080fa312b095bc0d8 /lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp
parent14d67073359a86f1d2ae9e140f0b29aa4e63a3af (diff)
downloadllvm-630da0e309ef4764465dcaf559676633e948f5c0.zip
llvm-630da0e309ef4764465dcaf559676633e948f5c0.tar.gz
llvm-630da0e309ef4764465dcaf559676633e948f5c0.tar.bz2
[lldb] [llgs] Include PID in QC response in multiprocess mode
Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.llvm.org/D128156
Diffstat (limited to 'lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp')
-rw-r--r--lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp
index 8c26032..18712cf 100644
--- a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp
+++ b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp
@@ -1422,7 +1422,10 @@ GDBRemoteCommunicationServerLLGS::Handle_qC(StringExtractorGDBRemote &packet) {
return SendErrorResponse(69);
StreamString response;
- response.Printf("QC%" PRIx64, thread->GetID());
+ response.PutCString("QC");
+ if (bool(m_extensions_supported & NativeProcessProtocol::Extension::multiprocess))
+ response.Format("p{0:x-}.", m_current_process->GetID());
+ response.Format("{0:x-}", thread->GetID());
return SendPacketNoLock(response.GetString());
}