GDB cheatsheet
Below is a list of useful snippets I took from the GDB manual to reference later. Print exceptions: p $_exception Define a function to rebuild a program from within gdb define reload set confirm off shell make file ./your_app run end Run with catch throw and without initial breakpoint: gdb -ex "catch throw" -ex "run" --args To look at some context, we can display ten lines of source surrounding the current line with the l (list) command. ...