Skip to content

Instantly share code, notes, and snippets.

@rw-r-r-0644
Created March 1, 2026 20:36
Show Gist options
  • Select an option

  • Save rw-r-r-0644/6427037ab16e261cf4049b64e4b90fd5 to your computer and use it in GitHub Desktop.

Select an option

Save rw-r-r-0644/6427037ab16e261cf4049b64e4b90fd5 to your computer and use it in GitHub Desktop.
setting up pwndbg in pwntools
NOTE: If you configured gdb to always include pwndbg extensions through gdbinit.py in ~/.gdbinit then this instructions aren't necessary
When using gdb.attach(), pwntools will try to load from path (in order of priority):
- pwntools-gdb
- gdb
ref: https://github.com/Gallopsled/pwntools/blob/f38991b/pwnlib/gdb.py#L755
Therefore, if we create a symlink to our desired debugger (such as pwndbg) with name pwntools-gdb, pwntools will use it in place of gdb.
You can create such a symlink by running this as root:
# ln -s "$(which pwndbg)" "$(dirname $(which pwndbg))/pwntools-gdb"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment