Stuff about GNU Debugger (AKA gdb).

Usage patterns

Run a program w/ arguments:

gdb --args ${PROGRAM_NAME} ${ARGUMENTS}

to automatically start debugging, put commands into a file, including breakpoints if you want them. E.g.:

breakpoint main.cpp:1
run

and then execute gdb with -x:

gdb -x ${COMMANDS_FILE} --args ${PROGRAM_NAME} ${ARGUMENTS}

Quick reference

SamatsWiki: GnuDebugger (last edited 2020-06-06 03:33:53 by SamatJain)