大家好!
感谢您提前提供的帮助。
我正在尝试调试具有多个文件的可执行文件,并且需要在当前文件之外放置一个断点。当我使用 gdb CLI 执行此操作时,它告诉我源文件不在当前上下文中,但询问我是否要执行断点挂起:
GNU gdb (GDB) 7.5.1
[...]
(gdb) file /caer/bin/DAP_Alm
Reading symbols from /caer/bin/DAP_Alm...done.
(gdb) break /caer/src/dac/dap/intsrv/DAP_CalcFns.c:22217
No source file named /caer/src/dac/dap/intsrv/DAP_CalcFns.c.
Make breakpoint pending on future shared library load? (and or [n]) and
Breakpoint 1 (/caer/src/dac/dap/intsrv/DAP_CalcFns.c:22217) pending.
但是当我使用相同版本的 GDB 从 DDD 执行此操作时,我没有获得将断点置于挂起状态的选项:
GNU DDD 3.3.9
[...]
(gdb) file /caer/bin/DAP_Alm
Reading symbols from /caer/bin/DAP_Alm...done.
(gdb) break /caer/src/dac/dap/intsrv/DAP_CalcFns.c:22217
No source file named /caer/src/dac/dap/intsrv/DAP_CalcFns.c.
(gdb)
问题是为什么 DDD 中没有出现该选项?我应该在 DDD 设置中激活某些功能吗?
最佳答案
But when I do it from the DDD with the same version of the GDB, I do not get the option to place the breakpoint pending:
DDD 可能在启动 GDB 时使用 set recognize off
。
这应该允许您在 DDD 下设置挂起断点:
(gdb) set confirm on
(gdb) break /caer/src/dac/dap/intsrv/DAP_CalcFns.c:22217
关于c - 为什么使用 DDD 时没有出现设置断点挂起的选项?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54832303/