[Lldb-commits] [lldb] 4a15f51 - [lldb][NFC] Simplify string literal in GDBRemoteCommunicationClient

Raphael Isemann via lldb-commits lldb-commits at lists.llvm.org
Wed Aug 26 07:25:40 PDT 2020


Author: Raphael Isemann
Date: 2020-08-26T16:25:11+02:00
New Revision: 4a15f51a4f7726e12c327fa30e76d90a2b90430b

URL: https://github.com/llvm/llvm-project/commit/4a15f51a4f7726e12c327fa30e76d90a2b90430b
DIFF: https://github.com/llvm/llvm-project/commit/4a15f51a4f7726e12c327fa30e76d90a2b90430b.diff

LOG: [lldb][NFC] Simplify string literal in GDBRemoteCommunicationClient

Added: 
    

Modified: 
    lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp

Removed: 
    


################################################################################
diff  --git a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
index 2e6d174e4674..0949b9918523 100644
--- a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
+++ b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
@@ -1701,14 +1701,9 @@ Status GDBRemoteCommunicationClient::GetWatchpointSupportInfo(uint32_t &num) {
   // Set num to 0 first.
   num = 0;
   if (m_supports_watchpoint_support_info != eLazyBoolNo) {
-    char packet[64];
-    const int packet_len =
-        ::snprintf(packet, sizeof(packet), "qWatchpointSupportInfo:");
-    assert(packet_len < (int)sizeof(packet));
-    UNUSED_IF_ASSERT_DISABLED(packet_len);
     StringExtractorGDBRemote response;
-    if (SendPacketAndWaitForResponse(packet, response, false) ==
-        PacketResult::Success) {
+    if (SendPacketAndWaitForResponse("qWatchpointSupportInfo:", response,
+                                     false) == PacketResult::Success) {
       m_supports_watchpoint_support_info = eLazyBoolYes;
       llvm::StringRef name;
       llvm::StringRef value;


        


More information about the lldb-commits mailing list