aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gdbserver/ChangeLog5
-rw-r--r--gdbserver/server.cc2
2 files changed, 6 insertions, 1 deletions
diff --git a/gdbserver/ChangeLog b/gdbserver/ChangeLog
index 96642e5..f017922 100644
--- a/gdbserver/ChangeLog
+++ b/gdbserver/ChangeLog
@@ -1,3 +1,8 @@
+2020-04-22 Hannes Domani <ssbssa@yahoo.de>
+
+ * server.cc (handle_search_memory_1): Fix gdb_read_memory return value
+ comparison.
+
2020-04-16 Tom Tromey <tromey@adacore.com>
* win32-low.cc (windows_nat::handle_access_violation): New
diff --git a/gdbserver/server.cc b/gdbserver/server.cc
index 77175ff..0672f9b 100644
--- a/gdbserver/server.cc
+++ b/gdbserver/server.cc
@@ -1103,7 +1103,7 @@ handle_search_memory_1 (CORE_ADDR start_addr, CORE_ADDR search_space_len,
: chunk_size);
if (gdb_read_memory (read_addr, search_buf + keep_len,
- nr_to_read) != search_buf_size)
+ nr_to_read) != nr_to_read)
{
warning ("Unable to access %ld bytes of target memory "
"at 0x%lx, halting search.",