commands:
- gcc -g test.c -o test.out
- gdb ./test.out
- b(breakpoint) home/xxx/test.c:13
- r(for run, stop before line 13)
- n(for next, one step but not step into)
- Enter(repeat last command)
- s(for step into)
- k(kill, kill debugging)
- info b(show breakpoints)
- d 1(delete breakpoint 1)
- c(continue to next breakpoint)
- bt(back trace, show function call trace)
- watch(watch point for variable, e.g watch i)
- info r(show all register)
- info variables
- p (for print, show variable value, e.g p i)
- layout src(ctrl x + a)