Skip to main content

# GDB

CommandDescription
break mainsets a breakpoint at the start of the main function.
runrestarts the program when stopped in mid-execution.
nextruns until the next source line is reached.
wherereturns a function call trace of how you got to this point and shows line numbers inside files.
listprints surrounding code.
contcontinues execution from the current location.
quitquits gdb