summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp
diff options
context:
space:
mode:
authorZachary Turner <zturner@google.com>2016-08-30 19:47:05 +0000
committerZachary Turner <zturner@google.com>2016-08-30 19:47:05 +0000
commit2d240d00dabf49c7688a4f564adc410dae187500 (patch)
tree3697e3c6d2aead0de6b31a782e8c9eccdda20c52 /lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp
parent0af717970c1f023e8ac327aa5ecde6c369b069db (diff)
downloadbcm5719-llvm-2d240d00dabf49c7688a4f564adc410dae187500.tar.gz
bcm5719-llvm-2d240d00dabf49c7688a4f564adc410dae187500.zip
A few minor stylistic cleanups in StringExtractor.
Makes Peek() return a StringRef instead of a const char*. This leads to a few callers of Peek() being able to be made a little nicer (for example using StringRef member functions instead of c-style strncmp and related functions) and generally safer usage. llvm-svn: 280139
Diffstat (limited to 'lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp')
-rw-r--r--lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp
index 3361ffaeea7..5641b22b707 100644
--- a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp
+++ b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp
@@ -966,7 +966,7 @@ GDBRemoteCommunicationServerCommon::Handle_QEnvironmentHexEncoded (StringExtract
{
std::string str;
packet.GetHexByteString(str);
- m_process_launch_info.GetEnvironmentEntries().AppendArgument(str.c_str());
+ m_process_launch_info.GetEnvironmentEntries().AppendArgument(str);
return SendOKResponse();
}
return SendErrorResponse(12);
@@ -979,8 +979,7 @@ GDBRemoteCommunicationServerCommon::Handle_QLaunchArch (StringExtractorGDBRemote
const uint32_t bytes_left = packet.GetBytesLeft();
if (bytes_left > 0)
{
- const char* arch_triple = packet.Peek();
- ArchSpec arch_spec(arch_triple,NULL);
+ ArchSpec arch_spec(packet.Peek(), nullptr);
m_process_launch_info.SetArchitecture(arch_spec);
return SendOKResponse();
}
OpenPOWER on IntegriCloud