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

Michał Górny via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Thu Aug 18 23:08:41 PDT 2022


mgorny marked 2 inline comments as done.
mgorny added inline comments.


================
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());
----------------
labath wrote:
> If we're going to have these in more places, we should add a helper function to format a pid.tid pair.
I'll bear that in mind.


================
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())
----------------
labath wrote:
> 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)..
Probably not. I've guessed maybe it could happen somewhat early in the process but I couldn't really reproduce it ever.


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

https://reviews.llvm.org/D131758



More information about the lldb-commits mailing list