> >> Hi, > >> I'd like to know how to find which program produced a particular core > >> dump file, any idea? > > > > ,---- > > > > | (debian-unstable)[EMAIL PROTECTED]:~$ ulimit -c unlimited > > | > > | (debian-unstable)[EMAIL PROTECTED]:~$ echo " > > | #include <stdio.h> > > | > > | int main () > > | { > > | char * foo = 0; > > | *foo = 'bar'; > > | > > | return 0; > > | } > > | > > | " | gcc -xc -o baz - > > | > > | (debian-unstable)[EMAIL PROTECTED]:~$ ./baz > > | Segmentation fault (core dumped) > > | > > | (debian-unstable)[EMAIL PROTECTED]:~$ gdb -batch -c ./core | grep -i > > | generated Core was generated by `./baz'. > > > > `---- > > > > HTH, > > May I suggest using the 'file' command? > > $ baz > Segmentation fault (core dumped) > $ ls > baz core > $ file core > core: ELF 32-bit LSB core file Intel 80386, version 1 (SYSV), > SVR4-style, from 'baz'
Strangely, it doesn't work on my system: [EMAIL PROTECTED]:~$ file core core: ELF 32-bit LSB core file Intel 80386, version 1 (SYSV), SVR4-style But gdb -batch did the trick, thanks! -- Cédric Lucantis