[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
This commit is contained in:
Jaydeep Patil 2015-08-13 03:46:36 +00:00
parent 725666cc65
commit 1142f83ce2
1 changed files with 15 additions and 0 deletions

View File

@ -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;