[Lldb-commits] [PATCH] D127191: [lldb] [llgs] Include process id in W/X stop reasons

Michał Górny via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Mon Jun 20 04:37:33 PDT 2022


This revision was automatically updated to reflect the committed changes.
Closed by commit rGe4d6ed58a86e: [lldb] [llgs] Include process id in W/X stop reasons (authored by mgorny).
Herald added a project: LLDB.

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D127191/new/

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
@@ -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()
 
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());
 }
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D127191.438340.patch
Type: text/x-patch
Size: 1849 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20220620/0aac27b6/attachment.bin>


More information about the lldb-commits mailing list