[Lldb-commits] [PATCH] D131758: [lldb] [gdb-remote] Include PID in vCont packets if multiprocess

Pavel Labath via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Thu Aug 18 11:47:38 PDT 2022


labath accepted this revision.
labath added inline comments.
This revision is now accepted and ready to land.


================
Comment at: lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp:1189-1192
+      std::string pid_prefix;
+      if (GetID() != LLDB_INVALID_PROCESS_ID &&
+          m_gdb_comm.GetMultiprocessSupported())
+        pid_prefix = llvm::formatv("p{0:x-}.", GetID());
----------------
If we're going to have these in more places, we should add a helper function to format a pid.tid pair.


================
Comment at: lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp:1190
+      std::string pid_prefix;
+      if (GetID() != LLDB_INVALID_PROCESS_ID &&
+          m_gdb_comm.GetMultiprocessSupported())
----------------
Is this really necessary. If I recall correctly, we go through a lot of trouble to come up with some pid value (resort to hardcoding pid to 1 if everything fails)..


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

https://reviews.llvm.org/D131758



More information about the lldb-commits mailing list