[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: gdb - unknown file format



On Fri 15 Jan 1999, Mikolaj J. Habryn wrote:

>   Is it just me, or is the current gdb build really dysfunctional?

I don't have your problems:

$ cat > x.c
main() { *(long *)0 = 0; }
$ make x
cc     x.c   -o x
$ gcc -g x.c -o x
$ ./x
Segmentation fault
$ ulimit -c unlimited
$ ./x
Segmentation fault (core dumped)
$ gdb x core
GNU gdb 4.17.m68k.objc.threads.hwwp.fpu.gnat
Copyright 1998 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 "alpha-debian-linux-gnu"...
Core was generated by `./x'.
Program terminated with signal 11, Segmentation fault.
Reading symbols from /lib/libc.so.6.1...done.
Reading symbols from /lib/ld-linux.so.2...done.
#0  main () at x.c:1
1       main() { *(long *)0 = 0; }
(gdb) 


Maybe you have limited the size of core dumps, so that yours is
truncated? Mine was limited to 0 at first... (hence the 'ulimit -c
unlimited').

And no, the difference isn't in the -g while compiling. If I leave it
out, I get:

Core was generated by `./x'.
Program terminated with signal 11, Segmentation fault.
Reading symbols from /lib/libc.so.6.1...done.
Reading symbols from /lib/ld-linux.so.2...done.
#0  0x1200006d0 in main ()
(gdb)


Paul Slootman
-- 
home: paul@wurtel.demon.nl | work: paul@murphy.nl | debian: paul@debian.org
http://www.wurtel.demon.nl | Murphy Software,   Enschede,   the Netherlands


Reply to: