GDB Search capabilities.. :)
Eli Zaretskii
eliz@delorie.com
Wed Mar 21 15:59:00 GMT 2001
> Date: Fri, 9 Mar 2001 00:01:27 +0700
> From: Fyodor <fygrave@tigerteam.net>
>
> ..
> Add in commands like ADB's for searching for patterns, etc. We should
> be able to examine and patch raw unsymboled binaries as well in gdb as
> we can in adb. (E.g. increase the timeout in /bin/login without source).
>
> and target.h:
>
> #if 0
> /* Enable this after 4.12. */
> /* Search target memory. Start at STARTADDR and take LEN bytes of
> target memory, and them with MASK, and compare to DATA. If they
> match, set *ADDR_FOUND to the address we found it at, store the data
> we found at LEN bytes starting at DATA_FOUND, and return. If
> not, add INCREMENT to the search address and keep trying until
> the search address is outside of the range [LORANGE,HIRANGE).
> If we don't find anything, set *ADDR_FOUND to (CORE_ADDR)0 and
> return. */
> void (*to_search) PARAMS ((int len, char *data, char *mask,
> CORE_ADDR startaddr, int increment,
> CORE_ADDR lorange, CORE_ADDR hirange,
> CORE_ADDR * addr_found, char *data_found));
> #define target_search(len, data, mask, startaddr, increment, lorange, hirange, addr_found, data_found) \
> (*current_target.to_search) (len, data, mask, startaddr, increment, \
FWIW, I was missing such a feature in GDB from day one. Even DOS
DEBUG has something primitive to search memory for a given byte
sequence.
More information about the Gdb
mailing list