Author: hans
Date: Thu Aug 13 17:11:42 2015
New Revision: 244967

URL: http://llvm.org/viewvc/llvm-project?rev=244967&view=rev
Log:
Merging r244866:
------------------------------------------------------------------------
r244866 | jaydeep | 2015-08-12 20:46:36 -0700 (Wed, 12 Aug 2015) | 7 lines

[LLDB][MIPS] Use qfThreadID if qC packet is not supported by target
    SUMMARY:
    The patch uses qfThreadID to get the thread IDs if qC packet is not 
supported by target.
    
    Reviewers: jingham, clayborg
    Subscribers: nitesh.jain, mohit.bhakkad, sagar, bhushan and lldb-commits
    Differential Revision: http://reviews.llvm.org/D11519
------------------------------------------------------------------------

Modified:
    lldb/branches/release_37/   (props changed)
    
lldb/branches/release_37/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp

Propchange: lldb/branches/release_37/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Aug 13 17:11:42 2015
@@ -1,3 +1,3 @@
 /lldb/branches/apple/python-GIL:156467-162159
 /lldb/branches/iohandler:198360-200250
-/lldb/trunk:242306,242381,242525,242529,243091,243618,244006,244864-244865
+/lldb/trunk:242306,242381,242525,242529,243091,243618,244006,244864-244866

Modified: 
lldb/branches/release_37/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/branches/release_37/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp?rev=244967&r1=244966&r2=244967&view=diff
==============================================================================
--- 
lldb/branches/release_37/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
 (original)
+++ 
lldb/branches/release_37/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
 Thu Aug 13 17:11:42 2015
@@ -1459,6 +1459,21 @@ GDBRemoteCommunicationClient::GetCurrent
                 }
             }
         }
+
+        // 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;


_______________________________________________
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

Reply via email to