Skip to content

Instantly share code, notes, and snippets.

@rbento
Last active May 16, 2024 00:33
Show Gist options
  • Save rbento/ee66790834264fce9a27e1da4ab8b31b to your computer and use it in GitHub Desktop.
Save rbento/ee66790834264fce9a27e1da4ab8b31b to your computer and use it in GitHub Desktop.
My personal notes on debugging

Debugging

On Windows

On Linux

Quick most used commands list

(gdb) file <filename>
(gdb) break *_start
(gdb) run
(gdb) info registers
(gdb) disassemble
(gdb) stepi
(gdb) info break
(gdb) delete <breakpoint number>
(gdb) break *<memory address>
(gdb) break *_start+<offset>
(gdb) disassemble <function label>
(gdb) print $rax
(gdb) print /d $rax
(gdb) print /x $rax
(gdb) print /t $rax
(gdb) print /c $rax
(gdb) print /f $rax
(gdb) print /d (long long) <quadword label>
(gdb) print /d *(int*) $rax

See also: https://sourceware.org/gdb/current/onlinedocs/gdb.html

Python

  • PUDB - Console based
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment