-
-
Save 0xBADCA7/e08bc803c4783d9e07b7 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
define xac | |
dont-repeat | |
set $addr = (char *)($arg0) | |
set $endaddr = $addr + $arg1 | |
while $addr < $endaddr | |
printf "%p: ", $addr | |
set $lineendaddr = $addr + 8 | |
if $lineendaddr > $endaddr | |
set $lineendaddr = $endaddr | |
end | |
set $a = $addr | |
while $a < $lineendaddr | |
printf "%#02x ", *(char *)$a | |
set $a++ | |
end | |
printf "'" | |
set $a = $addr | |
while $a < $lineendaddr | |
printf "%c", *(char *)$a | |
set $a++ | |
end | |
printf "'\n" | |
set $addr = $addr + 8 | |
end | |
end | |
document xac | |
usage: xac address count | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment