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

Jaydeep Patil jaydeep.patil at imgtec.com
Sun Jul 26 23:12:24 PDT 2015


jaydeep created this revision.
jaydeep added a reviewer: clayborg.
jaydeep added subscribers: lldb-commits, bhushan, sagar, mohit.bhakkad, nitesh.jain.
jaydeep set the repository for this revision to rL LLVM.

The patch uses qfThreadID to get the thread IDs if qC packet is not supported by target.

Repository:
  rL LLVM

http://reviews.llvm.org/D11519

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

Index: source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
===================================================================
--- source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
+++ source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
@@ -1459,6 +1459,21 @@
                 }
             }
         }
+
+        // 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;
+            }
+        }
     }
     
     return LLDB_INVALID_PROCESS_ID;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D11519.30677.patch
Type: text/x-patch
Size: 1001 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20150727/1ae06482/attachment.bin>


More information about the lldb-commits mailing list