PATCH: fix PR gdb/10783

Sandra Loosemore sandra@codesourcery.com
Thu Oct 29 18:27:00 GMT 2009


We had a customer bug report that the GDB find command was not correctly finding 
things given a large search range.  This was using gdbserver on an 
arm-none-linux-gnueabi target.  I independently tracked this down to the same 
problem reported in PR 10783 -- it affects the target-side gdbserver search code 
as well as the server-side simple_search_memory function.  The attached patch 
fixes both places.  Note that the version of the patch attached to the issue 
also didn't correctly handle the keep_len != 0 case (e.g., find/w instead of 
find/b).

I tested this with the arm-none-linux-gnueabi gdbserver case using lots of 
different combinations of search ranges to verify that it was correctly finding 
and reporting the match no matter what the offset within the range.

OK to check in?

-Sandra


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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gdb.patch
Type: text/x-patch
Size: 1231 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/gdb-patches/attachments/20091029/357c2147/attachment.bin>


More information about the Gdb-patches mailing list