aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp
diff options
context:
space:
mode:
authorZachary Turner <zturner@google.com>2016-08-30 18:12:11 +0000
committerZachary Turner <zturner@google.com>2016-08-30 18:12:11 +0000
commitd08f09c1130acc528cf5f417bcf9f9de4dd4b27d (patch)
treecbf9510969c7484ad4296d217397b361ca1d63f4 /lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp
parentb7668d516443231cba62e29786463587b61f90bb (diff)
downloadllvm-d08f09c1130acc528cf5f417bcf9f9de4dd4b27d.zip
llvm-d08f09c1130acc528cf5f417bcf9f9de4dd4b27d.tar.gz
llvm-d08f09c1130acc528cf5f417bcf9f9de4dd4b27d.tar.bz2
Convert some StringExtractor functions to accept MutableArrayRefs.
MutableArrayRef<T> is essentially a safer version of passing around (T*, length) pairs and provides some convenient functions for working with the data without having to manually manipulate indices. This is a minor NFC. llvm-svn: 280123
Diffstat (limited to 'lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp')
-rw-r--r--lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp
index 4f632c9..81c54ed 100644
--- a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp
+++ b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp
@@ -1794,7 +1794,7 @@ GDBRemoteCommunicationServerLLGS::Handle_P (StringExtractorGDBRemote &packet)
// Parse out the value.
uint8_t reg_bytes[32]; // big enough to support up to 256 bit ymmN register
- size_t reg_size = packet.GetHexBytesAvail (reg_bytes, sizeof(reg_bytes));
+ size_t reg_size = packet.GetHexBytesAvail (reg_bytes);
// Get the thread to use.
NativeThreadProtocolSP thread_sp = GetThreadFromSuffix (packet);
@@ -1939,10 +1939,10 @@ GDBRemoteCommunicationServerLLGS::Handle_I (StringExtractorGDBRemote &packet)
}
packet.SetFilePos (::strlen("I"));
- char tmp[4096];
+ uint8_t tmp[4096];
for (;;)
{
- size_t read = packet.GetHexBytesAvail(tmp, sizeof(tmp));
+ size_t read = packet.GetHexBytesAvail(tmp);
if (read == 0)
{
break;
@@ -2118,7 +2118,7 @@ GDBRemoteCommunicationServerLLGS::Handle_M (StringExtractorGDBRemote &packet)
// Convert the hex memory write contents to bytes.
StreamGDBRemote response;
- const uint64_t convert_count = packet.GetHexBytes(&buf[0], byte_count, 0);
+ const uint64_t convert_count = packet.GetHexBytes(buf, 0);
if (convert_count != byte_count)
{
if (log)