GDB Cheat Sheet

A Programming › GDB cheat sheet in English by lovrop

GDB

6,352 views 2,155 downloads 8 Jun 2016 History
3.7 avg · 0 ratings

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

Badges

Nice Cheat Sheet Good Cheat Sheet

Comments

No comments yet.

Cheatography n. The art of mapping complex subjects into clear, instantly navigable reference guides.