From: Tom Tromey Date: Wed, 7 Oct 2020 18:07:55 +0000 (-0600) Subject: Remove some dead code from handle_search_memory X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=60b746622b07063cdaae6207dd097576eca01128;p=binutils-gdb.git Remove some dead code from handle_search_memory 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 * server.cc (handle_search_memory): Remove dead code. --- diff --git a/gdbserver/ChangeLog b/gdbserver/ChangeLog index a341693776c..553a00e5cc6 100644 --- a/gdbserver/ChangeLog +++ b/gdbserver/ChangeLog @@ -1,3 +1,7 @@ +2020-10-07 Tom Tromey + + * server.cc (handle_search_memory): Remove dead code. + 2020-10-07 Tom Tromey * server.cc (handle_search_memory_1): Remove. diff --git a/gdbserver/server.cc b/gdbserver/server.cc index 86c9a6f22b8..4a211a48187 100644 --- a/gdbserver/server.cc +++ b/gdbserver/server.cc @@ -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)