diff options
author | Jaydeep Patil <jaydeep.patil@imgtec.com> | 2015-09-18 05:32:54 +0000 |
---|---|---|
committer | Jaydeep Patil <jaydeep.patil@imgtec.com> | 2015-09-18 05:32:54 +0000 |
commit | 630dd7ff3584931f8826247c8c35f31f50385906 (patch) | |
tree | f2720d8715478d4a47a6b2d4c81ee7b65ef0c5dc /lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp | |
parent | eee54b4d7c51563941de415c1c82215b4f9d5c5c (diff) | |
download | bcm5719-llvm-630dd7ff3584931f8826247c8c35f31f50385906.tar.gz bcm5719-llvm-630dd7ff3584931f8826247c8c35f31f50385906.zip |
[LLDB][MIPS] Debug bare-iron targets lacking support for qC /qfThreadInfo
SUMMARY:
Using response.IsUnsupportedResponse instead of !response.IsNormalResponse().
Reviewers: clayborg, labath
Subscribers: nitesh.jain, mohit.bhakkad, sagar, bhushan and lldb-commits
Differential Revision: http://reviews.llvm.org/D12876
llvm-svn: 247968
Diffstat (limited to 'lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp')
-rw-r--r-- | lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp index 95408073bf5..cad49efcaf5 100644 --- a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp +++ b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp @@ -3400,6 +3400,17 @@ GDBRemoteCommunicationClient::SetCurrentThread (uint64_t tid) m_curr_tid = tid; return true; } + + /* + * Connected bare-iron target (like YAMON gdb-stub) may not have support for Hg packet. + * The reply from '?' packet could be as simple as 'S05'. There is no packet which can + * give us pid and/or tid. Assume pid=tid=1 in such cases. + */ + if (response.IsUnsupportedResponse() && IsConnected()) + { + m_curr_tid = 1; + return true; + } } return false; } @@ -3426,6 +3437,17 @@ GDBRemoteCommunicationClient::SetCurrentThreadForRun (uint64_t tid) m_curr_tid_run = tid; return true; } + + /* + * Connected bare-iron target (like YAMON gdb-stub) may not have support for Hc packet. + * The reply from '?' packet could be as simple as 'S05'. There is no packet which can + * give us pid and/or tid. Assume pid=tid=1 in such cases. + */ + if (response.IsUnsupportedResponse() && IsConnected()) + { + m_curr_tid_run = 1; + return true; + } } return false; } @@ -3551,6 +3573,17 @@ GDBRemoteCommunicationClient::GetCurrentThreadIDs (std::vector<lldb::tid_t> &thr } while (ch == ','); // Make sure we got a comma separator } } + + /* + * Connected bare-iron target (like YAMON gdb-stub) may not have support for + * qProcessInfo, qC and qfThreadInfo packets. The reply from '?' packet could + * be as simple as 'S05'. There is no packet which can give us pid and/or tid. + * Assume pid=tid=1 in such cases. + */ + if (response.IsUnsupportedResponse() && thread_ids.size() == 0 && IsConnected()) + { + thread_ids.push_back (1); + } } else { |