[Lldb-commits] [lldb] r313525 - Fix Linux remote debugging after r313442

Tamas Berghammer via lldb-commits lldb-commits at lists.llvm.org
Mon Sep 18 03:24:48 PDT 2017


Author: tberghammer
Date: Mon Sep 18 03:24:48 2017
New Revision: 313525

URL: http://llvm.org/viewvc/llvm-project?rev=313525&view=rev
Log:
Fix Linux remote debugging after r313442

On Linux lldb-server sends an OK response to qfThreadInfo if no process
is started yet. I don't know why would LLDB issue a qfThreadInfo packet
before starting a process but creating a fake thread ID in case of an
OK or Error respoinse sounds bad anyway so lets not do it.

Modified:
    lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp

Modified: lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp?rev=313525&r1=313524&r2=313525&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp (original)
+++ lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp Mon Sep 18 03:24:48 2017
@@ -2624,7 +2624,8 @@ size_t GDBRemoteCommunicationClient::Get
      * tid.
      * Assume pid=tid=1 in such cases.
     */
-    if (thread_ids.size() == 0 && IsConnected()) {
+    if ((response.IsUnsupportedResponse() || response.IsNormalResponse()) &&
+        thread_ids.size() == 0 && IsConnected()) {
       thread_ids.push_back(1);
     }
   } else {




More information about the lldb-commits mailing list