[Lldb-commits] [lldb] r247968 - [LLDB][MIPS] Debug bare-iron targets lacking support for qC /qfThreadInfo
Jaydeep Patil via lldb-commits
lldb-commits at lists.llvm.org
Thu Sep 17 22:32:54 PDT 2015
Author: jaydeep
Date: Fri Sep 18 00:32:54 2015
New Revision: 247968
URL: http://llvm.org/viewvc/llvm-project?rev=247968&view=rev
Log:
[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
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=247968&r1=247967&r2=247968&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp (original)
+++ lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp Fri Sep 18 00:32:54 2015
@@ -3400,6 +3400,17 @@ GDBRemoteCommunicationClient::SetCurrent
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::SetCurrent
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::GetCurrent
} 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
{
More information about the lldb-commits
mailing list