diff options
author | Jaydeep Patil <jaydeep.patil@imgtec.com> | 2015-09-16 04:04:01 +0000 |
---|---|---|
committer | Jaydeep Patil <jaydeep.patil@imgtec.com> | 2015-09-16 04:04:01 +0000 |
commit | 003615b772626747dcbfbe45265065835e94dc30 (patch) | |
tree | 561d6e00c48ee761098eb376481d3abe5889d4e7 /lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp | |
parent | 5db36df4d0d37152c609af24b659f547acb93ea8 (diff) | |
download | llvm-003615b772626747dcbfbe45265065835e94dc30.zip llvm-003615b772626747dcbfbe45265065835e94dc30.tar.gz llvm-003615b772626747dcbfbe45265065835e94dc30.tar.bz2 |
[LLDB][MIPS] Debug bare-iron targets lacking support for qC /qfThreadInfo
SUMMARY:
Refer to http://lists.llvm.org/pipermail/lldb-dev/2015-August/008024.html for discussion
on this topic. Bare-iron target like YAMON gdb-stub does not support qProcessInfo, qC,
qfThreadInfo, Hg and Hc packets. Reply from ? packet is as simple as S05. There is no
packet which gives us process or threads information. In such cases, assume pid=tid=1.
Reviewers: clayborg
Subscribers: nitesh.jain, mohit.bhakkad, sagar, bhushan and lldb-commits
Differential Revision: http://reviews.llvm.org/D12876
llvm-svn: 247773
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 ab0867d..52781d7 100644 --- a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp +++ b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp @@ -3396,6 +3396,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.IsNormalResponse() && IsConnected()) + { + m_curr_tid = 1; + return true; + } } return false; } @@ -3422,6 +3433,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.IsNormalResponse() && IsConnected()) + { + m_curr_tid_run = 1; + return true; + } } return false; } @@ -3547,6 +3569,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.IsNormalResponse() && thread_ids.size() == 0 && IsConnected()) + { + thread_ids.push_back (1); + } } else { |