- 论坛徽章:
- 0
|
网上找到的 ^_^ 我这个改了一下 ,原来是找32bits, 我改了找16位的. 所以有 & 0x0000ffff. 大家可以看着改。
用法:
find start end step count target
比如 find 0x40bdb001 0x41bdb001 2 1 0xe4ff
/* gdb scipt find. write it into .gdbinit */
define find
set $count=0
set $find_result=$arg0
while ((((unsigned int)$count)<((unsigned int)$arg3))&&(((unsigned int)$find_result)<=((unsigned int)$arg1)))
if ( (*(unsigned int*)$find_result & 0x0000ffff) == $arg4)
set $count = $count+1
x/wx $find_result
end
set $find_result=$find_result + $arg2
end
end
[ 本帖最后由 viton_xuan 于 2007-5-8 16:35 编辑 ] |
|