[Lldb-commits] [PATCH] D34945: Adding Support for Error Strings in Remote Packets

Pavel Labath via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Wed Jul 5 08:19:38 PDT 2017


labath added inline comments.


================
Comment at: source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp:3176
 
+  EnableErrorStringInPacket();
   StreamGDBRemote escaped_packet;
----------------
I don't like how every packet function needs to enable this manually.  Every function can benefit from this. Can we just set this once at startup, when we probe other server features?


================
Comment at: source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServer.cpp:113
+  if (m_send_error_strings)
+    return SendPacketNoLock(llvm::formatv("E{0:x-2};{1}", error.GetError(), error).str());
+  else
----------------
Doesn't look like this is hex-encoding.


================
Comment at: source/Utility/StringExtractorGDBRemote.cpp:467
+    if (str_index != std::string::npos)
+      error_messg = m_packet.substr(++str_index);
+
----------------
This doesn't look like hex-encoding.


https://reviews.llvm.org/D34945





More information about the lldb-commits mailing list