Index: lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp =================================================================== --- lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp +++ lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp @@ -809,8 +809,12 @@ // Print the signal number. response.PutHex8(signum & 0xff); - // Include the tid. - response.Printf("thread:%" PRIx64 ";", tid); + // Include the (pid and) tid. + response.PutCString("thread:"); + if (bool(m_extensions_supported & + NativeProcessProtocol::Extension::multiprocess)) + response.Format("p{0:x-}.", m_current_process->GetID()); + response.Format("{0:x-};", tid); // Include the thread name if there is one. const std::string thread_name = thread->GetName(); Index: lldb/test/API/tools/lldb-server/TestGdbRemoteFork.py =================================================================== --- lldb/test/API/tools/lldb-server/TestGdbRemoteFork.py +++ lldb/test/API/tools/lldb-server/TestGdbRemoteFork.py @@ -102,15 +102,12 @@ self.reset_test_sequence() # continue and expect fork - procinfo_regex = "[$]pid:([0-9a-f]+);.*" - fork_regex = "[$]T.*;{}:p([0-9a-f]+)[.]([0-9a-f]+).*".format(variant) + fork_regex = ("[$]T[0-9a-f]{{2}}thread:p([0-9a-f]+)[.][0-9a-f]+;.*" + "{}:p([0-9a-f]+)[.]([0-9a-f]+).*".format(variant)) self.test_sequence.add_log_lines([ - "read packet: $qProcessInfo#00", - {"direction": "send", "regex": procinfo_regex, - "capture": {1: "parent_pid"}}, "read packet: $c#00", {"direction": "send", "regex": fork_regex, - "capture": {1: "pid", 2: "tid"}}, + "capture": {1: "parent_pid", 2: "pid", 3: "tid"}}, ], True) ret = self.expect_gdbremote_sequence() parent_pid, pid, tid = (int(ret[x], 16) for x