This revision was not accepted when it landed; it landed in state "Needs 
Review".
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG5517401f936a: Revert "[lldb] [gdb-remote] Include PID 
in vCont packets if multiprocess" (authored by Michael137).
Herald added a subscriber: JDevlieghere.

Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D132250

Files:
  lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
  lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.h
  lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp

Index: lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
===================================================================
--- lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
+++ lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
@@ -1186,15 +1186,11 @@
     StreamString continue_packet;
     bool continue_packet_error = false;
     if (m_gdb_comm.HasAnyVContSupport()) {
-      std::string pid_prefix;
-      if (m_gdb_comm.GetMultiprocessSupported())
-        pid_prefix = llvm::formatv("p{0:x-}.", GetID());
-
       if (m_continue_c_tids.size() == num_threads ||
           (m_continue_c_tids.empty() && m_continue_C_tids.empty() &&
            m_continue_s_tids.empty() && m_continue_S_tids.empty())) {
-        // All threads are continuing
-        continue_packet.Format("vCont;c:{0}-1", pid_prefix);
+        // All threads are continuing, just send a "c" packet
+        continue_packet.PutCString("c");
       } else {
         continue_packet.PutCString("vCont");
 
@@ -1204,7 +1200,7 @@
                      t_pos = m_continue_c_tids.begin(),
                      t_end = m_continue_c_tids.end();
                  t_pos != t_end; ++t_pos)
-              continue_packet.Format(";c:{0}{1:x-}", pid_prefix, *t_pos);
+              continue_packet.Printf(";c:%4.4" PRIx64, *t_pos);
           } else
             continue_packet_error = true;
         }
@@ -1215,8 +1211,8 @@
                      s_pos = m_continue_C_tids.begin(),
                      s_end = m_continue_C_tids.end();
                  s_pos != s_end; ++s_pos)
-              continue_packet.Format(";C{0:x-2}:{1}{2:x-}", s_pos->second,
-                                     pid_prefix, s_pos->first);
+              continue_packet.Printf(";C%2.2x:%4.4" PRIx64, s_pos->second,
+                                     s_pos->first);
           } else
             continue_packet_error = true;
         }
@@ -1227,7 +1223,7 @@
                      t_pos = m_continue_s_tids.begin(),
                      t_end = m_continue_s_tids.end();
                  t_pos != t_end; ++t_pos)
-              continue_packet.Format(";s:{0}{1:x-}", pid_prefix, *t_pos);
+              continue_packet.Printf(";s:%4.4" PRIx64, *t_pos);
           } else
             continue_packet_error = true;
         }
@@ -1238,8 +1234,8 @@
                      s_pos = m_continue_S_tids.begin(),
                      s_end = m_continue_S_tids.end();
                  s_pos != s_end; ++s_pos)
-              continue_packet.Format(";S{0:x-2}:{1}{2:x-}", s_pos->second,
-                                     pid_prefix, s_pos->first);
+              continue_packet.Printf(";S%2.2x:%4.4" PRIx64, s_pos->second,
+                                     s_pos->first);
           } else
             continue_packet_error = true;
         }
Index: lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.h
===================================================================
--- lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.h
+++ lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.h
@@ -339,8 +339,6 @@
 
   bool GetQXferSigInfoReadSupported();
 
-  bool GetMultiprocessSupported();
-
   LazyBool SupportsAllocDeallocMemory() // const
   {
     // Uncomment this to have lldb pretend the debug server doesn't respond to
Index: lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
===================================================================
--- lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
+++ lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
@@ -181,12 +181,6 @@
   return m_supports_qXfer_siginfo_read == eLazyBoolYes;
 }
 
-bool GDBRemoteCommunicationClient::GetMultiprocessSupported() {
-  if (m_supports_memory_tagging == eLazyBoolCalculate)
-    GetRemoteQSupported();
-  return m_supports_multiprocess == eLazyBoolYes;
-}
-
 uint64_t GDBRemoteCommunicationClient::GetRemoteMaxPacketSize() {
   if (m_max_packet_size == 0) {
     GetRemoteQSupported();
@@ -1520,7 +1514,7 @@
     }
   }
 
-  if (GetMultiprocessSupported()) {
+  if (m_supports_multiprocess) {
     // Some servers (e.g. qemu) require specifying the PID even if only a single
     // process is running.
     if (pid == LLDB_INVALID_PROCESS_ID)
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to