debug
1 gdb executable
2 b main
3 r (after run, then all identifier are visible and accessible, then we can make breakpoints anywhere)
4 b wanted line such as filename.cpp:lineNo or ClassA:Function (make breakpoint)
5 c (continue)
6 n (next step)
7 s (step into a function)
8 p varable (print)
9 x (powerful print, you can check by man x)
debug with dump file core.*
1 gdb executable core.specific
2 r
3 bt or where (to see call stack of the crash)