clayborg requested changes to this revision.
clayborg added a comment.
This revision now requires changes to proceed.

Any other OSs other than Linux have process IDs being the same as thread IDs? 
The code added should be properly made conditional based on linux and any other 
OSs where this holds true.


================
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;
+            }
+        }
     }
----------------
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?


Repository:
  rL LLVM

http://reviews.llvm.org/D11519




_______________________________________________
lldb-commits mailing list
lldb-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits

Reply via email to