有可能让gdb自动找到相应的可执行文件吗?我已经解压缩了调试符号并将它们放在/usr/lib/debug/.build-id/目录中.当我启动gdb时,gdb /usr/bin/executable core一切正常.可执行文件和所有共享库的所有调试符号都会自动加载,因为gdb知道build-id并自动加载它.
$ gdb /usr/bin/executable core
GNU gdb (GDB) 7.0.1-debian
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "i486-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /usr/bin/executable...Reading symbols from /usr/lib/debug/.build-id/b7/fada8ba917de74a6055647f3ac205dee1615c8.debug...done.
Run Code Online (Sandbox Code Playgroud)
但是,当我刚启动gdb并加载核心文件时,不会加载任何调试符号. …