好的,信息中断列出了断点,但不是以与此问题中的--command重用它们的格式。gdb是否有一种方法将它们转储到可再次输入的文件中?有时在调试会话中,需要在构建一组测试断点后重新启动gdb。
编辑: .gdbinit文件与--command具有相同的问题。info break命令不会列出命令,而是一张供人类使用的表格。
详细说明,这里是一个来自信息中断的示例:
(gdb)信息中断
Num Type Disp Enb Address什么
1断点保持y 0x08048517 <foo :: bar(void)+7>
发布于 2018-03-23 10:17:24
从GDB7.2开始,您现在可以使用保存断点命令。
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.
https://stackoverflow.com/questions/-100007746
复制相似问题