Show Menu
Cheatography

GDB

Program control

start
Break main & run
n
Next statement (step over)
s
Step into
fin
Finish function (step out)

Stack

bt
Backtrace
frame <N>
Switch to frame #N
 

Breakp­oints

b <fn | line>
Set breakpoint
info break
List breakp­oints
d <N>
Delete breakpoint N

Threads

info threads
Show all threads with names
thread <N>
Switch to thread N
 

Inspecting data

x ptr
Examine memory at ptr
x/2g ptr
Examine 2 qwords ("gi­ant­") at ptr
x/20xb ptr
Examine 20 bytes in hex at ptr

TUI (Text User Interface)

C-x a
Enter/­leave TUI
C-x s
Toggle single-key mode
C-l
Refresh screen
C-p, C-n
Arrow key replac­ements
 

Comments

No comments yet. Add yours below!

Add a Comment

Your Comment

Please enter your name.

    Please enter your email address

      Please enter your Comment.

          Related Cheat Sheets

          Closed-source Debugging with GDB Cheat Sheet