Hi all,

I'm using an older version of a cross-platform GDB build (7.0.1 based).  Having 
to use the "find" command a lot, as I do, is a pain because it seem to always 
have been broken and never fixed (?).  The problem is that "find" sometimes 
works, but often returns bogus matches.  I came across an old dormant problem 
report, Bugzilla - Bug 11158 "find command returns bogus results", but I've 
never seen any fixes for this.

So I took it upon myself to fix this, and after looking at the source code, 
doing some debugging, and identifying multiple issues, I came to the conclusion 
that it's best to rewrite the function simple_search_memory() in gdb/target.c.  
I did that and I believe it's now works properly.

I did look at the latest version, 7.4, and there is one minor change in that 
function which looks to be an attempt at a fix. I didn't try this out, but I 
have my doubts that this is a correct fix, nor does it address other issues I 
noticed in the function.

Anyone interested in the getting my update?  I'd be happy to forward it.

BTW, I also would like to enhance "find" so that it doesn't just stop when it 
encounters an invalid region of memory, but skips past it (with a warning) if 
there is valid memory at a higher address within the specified range.  This 
would be really useful for scanning all of the heap memory in a process, which 
is often disjoint with numerous gaps in between memory segments.  The current 
need to repeat the "find" many times with different ranges is very awkward.  
Any thoughts on this?

Best regards,
Ray
_______________________________________________
bug-gdb mailing list
bug-gdb@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-gdb

Reply via email to