Remove some dead code from handle_search_memory
authorTom Tromey <tromey@adacore.com>
Wed, 7 Oct 2020 18:07:55 +0000 (12:07 -0600)
committerTom Tromey <tromey@adacore.com>
Wed, 7 Oct 2020 18:07:56 +0000 (12:07 -0600)
handle_search_memory had some code after a call to error.  This code
is dead, and this patch removes it.

gdbserver/ChangeLog
2020-10-07  Tom Tromey  <tromey@adacore.com>

* server.cc (handle_search_memory): Remove dead code.

gdbserver/ChangeLog
gdbserver/server.cc

index a341693776cd641723af5194140371a7536e3997..553a00e5cc68bf252b4b1c4e2a3bcaa69b6b980d 100644 (file)
@@ -1,3 +1,7 @@
+2020-10-07  Tom Tromey  <tromey@adacore.com>
+
+       * server.cc (handle_search_memory): Remove dead code.
+
 2020-10-07  Tom Tromey  <tromey@adacore.com>
 
        * server.cc (handle_search_memory_1): Remove.
index 86c9a6f22b811cb268516ccc230289da931574ab..4a211a481873371adccb287546a3d3bd6d558bc0 100644 (file)
@@ -1056,11 +1056,8 @@ handle_search_memory (char *own_buf, int packet_len)
 
   pattern = (gdb_byte *) malloc (packet_len);
   if (pattern == NULL)
-    {
-      error ("Unable to allocate memory to perform the search");
-      strcpy (own_buf, "E00");
-      return;
-    }
+    error ("Unable to allocate memory to perform the search");
+
   if (decode_search_memory_packet (own_buf + cmd_name_len,
                                   packet_len - cmd_name_len,
                                   &start_addr, &search_space_len,
@@ -1068,8 +1065,6 @@ handle_search_memory (char *own_buf, int packet_len)
     {
       free (pattern);
       error ("Error in parsing qSearch:memory packet");
-      strcpy (own_buf, "E00");
-      return;
     }
 
   auto read_memory = [] (CORE_ADDR addr, gdb_byte *result, size_t len)
This page took 0.034905 seconds and 4 git commands to generate.