display/10i <instruction pointer / program counter>
Break On Write-Only Access
watch <address>
Break On Read-Only Access
rwatch <address>
Break On Read-And-Write Access
awatch <address>
Setting the access-size of watchpoints
watch *(char *) <address> watch *(long long *) <address>
Disabling Breakpoints
disable <breakpoint number>
Enabling Breakpoints
enable <breakpoint number>
Hardware Breakpoints
hb *<address>hb <function name>
Viewing Registers
info registersinfo r raxinfo r rax rbx rspp/x $rax
Modifying Registers
set $rax = 0xdeadbeeff00dface
Viewing Memory
x/8xb $rsp # display the content of 8 consecutive bytes of memoryx/4xh $rsp # display the content of 4 consecutive halfwords (2 bytes each) of memory x/2xw $rsp # display the content of 2 consecutive words (4 bytes each) of memory x/1xg $rsp # display the content of 1 memory unit (the size determined by the architecture)
Modifying Memory
set {char}$rsp = 0xFFset {long long}$rsp = 0x1337bee7
Stack Backtrace
bt
Step Over
nextini
Step Into
stepisi
Step Out
finishfin
Run Until Address
until <address>u <address>
Attaching to running processes
attach <process ID>
Changing Disassembly Syntax
set disassembly-flavor intelset disassembly-flavor att