我使用gdb来调试我的cpp代码。我是这样设置断点的:
(gdb) break ParseDriver.cc:60
No source file named ParseDriver.cc.
Make breakpoint pending on future shared library load? (y or [n]) y
Breakpoint 1 (ParseDriver.cc:60) pending.
为了简化断点设置,我编写了一个简单的gdb脚本(名为breakpoints.gdb),它只包含一行:
break ParseDriver.cc:60
我在gdb终端中编写了这个脚本,但它失败了。
(gdb) source ~/breakpoints.gdb
No source file named ParseDriver.cc.
Make breakpoint pending on future shared library load? (y or [n]) [answered N; input not from terminal]
似乎我们需要在脚本中回答Y才能设置断点。
那么,我如何在gdb脚本中回答Y呢?提前谢谢你。
发布于 2012-07-06 13:33:32
https://stackoverflow.com/questions/11356138
复制相似问题