lkml.org 
[lkml]   [1996]   [Jul]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
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
main()
{
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
file-3.19
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/libc.so.5.4.2...done.
Reading symbols from /lib/ld-linux.so.1...done.
#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    [from the cache]
©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site