diff options
author | Jaydeep Patil <jaydeep.patil@imgtec.com> | 2015-08-13 03:46:36 +0000 |
---|---|---|
committer | Jaydeep Patil <jaydeep.patil@imgtec.com> | 2015-08-13 03:46:36 +0000 |
commit | 1142f83ce2c28012e611903635a775a8b8944580 (patch) | |
tree | c0f1b106be3e8dbac5a06eaf000426e3960b4156 /lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp | |
parent | 725666cc65f136100b6cb28ed850a712fa1eac1d (diff) | |
download | bcm5719-llvm-1142f83ce2c28012e611903635a775a8b8944580.tar.gz bcm5719-llvm-1142f83ce2c28012e611903635a775a8b8944580.zip |
[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
llvm-svn: 244866
Diffstat (limited to 'lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp')
-rw-r--r-- | lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp index 56b3a7a6ced..cd7f0fef8dc 100644 --- a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp +++ b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp @@ -1459,6 +1459,21 @@ GDBRemoteCommunicationClient::GetCurrentProcessID (bool allow_lazy) } } } + + // 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; |