Help: GDB failing with kernel 2: - core file in wrong format?

Help: GDB failing with kernel 2: - core file in wrong format?

Post by Brian Brenna » Sun, 16 Jun 1996 04:00:00



Ok I'm running redhat 3.0.3 and recently installed and compiled myself a
dandy kernel 2.0...

As expected I had some problems, but after a little struggling I got
everything running smooth, or so I thought.  For some reason, gdb refuses
to debug my core files now.

Here's what I see:

[bbrennan.emerald] ~>gdb server core
GDB is free software and you are welcome to 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.
GDB 4.16 (i586-unknown-linux), Copyright 1996 Free Software Foundation, Inc...
Couldn't fetch registers from core file: File in wrong format
Reading symbols from /lib/libm.so.5.0.5...done.
Reading symbols from /lib/libc.so.5.2.18...done.
Reading symbols from /lib/ld-linux.so.1...done.
Couldn't fetch registers from core file: File in wrong format
#0  0x0 in ?? ()
(gdb) q

Bleah.

I have recompiled gdb, gcc, and my kernel several times, hoping maybe
something magical would happen.  It didn't.  Here are the relevent package
versions I am using (redhat package / true version response )

binutils-2.6-4     [ld version 2.6 (with BFD 2.6.0.2)]
libg++-2.7.1.3-3   [/usr/lib/libg++.so.2.7.1]
libc-5.2.18-1      [/lib/libc.so.5.2.18]
modules-2.0.0-1    [Version 2.0.0]
gcc-2.7.2-3        [gcc version 2.7.2]
gdb-4.16-1         [GDB 4.16 (i586-unknown-linux)]
ld.so-1.7.14-3     [/lib/ld.so.1.7.14]

Longshots, but mentioned in the required packages documentation of the kernel:

ppp-2.2.0f-1       [pppd version 2.2 patch level 0]
libtermcap-2.0.8-2 [/lib/libtermcap.so.2.0.8]
procps-0.99a-3     [procps version 0.99]
SysVinit-2.62-1
gpm-1.09-3
util-linux-2.5-10  

A quick look at both the binary and the core it generated (gotta love it!)
shows both are ELF, as expected...  Part of me thinks I should be looking
at libc or binutils as the "changes" file requests binutils 2.6.0.14 and
libc 5.2.18 (stable) but prefers 5.3.12 (beta).  But, part of me thinks
this should make a whole hell of a lot of difference and should be looking
elsewhere.

Here's one other curiousity... I notice something when I attach gdb to a
running process (which works fine still, by the way):

#0  0x4002736c in __select ()
#1  0x400a34bc in __DTOR_END__ ()
#2  0x8021a04 in run_the_game (port=2718) at comm.c:1218
#3  0x8021e00 in main (argc=3, argv=0xbffff640) at comm.c:1348
#4  0x8001b54 in _start ()
#5  0x4004658e in morecore ()
#6  0x400062d0 in ?? ()

WTF is morecore?!  Could this be related?

Been ripping out my hair on this for about 24 hours now, and any kind of
clue would be much appreciated as this severly hinders my ability to work.
Thanks in advance...

 
 
 

1. Help: GDB failing with kernel 2: - core file in wrong format?

Ok I'm running redhat 3.0.3 and recently installed and compiled myself a
dandy kernel 2.0...

As expected I had some problems, but after a little struggling I got
everything running smooth, or so I thought.  For some reason, gdb refuses
to debug my core files now.

Here's what I see:

[bbrennan.emerald] ~>gdb server core
GDB is free software and you are welcome to 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.
GDB 4.16 (i586-unknown-linux), Copyright 1996 Free Software Foundation, Inc...
Couldn't fetch registers from core file: File in wrong format
Reading symbols from /lib/libm.so.5.0.5...done.
Reading symbols from /lib/libc.so.5.2.18...done.
Reading symbols from /lib/ld-linux.so.1...done.
Couldn't fetch registers from core file: File in wrong format
#0  0x0 in ?? ()
(gdb) q

Bleah.

I have recompiled gdb, gcc, and my kernel several times, hoping maybe
something magical would happen.  It didn't.  Here are the relevent package
versions I am using (redhat package / true version response )

binutils-2.6-4     [ld version 2.6 (with BFD 2.6.0.2)]
libg++-2.7.1.3-3   [/usr/lib/libg++.so.2.7.1]
libc-5.2.18-1      [/lib/libc.so.5.2.18]
modules-2.0.0-1    [Version 2.0.0]
gcc-2.7.2-3        [gcc version 2.7.2]
gdb-4.16-1         [GDB 4.16 (i586-unknown-linux)]
ld.so-1.7.14-3     [/lib/ld.so.1.7.14]

Longshots, but mentioned in the required packages documentation of the kernel:

ppp-2.2.0f-1       [pppd version 2.2 patch level 0]
libtermcap-2.0.8-2 [/lib/libtermcap.so.2.0.8]
procps-0.99a-3     [procps version 0.99]
SysVinit-2.62-1
gpm-1.09-3
util-linux-2.5-10  

A quick look at both the binary and the core it generated (gotta love it!)
shows both are ELF, as expected...  Part of me thinks I should be looking
at libc or binutils as the "changes" file requests binutils 2.6.0.14 and
libc 5.2.18 (stable) but prefers 5.3.12 (beta).  But, part of me thinks
this should make a whole hell of a lot of difference and should be looking
elsewhere.

Here's one other curiousity... I notice something when I attach gdb to a
running process (which works fine still, by the way):

#0  0x4002736c in __select ()
#1  0x400a34bc in __DTOR_END__ ()
#2  0x8021a04 in run_the_game (port=2718) at comm.c:1218
#3  0x8021e00 in main (argc=3, argv=0xbffff640) at comm.c:1348
#4  0x8001b54 in _start ()
#5  0x4004658e in morecore ()
#6  0x400062d0 in ?? ()

WTF is morecore?!  Could this be related?

Been ripping out my hair on this for about 24 hours now, and any kind of
clue would be much appreciated as this severly hinders my ability to work.
Thanks in advance...

2. 18 potential missing unlocks in 2.4.17

3. gdb: core file not in executable format: File format not recognized

4. Changing Color Depth on Solaris8 Sparc

5. gdb: core file in wrong format

6. Global data in shared libraries

7. Couldn't fetch registers from core file: File in wrong format

8. chsh

9. gdb and Core file format

10. gdb format error in linux core files

11. GDB unable to recognize kernel.0 core file in FreeBSD 3.0

12. HELP: GDB and CORE files

13. gdb - step into function fails (stab-format)