Skip to content

GDB and pwndbg command glossary

Use this page as a quick lookup. For command groups and longer workflows, open the GDB guide or the pwndbg overview. The help output in your installed version is authoritative when an extension’s syntax differs.

Command and syntax Example What it does / when to use it
run [args] run --verbose Starts or restarts the program. Use it to reproduce behavior from a clean start.
start start Runs to main when symbols permit. Use it for a convenient first stop.
starti starti Stops at the first instruction. Use it when symbols are missing or startup code matters.
break LOCATION break *main+36 Stops at a function, source line, or instruction address. Use it before inspecting a specific path.
continue / c c Resumes until another breakpoint, signal, or exit. Use it after inspecting a stop.
nexti / ni ni Executes one machine instruction and steps over calls. Use it to follow control flow without entering a function.
stepi / si si Executes one machine instruction and enters calls. Use it when the call target itself matters.
finish finish Runs until the current function returns. Use it to get back to the caller.
print EXPR / p p/x $rax Evaluates a variable or expression; /x formats hex. Use it for a known variable or register value.
info registers info registers Prints general-purpose registers. Use it after a crash or before/after a call.
x/nfu ADDRESS x/32bx $rsp Examines memory. Use b for bytes, g for 8-byte units, x for hex, and i for instructions.
disassemble LOCATION disassemble main Prints machine instructions for a function or range. Use it to inspect a path Ghidra identified.
bt bt Shows the active call stack. Use it to find the function chain at a stop.
info proc mappings info proc mappings Lists mapped regions and permissions on supported systems. Use it to locate the executable, libraries, stack, and heap.
help COMMAND / apropos WORD help x; apropos breakpoint Shows syntax or searches GDB command descriptions. Use it when a flag or abbreviation is unfamiliar.

x means examine; n is the count; f is the display format; u is the unit size. For example, x/32bx $rsp prints 32 byte-sized values in hexadecimal at the stack pointer. See GDB memory examination.

Command and syntax Example What it does / when to use it
context context Shows pwndbg’s stop summary, commonly registers, code, and stack. Use it after a breakpoint or step to refresh your overview.
regs regs Displays registers in a compact format. Use it when checking arguments, RIP, or RSP.
nearpc [ADDRESS] nearpc $rip Shows nearby instructions. Use it for a quick view around the current instruction pointer; check help nearpc for accepted arguments.
telescope ADDRESS [COUNT] telescope $rsp 16 Displays memory while following values that look like pointers. Use it to inspect a stack or pointer argument; use GDB x for exact raw bytes.
stack stack Shows a compact stack view. Use it for a quick orientation, then inspect specific bytes with x/.
vmmap vmmap Lists process mappings and permissions. Use it to check where an address belongs and whether a region is executable.
checksec checksec Summarizes binary protections. Use it before choosing an address-dependent technique.
canary canary Searches for stack-protector canary values in the process. Use it as an inspection aid; finding a canary does not mean the program leaks it.
help COMMAND help telescope Displays the installed extension’s syntax. Use it whenever a pwndbg command differs from this quick reference.

context is a fresh view of the latest debugger stop; an earlier block of terminal output does not update. For a reliable stack refresh sequence, step once, then inspect the registers, stack, and nearby instructions again.