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.
This commit is contained in:
Sandra Loosemore 2009-10-29 20:12:26 +00:00
parent e6655fdab4
commit 8a35fb51cd
4 changed files with 16 additions and 2 deletions

View file

@ -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>.

View file

@ -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.

View file

@ -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

View file

@ -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