Last active
May 23, 2019 07:22
-
-
Save CaptBoykin/8124b7607c78f123221df0e861011b12 to your computer and use it in GitHub Desktop.
Simple hook-stops for GDB
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
set disassembly-flavor intel | |
unset env LINES | |
unset env COLUMNS | |
// if x86 | |
define hook-stop | |
echo \n=========================================\n | |
i r $eax $ebx $ecx $edx $edi $esi $ebp | |
echo =========================================\n | |
x/5i $pc-5 | |
echo =========================================\n | |
x/5i $esp | |
echo =========================================\n | |
x/20xw $esp | |
echo =========================================\n\n | |
end | |
// if x86_64 | |
define hook-stop | |
echo \n=========================================\n | |
i r $rax $rbx $rcx $rdx $rdi $rsi $rbp | |
echo =========================================\n | |
x/10i $pc-5 | |
echo =========================================\n | |
x/5i $rsp | |
echo =========================================\n | |
x/20xw $rsp | |
echo =========================================\n\n | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment