使gdb再次搜索符号文件 [英] Make gdb search for symbol files again
问题描述
我的发行版(Debian)在不同的包中发送调试文件。所以经常发生的是,我在 gdb
中运行一个程序,直到它崩溃,以便为错误报告获取可用的追溯。但是,由于我没有安装相应的 -dbg
软件包,所以 bt
是没用的,缺少符号信息。 p>
如果我现在安装软件包,有没有办法使 gdb
再次搜索符号文件,而不会丢失我的当前的追溯?
有一个技巧可以使gdb尝试再次读取符号文件:
(gdb)nosharedlibrary
(gdb)sharedlibrary
第一个命令告诉它忘记所有符号信息,第二个命令告诉它重新读取它。
My distribution (Debian) ships debug files in separate packages. So what happens often is that I run a program in gdb
until it crashes, in order to obtain a usable backtrace for a bug report. But bt
is rather useless, missing the symbol information – because I did not install the corresponding -dbg
package.
If I install the package now, is there a way to make gdb
search for the symbol files again, without losing my current backtrace?
There is a trick you can use to make gdb try to read symbol files again:
(gdb) nosharedlibrary
(gdb) sharedlibrary
The first command tells it to forget all the symbol information it has, and the second command tells it to re-read it.
这篇关于使gdb再次搜索符号文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!