aboutsummaryrefslogtreecommitdiff
path: root/gdbserver
diff options
context:
space:
mode:
authorTom Tromey <tromey@adacore.com>2020-10-07 12:07:55 -0600
committerTom Tromey <tromey@adacore.com>2020-10-07 12:07:56 -0600
commit60b746622b07063cdaae6207dd097576eca01128 (patch)
treef0d0671126d7b9d5c247dc53f23bb50495207b1b /gdbserver
parent55b10d89a413169b2d001df701b7c08e06f955aa (diff)
downloadgdb-60b746622b07063cdaae6207dd097576eca01128.zip
gdb-60b746622b07063cdaae6207dd097576eca01128.tar.gz
gdb-60b746622b07063cdaae6207dd097576eca01128.tar.bz2
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 <tromey@adacore.com> * server.cc (handle_search_memory): Remove dead code.
Diffstat (limited to 'gdbserver')
-rw-r--r--gdbserver/ChangeLog4
-rw-r--r--gdbserver/server.cc9
2 files changed, 6 insertions, 7 deletions
diff --git a/gdbserver/ChangeLog b/gdbserver/ChangeLog
index a341693..553a00e 100644
--- a/gdbserver/ChangeLog
+++ b/gdbserver/ChangeLog
@@ -1,5 +1,9 @@
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.
(handle_search_memory): Use simple_search_memory.
diff --git a/gdbserver/server.cc b/gdbserver/server.cc
index 86c9a6f..4a211a4 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)