diff --git a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp --- a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp +++ b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp @@ -474,6 +474,8 @@ StreamGDBRemote response; response.Format("{0:g}", *wait_status); + if (bool(m_extensions_supported & NativeProcessProtocol::Extension::multiprocess)) + response.Format(";process:{0:x-}", process->GetID()); return SendPacketNoLock(response.GetString()); } diff --git a/lldb/test/API/tools/lldb-server/TestGdbRemoteFork.py b/lldb/test/API/tools/lldb-server/TestGdbRemoteFork.py --- a/lldb/test/API/tools/lldb-server/TestGdbRemoteFork.py +++ b/lldb/test/API/tools/lldb-server/TestGdbRemoteFork.py @@ -74,7 +74,7 @@ # resume the parent self.test_sequence.add_log_lines([ "read packet: $c#00", - {"direction": "send", "regex": r"[$]W00#.*"}, + {"direction": "send", "regex": r"[$]W00;process:[0-9a-f]+#.*"}, ], True) self.expect_gdbremote_sequence() @@ -87,7 +87,7 @@ "read packet: $c#00", {"direction": "send", "regex": r"[$]T.*vforkdone.*"}, "read packet: $c#00", - {"direction": "send", "regex": r"[$]W00#.*"}, + {"direction": "send", "regex": r"[$]W00;process:[0-9a-f]+#.*"}, ], True) self.expect_gdbremote_sequence() @@ -135,7 +135,7 @@ # resume the child self.test_sequence.add_log_lines([ "read packet: $c#00", - {"direction": "send", "regex": r"[$]W00#.*"}, + {"direction": "send", "regex": r"[$]W00;process:[0-9a-f]+#.*"}, ], True) self.expect_gdbremote_sequence()