summaryrefslogtreecommitdiff
path: root/contrib/llvm-project/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServer.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2020-01-23 21:36:25 +0000
committerDimitry Andric <dim@FreeBSD.org>2020-01-23 21:36:25 +0000
commit9dba64be9536c28e4800e06512b7f29b43ade345 (patch)
tree7f0f30947225ecb30ab0fdae8059a936537b0dfe /contrib/llvm-project/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServer.cpp
parent85868e8a1daeaae7a0e48effb2ea2310ae3b02c6 (diff)
parentead246455adf1a215ec2715dad6533073a6beb4e (diff)
Notes
Diffstat (limited to 'contrib/llvm-project/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServer.cpp')
-rw-r--r--contrib/llvm-project/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServer.cpp12
1 files changed, 5 insertions, 7 deletions
diff --git a/contrib/llvm-project/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServer.cpp b/contrib/llvm-project/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServer.cpp
index 49cbeb023fd5..ac6ecffcf854 100644
--- a/contrib/llvm-project/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServer.cpp
+++ b/contrib/llvm-project/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServer.cpp
@@ -59,14 +59,13 @@ GDBRemoteCommunicationServer::GetPacketAndSendResponse(
break;
case StringExtractorGDBRemote::eServerPacketType_unimplemented:
- packet_result = SendUnimplementedResponse(packet.GetStringRef().c_str());
+ packet_result = SendUnimplementedResponse(packet.GetStringRef().data());
break;
default:
auto handler_it = m_packet_handlers.find(packet_type);
if (handler_it == m_packet_handlers.end())
- packet_result =
- SendUnimplementedResponse(packet.GetStringRef().c_str());
+ packet_result = SendUnimplementedResponse(packet.GetStringRef().data());
else
packet_result = handler_it->second(packet, error, interrupt, quit);
break;
@@ -139,10 +138,9 @@ GDBRemoteCommunication::PacketResult
GDBRemoteCommunicationServer::SendIllFormedResponse(
const StringExtractorGDBRemote &failed_packet, const char *message) {
Log *log(ProcessGDBRemoteLog::GetLogIfAllCategoriesSet(GDBR_LOG_PACKETS));
- if (log)
- log->Printf("GDBRemoteCommunicationServer::%s: ILLFORMED: '%s' (%s)",
- __FUNCTION__, failed_packet.GetStringRef().c_str(),
- message ? message : "");
+ LLDB_LOGF(log, "GDBRemoteCommunicationServer::%s: ILLFORMED: '%s' (%s)",
+ __FUNCTION__, failed_packet.GetStringRef().data(),
+ message ? message : "");
return SendErrorResponse(0x03);
}