获取GDB保存的断点列表? [英] Getting gdb to save a list of breakpoints?
问题描述
OK,信息休息列出了断点,而不是在一个格式,将与使用--command 重复使用它们工作得很好在这个问题。 GDB是否对他们有再次倾倒到一个文件中输入接受的方法是什么?有时候在调试会话,就必须建立一套转折点的测试后,重新启动GDB。
编辑:的.gdbinit文件具有相同的问题,因为--command。该信息中断命令不会列出命令,而是供人食用的表。
要详细说明,这里是从信息休息的例子:
(GDB)信息休息
号码类型显⽰ENB地址是什么
1断点保持Ÿ0x08048517<富::酒吧(无效)+ 7是H.
由于GDB 7.2现在可以使用保存分界点的命令。
保存断点<&名GT;
保存所有当前断点定义为适合使用的文件
在以后的调试会话。要读取保存的断点
定义,使用'源'命令。
OK, info break lists the breakpoints, but not in a format that would work well with reusing them using the --command as in this question. Does gdb have a method for dumping them into a file acceptable for input again? Sometimes in a debugging session, it is necessary to restart gdb after building up a set of breakpoints for testing.
Edit: the .gdbinit file has the same problem as --command. The info break command does not list commands, but rather a table for human consumption.
To elaborate, here is a sample from info break:
(gdb) info break Num Type Disp Enb Address What 1 breakpoint keep y 0x08048517 <foo::bar(void)+7>
As of gdb 7.2 you can now use the save breakpoints command.
save breakpoints <filename>
Save all current breakpoint definitions to a file suitable for use
in a later debugging session. To read the saved breakpoint
definitions, use the `source' command.
这篇关于获取GDB保存的断点列表?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!