[lkml]   [1996]   [Jul]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: magic file entry to understand core dumps
On Mon, 22 Jul 1996, Andrew C. Esh wrote:

> This is not meant for Aaron in particular.
> I think we are diverging. And besides, I don't like the "strings"
> solution. "gdb" and "file" should do their job.
> Check this out: (The C code was given in one of the original reports.)

Well, I think the problem is already solved:

swen@hobbiton </tmp>: cat test.c
printf("%d\n", 0/0);
swen@hobbiton </tmp>: gcc -g test.c -o coretest
swen@hobbiton </tmp>: ./coretest
zsh: 501 floating point exception (core dumped) ./coretest
swen@hobbiton </tmp>: file core
core: ELF 32-bit LSB core file of 'coretest' (signal 8), Intel 80386, version 1, stripped
swen@hobbiton </tmp>: file -v
swen@hobbiton </tmp>: gdb -c core coretest
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...
Core was generated by `./coretest'.
Program terminated with signal 8, Floating point exception.
Reading symbols from /lib/
Reading symbols from /lib/
#0 0x804848b in main () at test.c:3
3 printf("%d\n", 0/0);
(gdb) where
#0 0x804848b in main () at test.c:3
#1 0x804842b in ___crt_dummy__ ()
(gdb) quit

This is with gdb-4.16 and the latest "file" from Debian.

Greetings, Swen

 \ /
  Last update: 2005-03-22 13:37    [W:0.043 / U:9.288 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site