mgorny created this revision. mgorny added reviewers: labath, krytarowski, emaste. Herald added a subscriber: arichardson. Herald added a project: All. mgorny requested review of this revision.
Include the process identifier in W/X stop reasons when multiprocess extensions are enabled. The LLDB client does not support process identifiers there at the moment but it parses packets in such a way that their presence does not cause any problems. Sponsored by: The FreeBSD Foundation https://reviews.llvm.org/D127191 Files: lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp lldb/test/API/tools/lldb-server/TestGdbRemoteFork.py 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 @@ -75,7 +75,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() @@ -88,7 +88,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() @@ -136,7 +136,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() 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 @@ -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()); }
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 @@ -75,7 +75,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() @@ -88,7 +88,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() @@ -136,7 +136,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() 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 @@ -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()); }
_______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits