summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp
diff options
context:
space:
mode:
authorPavel Labath <pavel@labath.sk>2019-02-12 14:28:55 +0000
committerPavel Labath <pavel@labath.sk>2019-02-12 14:28:55 +0000
commit7f815a9a427d149604ec7cfececee132c21b7505 (patch)
tree3eff5617f5748f455e23f3a9ba81ce0f86694402 /lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp
parent6597fdd508f248f8bbb70b6fbf34b940677f2767 (diff)
downloadbcm5719-llvm-7f815a9a427d149604ec7cfececee132c21b7505.tar.gz
bcm5719-llvm-7f815a9a427d149604ec7cfececee132c21b7505.zip
Have Stream::PutCStringAsRawHex8 take llvm::StringRef
This enables the function to be called with a StringRef without jumping through any hoops. I rename the function to "PutStringAsRawHex8" to honor the extended interface. I also remove ".c_str()" from any calls to this function I could find. llvm-svn: 353841
Diffstat (limited to 'lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp')
-rw-r--r--lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp
index 857f428d7b7..c4b5c69f761 100644
--- a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp
+++ b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp
@@ -622,7 +622,7 @@ GDBRemoteCommunicationServerLLGS::SendStopReplyPacketForThread(
} else {
// The thread name contains special chars, send as hex bytes.
response.PutCString("hexname:");
- response.PutCStringAsRawHex8(thread_name.c_str());
+ response.PutStringAsRawHex8(thread_name);
}
response.PutChar(';');
}
@@ -662,7 +662,7 @@ GDBRemoteCommunicationServerLLGS::SendStopReplyPacketForThread(
response.PutCString("jstopinfo:");
StreamString unescaped_response;
threads_info_sp->Write(unescaped_response);
- response.PutCStringAsRawHex8(unescaped_response.GetData());
+ response.PutStringAsRawHex8(unescaped_response.GetData());
response.PutChar(';');
} else
LLDB_LOG(log, "failed to prepare a jstopinfo field for pid {0}",
@@ -763,7 +763,7 @@ GDBRemoteCommunicationServerLLGS::SendStopReplyPacketForThread(
if (!description.empty()) {
// Description may contains special chars, send as hex bytes.
response.PutCString("description:");
- response.PutCStringAsRawHex8(description.c_str());
+ response.PutStringAsRawHex8(description);
response.PutChar(';');
} else if ((tid_stop_info.reason == eStopReasonException) &&
tid_stop_info.details.exception.type) {
@@ -1340,7 +1340,7 @@ GDBRemoteCommunicationServerLLGS::Handle_qGetWorkingDir(
FileSpec working_dir{m_process_launch_info.GetWorkingDirectory()};
if (working_dir) {
StreamString response;
- response.PutCStringAsRawHex8(working_dir.GetCString());
+ response.PutStringAsRawHex8(working_dir.GetCString());
return SendPacketNoLock(response.GetString());
}
@@ -2425,7 +2425,7 @@ GDBRemoteCommunicationServerLLGS::Handle_qMemoryRegionInfo(
// Return the error message.
response.PutCString("error:");
- response.PutCStringAsRawHex8(error.AsCString());
+ response.PutStringAsRawHex8(error.AsCString());
response.PutChar(';');
} else {
// Range start and size.
@@ -2453,7 +2453,7 @@ GDBRemoteCommunicationServerLLGS::Handle_qMemoryRegionInfo(
ConstString name = region_info.GetName();
if (name) {
response.PutCString("name:");
- response.PutCStringAsRawHex8(name.AsCString());
+ response.PutStringAsRawHex8(name.AsCString());
response.PutChar(';');
}
}
OpenPOWER on IntegriCloud