summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
diff options
context:
space:
mode:
authorJason Molenda <jmolenda@apple.com>2014-05-06 02:59:39 +0000
committerJason Molenda <jmolenda@apple.com>2014-05-06 02:59:39 +0000
commitbdc4f12f1996a3070da0a24b469da9bf93f544dd (patch)
treeeb41453fe5f3403f1bd4176d5af61fec769c6813 /lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
parent018ff31462e85ac9a0bdd0e55bfe6c86ecd99657 (diff)
downloadbcm5719-llvm-bdc4f12f1996a3070da0a24b469da9bf93f544dd.tar.gz
bcm5719-llvm-bdc4f12f1996a3070da0a24b469da9bf93f544dd.zip
Add GetxPacketSupported to test if the 'x' packet is supported.
<rdar://problem/16032150> llvm-svn: 208052
Diffstat (limited to 'lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp')
-rw-r--r--lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
index cdc51ec8a2d..0b642733414 100644
--- a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
+++ b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
@@ -67,6 +67,7 @@ GDBRemoteCommunicationClient::GDBRemoteCommunicationClient(bool is_platform) :
m_attach_or_wait_reply(eLazyBoolCalculate),
m_prepare_for_reg_writing_reply (eLazyBoolCalculate),
m_supports_p (eLazyBoolCalculate),
+ m_supports_x (eLazyBoolCalculate),
m_avoid_g_packets (eLazyBoolCalculate),
m_supports_QSaveRegisterState (eLazyBoolCalculate),
m_supports_qXfer_auxv_read (eLazyBoolCalculate),
@@ -304,6 +305,7 @@ GDBRemoteCommunicationClient::ResetDiscoverableSettings()
m_supports_vCont_s = eLazyBoolCalculate;
m_supports_vCont_S = eLazyBoolCalculate;
m_supports_p = eLazyBoolCalculate;
+ m_supports_x = eLazyBoolCalculate;
m_supports_QSaveRegisterState = eLazyBoolCalculate;
m_qHostInfo_is_valid = eLazyBoolCalculate;
m_qProcessInfo_is_valid = eLazyBoolCalculate;
@@ -490,6 +492,24 @@ GDBRemoteCommunicationClient::GetpPacketSupported (lldb::tid_t tid)
return m_supports_p;
}
+bool
+GDBRemoteCommunicationClient::GetxPacketSupported ()
+{
+ if (m_supports_x == eLazyBoolCalculate)
+ {
+ StringExtractorGDBRemote response;
+ m_supports_x = eLazyBoolNo;
+ char packet[256];
+ snprintf (packet, sizeof (packet), "x0,0");
+ if (SendPacketAndWaitForResponse(packet, response, false) == PacketResult::Success)
+ {
+ if (response.IsOKResponse())
+ m_supports_x = eLazyBoolYes;
+ }
+ }
+ return m_supports_x;
+}
+
GDBRemoteCommunicationClient::PacketResult
GDBRemoteCommunicationClient::SendPacketsAndConcatenateResponses
(
OpenPOWER on IntegriCloud