The following issue has been SUBMITTED. ====================================================================== https://www.opencsw.org/mantis/view.php?id=5232 ====================================================================== Reported By: hjb Assigned To: ====================================================================== Project: gdb Issue ID: 5232 Category: regular use Reproducibility: always Severity: major Priority: normal Status: new ====================================================================== Date Submitted: 2015-02-18 09:38 CET Last Modified: 2015-02-18 09:38 CET ====================================================================== Summary: gdb can't read core file Description: The provided gdb isn't able to read core files. Here's an example:
root@ulysses# echo $BASH /usr/bin/bash root@ulysses# /usr/bin/gcore $$ gcore: core.20121 dumped root@ulysses# file core.20121 core.20121: ELF 32-bit MSB core file SPARC Version 1, from 'bash' root@ulysses# /opt/csw/bin/gdb /usr/bin/bash core.20121 GNU gdb (GDB) 7.7 Copyright (C) 2014 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 "sparc-sun-solaris2.10". Type "show configuration" for configuration details. For bug reporting instructions, please see: <http://www.gnu.org/software/gdb/bugs/>. Find the GDB manual and other documentation resources online at: <http://www.gnu.org/software/gdb/documentation/>. For help, type "help". Type "apropos word" to search for commands related to "word"... Reading symbols from /usr/bin/bash...(no debugging symbols found)...done. warning: Couldn't find general-purpose registers in core file. warning: Wrong size fpregset in core file. [Thread debugging using libthread_db enabled] [New Thread 1 (LWP 1)] Core was generated by `-bash'. warning: Couldn't find general-purpose registers in core file. warning: Wrong size fpregset in core file. PC not available #-1 <unavailable> in ?? () (gdb) Let's compare that with this really old gdb i've got from sunfreeware years ago, iirc: root@ulysses# ./gdb /usr/bin/bash core.20121 GNU gdb 6.2.1 Copyright 2004 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "sparc-sun-solaris2.10"...(no debugging symbols found)... Core was generated by `-bash'. Reading symbols from /lib/libcurses.so.1...(no debugging symbols found)...done. Loaded symbols for /lib/libcurses.so.1 Reading symbols from /lib/libsocket.so.1...(no debugging symbols found)...done. Loaded symbols for /lib/libsocket.so.1 Reading symbols from /lib/libnsl.so.1...(no debugging symbols found)...done. Loaded symbols for /lib/libnsl.so.1 Reading symbols from /lib/libdl.so.1... warning: Lowest section in /lib/libdl.so.1 is .hash at 000000b4 (no debugging symbols found)...done. Loaded symbols for /lib/libdl.so.1 Reading symbols from /lib/libc.so.1...(no debugging symbols found)...done. Loaded symbols for /lib/libc.so.1 Reading symbols from /platform/sun4v/lib/libc_psr.so.1...(no debugging symbols found)...done. Loaded symbols for /platform/SUNW,SPARC-Enterprise-T5120/lib/libc_psr.so.1 https://www.opencsw.org/mantis/view.php?id=0 0x00000000 in ?? () (gdb) ======================================================================