Start gdb
gdb program name
l View source (default display ten lines)
l File Name: Number of lines
l File Name: function name
Add a breakpoint
break + the number of rows (b too)
b 15 if i == 15 conditional breakpoint
ib see breakpoint information
start program execution step
n single-step debugging
s single step (the functions that can enter into)
c Run to breakpoint
s into the internal documents
l view source code file
pj view the value of j
ptype Variable View Variable Types
Value display tracking variables
info display to view the display number
undisplay + variable number Unfollow
u out of the current cycle
finish out of a function
info break breakpoint number View
d + cancel breakpoint Breakpoint number
set var i = 10 setting variable values
quit quit gdb