This is the mail archive of the gdb-prs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug gdb/17756] gdb find command returns bogus results and can't find the matched value.


https://sourceware.org/bugzilla/show_bug.cgi?id=17756

Pedro Alves <palves at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |palves at redhat dot com

--- Comment #3 from Pedro Alves <palves at redhat dot com> ---
Looks like an off-by-one -- GDB requests one byte-too-much?

(gdb) info proc mappings 
process 8283
Mapped address spaces:

      0x7ffffffdd000     0x7ffffffff000    0x22000        0x0 [stack]
(gdb) find /b 0x7ffffffdd000, 0x7ffffffff000, 0xa5
warning: Unable to access 11265 bytes of target memory at 0x7fffffffc400,      
halting search.
Pattern not found.
(gdb) p /x 0x7fffffffc400 + 11265
$1 = 0x7ffffffff001
(gdb)

The problem is probably in gdb/target.c:simple_search_memory.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]