xbfunc.gdb (288B)
1 define xbfunc 2 dont-repeat 3 4 set $addr = (char *)($arg0) 5 set $end = $addr + $arg1 6 7 while $addr < $end 8 printf "%02x ", *(unsigned char *)$addr 9 set $addr++ 10 end 11 end 12 13 document xbfunc 14 usage: xbfunc addr n 15 outputs n bytes in hex (without leading 0x), starting at addr 16 end