Re: core dumps



Jhair Tocancipa Triana wrote:
Cédric Lucantis writes:

Hi,
I'd like to know how to find which program produced a particular core dump file, any idea?

,----
| (debian-unstable)jtocancipa@golem:~$ ulimit -c unlimited
| | (debian-unstable)jtocancipa@golem:~$ echo "
| #include <stdio.h>
| | int main ()
| {
| char * foo = 0;
| *foo = 'bar';
| | return 0;
| }
| | " | gcc -xc -o baz -
| | (debian-unstable)jtocancipa@golem:~$ ./baz | Segmentation fault (core dumped)
| | (debian-unstable)jtocancipa@golem:~$ 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'

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature



Relevant Pages

  • Re: Core Dumps in general and one strange on in particular
    ... > that I didn't need to examine the core dump file. ... The debugger that comes with your compiler. ...
    (comp.unix.programmer)
  • Bad core files with 2.6.19-rc2
    ... gdb doesn't like any core dump file generated while running ... But if I gdb attach to a running process and then kill -SIGSEGV ...
    (Linux-Kernel)
  • Re: core dumps
    ... I'd like to know how to find which program produced a particular core ... Segmentation fault ... baz core ...
    (Debian-User)
  • Re: What happens when your program crashes?
    ... Segmentation fault (core dumped) ... Reading symbols from /lib/ld-linux.so.2...done. ... pcl_DllistSetExecutorFunction(fieldlist, stdout); ...
    (comp.lang.c)
  • Re: sfxload issues.
    ... Red Hat Linux release 7.0 ... > Segmentation fault (core dumped) ... > GDB is free software, covered by the GNU General Public License, and you ...
    (Vuln-Dev)