summaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorSandra Loosemore <sandra@codesourcery.com>2009-10-29 20:12:24 +0000
committerSandra Loosemore <sandra@codesourcery.com>2009-10-29 20:12:24 +0000
commitac37f83b922d346e8dc531c9b36b3ea9ef8fd4e1 (patch)
treeaa71748b9f8309acf99d492d0f93768c18e448af /gdb
parentf86f9b604fdc44d0d6a4ce94cd3ea3894cf7ebfc (diff)
downloadgdb-ac37f83b922d346e8dc531c9b36b3ea9ef8fd4e1.tar.gz
2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
PR gdb/10783 gdb/ * target.c (simple_search_memory): Correct read_addr initialization in loop for searching subsequent chunks. gdb/gdbserver/ * server.c (handle_search_memory_1): Correct read_addr initialization in loop for searching subsequent chunks.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog7
-rw-r--r--gdb/gdbserver/ChangeLog7
-rw-r--r--gdb/gdbserver/server.c2
-rw-r--r--gdb/target.c2
4 files changed, 16 insertions, 2 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index fe28f95a72b..5b02b0e724c 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,10 @@
+2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
+
+ PR gdb/10783
+
+ * target.c (simple_search_memory): Correct read_addr initialization
+ in loop for searching subsequent chunks.
+
2009-10-28 Daniel Jacobowitz <dan@codesourcery.com>
Reported by Antti Hatala <ahatala@nvidia.com>.
diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog
index fceb900c4f7..5a83c8fa636 100644
--- a/gdb/gdbserver/ChangeLog
+++ b/gdb/gdbserver/ChangeLog
@@ -1,3 +1,10 @@
+2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
+
+ PR gdb/10783
+
+ * server.c (handle_search_memory_1): Correct read_addr initialization
+ in loop for searching subsequent chunks.
+
2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
* configure.ac: New --with-libthread-db option.
diff --git a/gdb/gdbserver/server.c b/gdb/gdbserver/server.c
index 9bf4f3dbd00..14bc7e752ed 100644
--- a/gdb/gdbserver/server.c
+++ b/gdb/gdbserver/server.c
@@ -557,7 +557,7 @@ handle_search_memory_1 (CORE_ADDR start_addr, CORE_ADDR search_space_len,
if (search_space_len >= pattern_len)
{
unsigned keep_len = search_buf_size - chunk_size;
- CORE_ADDR read_addr = start_addr + keep_len;
+ CORE_ADDR read_addr = start_addr + chunk_size + keep_len;
int nr_to_read;
/* Copy the trailing part of the previous iteration to the front
diff --git a/gdb/target.c b/gdb/target.c
index 21db30c35c2..fc247309515 100644
--- a/gdb/target.c
+++ b/gdb/target.c
@@ -2305,7 +2305,7 @@ simple_search_memory (struct target_ops *ops,
if (search_space_len >= pattern_len)
{
unsigned keep_len = search_buf_size - chunk_size;
- CORE_ADDR read_addr = start_addr + keep_len;
+ CORE_ADDR read_addr = start_addr + chunk_size + keep_len;
int nr_to_read;
/* Copy the trailing part of the previous iteration to the front