launch gdb
gdb <execute path> [core file path]
run
run [args]
r [args]
make break point
b line_number
break line_number
break [file_name]:line_number
break [file_name]:func_name
Printing the variable values
print <variable>
p <variable>
Continue, stepping over and in
c or continue: Debugger will continue executing until the next break point.
n or next: Debugger will execute the next line as single instruction.
s or step: Same as next, but does not treats function as a single instruction, instead goes into the function and executes it line by line.
print source code
l line_number
l func_name
list line_number
list func_name
print call stack
bt
bt -10
backtrack
go to frame in stack
f frame_number
help
help topic_name