Author: jaydeep
Date: Wed Aug 12 22:46:36 2015
New Revision: 244866
URL: http://llvm.org/viewvc/llvm-project?rev=244866&view=rev
Log:
[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/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=244866&r1=244865&r2=244866&view=diff
==============================================================================
---
lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
(original)
+++
lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
Wed Aug 12 22:46:36 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;
_______________________________________________
lldb-commits mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits