Last active
November 6, 2016 05:27
-
-
Save nonkr/6ac074d8439c38978905674f7c45d453 to your computer and use it in GitHub Desktop.
gdbinit
This file contains 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
set print pretty on | |
define phs | |
if $argc != 2 | |
help phs | |
else | |
set $_i = 0 | |
if $arg1 > 0 | |
echo \033[34m | |
while ($_i < $arg1) | |
printf "%02x", $arg0[$_i] & 0xFF | |
set $_i++ | |
end | |
echo \033[0m | |
printf "\n" | |
end | |
end | |
end | |
document phs | |
Display Print as a Hex Stream | |
Usage: phs <memory address> <memory size> | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment