[Lldb-commits] [PATCH] D11519: [MIPS] Use qfThreadID if qC packet is not supported by target

Jaydeep Patil jaydeep.patil at imgtec.com
Tue Jul 28 20:51:38 PDT 2015


jaydeep added inline comments.

================
Comment at: source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp:1462-1476
@@ -1461,2 +1461,17 @@
         }
+
+        // If we don't get a response for $qC, check if $qfThreadID gives us a result.
+        if (m_curr_pid == LLDB_INVALID_PROCESS_ID)
+        {
+            std::vector<lldb::tid_t> thread_ids;
+            bool sequence_mutex_unavailable;
+            size_t size;
+            size = GetCurrentThreadIDs (thread_ids, sequence_mutex_unavailable);
+            if (size && sequence_mutex_unavailable == false)
+            {
+                m_curr_pid = thread_ids.front();
+                m_curr_pid_is_valid = eLazyBoolYes;
+                return m_curr_pid;
+            }
+        }
     }
----------------
clayborg wrote:
> The threads ID is not the same as a process ID on any Apple based OS. We would need make this check conditional based on the OSs that have thread IDs being the same as process IDs. Not sure if that is only linux?
We are connected to a bare-iron target (IASim in this case). We need to check whether the target OS is Unknown.



Repository:
  rL LLVM

http://reviews.llvm.org/D11519







More information about the lldb-commits mailing list