(gdb) info b Num Type Disp Enb Address What 1 breakpoint keep y 0x000000000040336d in main(int, char**) at RecvMain.cpp:290 breakpoint already hit 1 time 2 breakpoint keep y 0x00002aaab049c7ef in CRealCreditEventAb::LoopEventCreditCtrl(int) ……
(gdb) save "save" must be followed by the name of a save subcommand. List of save subcommands: save breakpoints -- Save current breakpoint definitions as a script save gdb-index -- Save a save tracepoints -- Save current tracepoint definitions as a script Type "help save" followed by save subcommand name for full documentation. Type "apropos word" to search for commands related to "word". Command name abbreviations are allowed if unambiguous. (gdb)
(gdb) help save breakpoints Save current breakpoint definitions as a script. This includes all types of breakpoints (breakpoints, watchpoints, catchpoints, tracepoints). Use the 'source' command in another debug session to restore them. (gdb)
(gdb) save breakpoints gdb.cfg Saved to file 'gdb.cfg'. (gdb) ^Z [1]+ Stopped gdb RecvMain [billing_dx@bmcs1 creditctl]$vi gdb.cfg 1 break main 2 break CRealCreditEventAb::LoopEventCreditCtrl 3 break AssignStopTask ……
(gdb) D #删除所有断点 Delete all breakpoints? (y or n) y (gdb) info b #查看断点 No breakpoints or watchpoints. (gdb) source gdb.cfg #加载断点 Breakpoint 9 at 0x40336d: file RecvMain.cpp, line 290. Breakpoint 10 at 0x2aaab049c7ef: file CRealCreditEventAb.cpp, line 80. …… (gdb) info b #查看断点 Num Type Disp Enb Address What 9 breakpoint keep y 0x000000000040336d in main(int, char**) at RecvMain.cpp:290 10 breakpoint keep y 0x00002aaab049c7ef in CRealCreditEventAb::LoopEventCreditCtrl(int) at CRealCreditEventAb.cpp:80 ……
原文地址:http://blog.csdn.net/yang15225094594/article/details/29599117