pwndbg overview
pwndbg extends GDB with compact views and commands useful for binary analysis. It remains GDB: use GDB’s help and apropos for standard commands, and pwndbg’s help or theme for extension behavior. Output can differ across pwndbg versions and themes.
For a one-screen lookup of command syntax, example usage, and when each command is useful, see the GDB and pwndbg command glossary.
Start with a local binary
Section titled “Start with a local binary”gdb -q ./challset disassembly-flavor intelstartcontextWhen execution stops, the context view commonly includes registers, nearby disassembly, stack data, and code references. If it is not shown, inspect context settings and use direct commands such as regs, nearpc, and telescope.
A reliable first pass
Section titled “A reliable first pass”- Run
checksecto record the binary’s protections. - Start at
main, or usestartiwhen symbols are missing. - Locate input-handling code with Ghidra, then set a breakpoint around the relevant function.
- Step with
niorsi; inspect values and memory after each meaningful operation. - On a crash, inspect the instruction pointer, stack pointer, and saved control data before restarting.
Pick a focused page
Section titled “Pick a focused page”- Breakpoints and run control
- Registers, values, and stack
- Disassembly and memory views
- Patterns and utility commands
Command reminder
Section titled “Command reminder”| Goal | GDB command | pwndbg command/view |
|---|---|---|
| Start or continue | run, continue |
same |
| Break at a function | break main |
same |
| Step one instruction | ni, si |
same |
| Show current stop summary | GDB has separate register/stack commands | context |
| Show registers | info registers |
regs |
| Disassemble nearby code | x/12i $rip |
nearpc |
| Inspect pointed-to data | x/32gx $rsp |
telescope $rsp |
| Show process mappings | info proc mappings |
vmmap |
context refreshes pwndbg’s summary after each stop. regs prints register values, nearpc prints instructions around the current instruction pointer, telescope follows pointer-like values in memory, and vmmap lists the process’s memory mappings. The focused pages below explain the arguments and when each view is useful.
Command names and arguments can change. Use help COMMAND in the installed version when a command behaves differently from these examples.
Official reference
Section titled “Official reference”pwndbg documentation and its command reference are the source of truth for the installed release.