summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
diff options
context:
space:
mode:
authorSteve Pucci <spucci@google.com>2014-03-04 23:18:46 +0000
committerSteve Pucci <spucci@google.com>2014-03-04 23:18:46 +0000
commit03904accc0ac27177867f6f4a28b080bb604011f (patch)
treea622d33d7b87a7a25acb504c3fe39e6e978f6988 /lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
parent7a5830294f69089d1a17af34053bb8ab502be052 (diff)
downloadbcm5719-llvm-03904accc0ac27177867f6f4a28b080bb604011f.tar.gz
bcm5719-llvm-03904accc0ac27177867f6f4a28b080bb604011f.zip
Add ProcessGDBRemote::GetAuxvData() and fix multiple-packet concatenation for binary data.
ProcessGDBRemote::GetAuxvData obtains the auxv from a remote gdbserver (via a binary-data packet), and returns the data as a DataBufferSP. The patch includes a small fix to GDBRemoteCommunicationClient::SendPacketsAndConcatenateResponses() to support binary file format packet returns (by not assuming each binary packet is a null-terminated string when concatenating them). llvm-svn: 202907
Diffstat (limited to 'lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp')
-rw-r--r--lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
index 800bd257061..604906e2a85 100644
--- a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
+++ b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
@@ -3060,6 +3060,19 @@ ProcessGDBRemote::GetDynamicLoader ()
return m_dyld_ap.get();
}
+const DataBufferSP
+ProcessGDBRemote::GetAuxvData()
+{
+ DataBufferSP buf;
+ if (m_gdb_comm.GetQXferAuxvReadSupported())
+ {
+ std::string response_string;
+ if (m_gdb_comm.SendPacketsAndConcatenateResponses("qXfer:auxv:read::", response_string) == GDBRemoteCommunication::PacketResult::Success)
+ buf.reset(new DataBufferHeap(response_string.c_str(), response_string.length()));
+ }
+ return buf;
+}
+
class CommandObjectProcessGDBRemotePacketHistory : public CommandObjectParsed
{
OpenPOWER on IntegriCloud