【发布时间】:2014-03-18 22:48:40
【问题描述】:
也许,我误解了一些东西,但我不能让 Gdb 读取调试库。 我从命令行做的是:
gdb
file problem_exec
b main
r
GDB 停在:
(gdb) r
Starting program: /Users/.../problem_exec
Breakpoint 1, main (argc=<error reading variable: Could not find the frame base for "main(int, char**)".>, argv=<error reading variable: Could not find the frame base for "main(int, char**)".>)
没有共享库:
(gdb) info shared
No shared libraries loaded at this time.
最后一条命令给出:“此时没有加载共享库。”
我的 .gdbinit 看起来像:
# file .gdbinit
set stop-on-solib-events 1
# stop gdb from stepping over functions and output diagnostics
set step-mode on
set breakpoint pending on
set env DYLD_LIBRARY_PATH path1:path2:path3
#automatically load shared libraries (on/off):
set auto-solib-add on
我确信可执行文件与共享库的调试版本相关联(总共有大约 30 个库,但我感兴趣的肯定是在调试模式下编译的)。我用 otool -L question_exec
检查了它如果我运行程序,它会一直运行到我要调试的库中出现运行时错误,但我无法介入。
我错过了什么吗?
附言我在 os-x 上运行自编译版本的 Gdb。
更新:它可能与此problem 有关。
【问题讨论】:
标签: gdb