Is it possible that gdb will automatically find the appropriate executable? I extracted the debug symbols and put them in the /usr/lib/debug/.build-id/ directory. When I start gdb with gdb /usr/bin/executable core , everything works fine. All debugging symbols for the executable and all shared libraries are automatically loaded because gdb knows about build-id and automatically loads it.
$ 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.
However, when I just run gdb and load the kernel file, no debug symbols are loaded.
(gdb) core-file core [New Thread 10822] [New Thread 10812] Core was generated by `/usr/bin/executable'. Program terminated with signal 6, Aborted. #0 0xb7790424 in __kernel_vsyscall ()
Running gdb with strace shows that it is not even trying to find them. The main file contains build-id, so I think gdb should find it ...
$ eu-unstrip -n
Is there a way to get gdb to look for debug files for the executable without providing the executable that caused the kernel dump?
source share