【问题标题】:Unable to set pending breakpoints in .gdbinit无法在 .gdbinit 中设置挂起的断点
【发布时间】:2012-08-22 17:23:44
【问题描述】:

gdb-6.8

如果程序或库没有加载,手动设置挂起断点很奇怪,但不是通过.gdbinit。有什么问题?

[手动方式]

(gdb) break foo.cc:111
No source file named foo.cc.
Make breakpoint pending on future shared library load? (y or [n]) y
Breakpoint 1 (foo.cc) pending.
(gdb) info break
Num     Type           Disp Enb Address            What
1       breakpoint     keep y   <PENDING>          foo.cc
(gdb) run myprogram

[gdbinit方式] 在.gdbinit中添加这两行

   set breakpoint pending on
   break foo.cc:111

Gdb 在启动时显示以下错误。

> gdb myprogram
(enter gdb shell)
/home/<username>/.gdbinit:2: Error in sourced command file:
No symbol table is loaded.  Use the "file" command.

【问题讨论】:

    标签: debugging gdb gdbinit


    【解决方案1】:

    这是 2008 年修复的错误,请尝试升级您的 gdb 或使用/移植以下修复该问题的补丁。

    pending breakpoints without any symbols loaded yet

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2020-02-25
      • 2014-09-22
      • 2010-10-14
      • 1970-01-01
      • 2021-01-09
      • 2015-02-08
      • 2016-03-06
      相关资源
      最近更新 更多