l 1 表示显示源码第一行开始的10行记录,可以写成list 1
l 表示显示源码中间的前后10行记录,可以写成list
空白回车 表示重复上一次命令操作
r 表示程序开始运行
01.(gdb) b 23
02.Breakpoint 1 at 0x4004f2: file miki.c, line 23.
03.(gdb) info b
04.Num Type Disp Enb Address What
05.1 breakpoint keep y 0x00000000004004f2 in main at miki.c:23
06.(gdb) i b
07.Num Type Disp Enb Address What
08.1 breakpoint keep y 0x00000000004004f2 in main at miki.c:23
09.(gdb) break func
10.Breakpoint 2 at 0x40049f: file miki.c, line 5.
11.(gdb) info break
12.Num Type Disp Enb Address What
13.1 breakpoint keep y 0x00000000004004f2 in main at miki.c:23
14.2 breakpoint keep y 0x000000000040049f in func at miki.c:5
15.
16.
17.(gdb) i b
18.Num Type Disp Enb Address What
19.1 breakpoint keep y 0x00000000004004f2 in main at miki.c:23
20.2 breakpoint keep y 0x000000000040049f in func at miki.c:5
21.3 breakpoint keep y 0x000000000040049f in func at miki.c:2
22.(gdb) d 2
23.(gdb) i b
24.Num Type Disp Enb Address What
25.1 breakpoint keep y 0x00000000004004f2 in main at miki.c:23
26.3 breakpoint keep y 0x000000000040049f in func at miki.c:2
27.(gdb) delete 3
28.(gdb) i b
29.Num Type Disp Enb Address What
30.1 breakpoint keep y 0x00000000004004f2 in main at miki.c:2