13. Run the Debugger: gdb

% pwd
/home/perry/CPP/sum
% gdb -q src/sum
Reading symbols from src/sum...done.
(gdb) run
Starting program: /home/perry/CPP/sum/src/sum

Program received signal SIGSEGV, Segmentation fault.
main () at main.cc:9
9         *(int *)1000 = 1; // should crash here
(gdb) where
#0  main () at main.cc:9
(gdb) quit
A debugging session is active.

        Inferior 1 [process 16595] will be killed.

Quit anyway? (y or n) y
%