Subject: Re: bin/381: gdb can't do core files
To: James Jegers <jimj@enigma.cs.uwm.edu>
From: Chris G. Demetriou <cgd@alpha.bostic.com>
List: netbsd-bugs
Date: 08/02/1994 22:14:16
> >Description:
> 	
> 	gdb can't examine core files anymore.
> 	You can run gdb on a execuatable and examine it after it core
> 	dumpgs, but you cann't examine a core dump file.
> 	gdb says unknown file type.
> >How-To-Repeat:
> 	write a program which crashes, and creates a core file, run gdb on it.
> 	gdb -core a.out.core   or
> 	gdb a.out a.out.core  or
> 	gdb a.out.core
> 
> 	all of these say a.out.core unknown type of core file(or similar).

I'd like to see a _lot_ more evidence than this.  Why?

7 [sun-lamp] tmp % date
Tue Aug  2 19:12:37 PDT 1994
8 [sun-lamp] tmp % cat foo.c
main()
{
        *((char *) 0) = 0;
}
9 [sun-lamp] tmp % cc -g foo.c
10 [sun-lamp] tmp % a.out
Segmentation fault (core dumped)
11 [sun-lamp] tmp % gdb a.out a.out.core
Core was generated by `a.out'.
Program terminated with signal 11, Segmentation fault.
Reading symbols from /usr/libexec/ld.so...done.
Reading symbols from /usr/lib/libc.so.12.0...done.
#0  main () at foo.c:3
3               *((char *) 0) = 0;
(gdb) quit
12 [sun-lamp] tmp % cc -g -static foo.c
13 [sun-lamp] tmp % a.out
Segmentation fault (core dumped)
14 [sun-lamp] tmp % gdb a.out a.out.core
Core was generated by `a.out'.
Program terminated with signal 11, Segmentation fault.
#0  main () at foo.c:3
3               *((char *) 0) = 0;
(gdb) quit


I.e. it works just fine for me (on an admittedly simple program).


Are you using an up-to-date gdb binary?


cgd

------------------------------------------------------------------------------