Where do core dumps go?

I wrote a little c program and compiled it with gcc.
It crashed: “Memory fault (core dumped)”.
There is no ‘core’ file in the current directory.
I searched the entire disk for it:

#find / -name core -ls

and nothing turned up. How do I produce a core
dump to feed to gdb?

Thank you.

The core file should show up in /var/dumps as
progname.core

-Peter

Gregory Benjamin <gregb@laserlab.com> wrote:

I wrote a little c program and compiled it with gcc.
It crashed: “Memory fault (core dumped)”.
There is no ‘core’ file in the current directory.
I searched the entire disk for it:

#find / -name core -ls

and nothing turned up. How do I produce a core
dump to feed to gdb?

Thank you.

and if I have same binary in different subdirectories, what I should
expect from that core-in-one-source system to do?
e.g. if I have
/usr/local/foo/binary-name
/usr/local/bar/binary-name
where binary-name are identical files

if they coredumped simultaneously (or almost simultaneously), how can I
differ them?

pgraves@qnx.com wrote:

The core file should show up in /var/dumps as
progname.core

-Peter

Gregory Benjamin <> gregb@laserlab.com> > wrote:
I wrote a little c program and compiled it with gcc.
It crashed: “Memory fault (core dumped)”.
There is no ‘core’ file in the current directory.
I searched the entire disk for it:

#find / -name core -ls

and nothing turned up. How do I produce a core
dump to feed to gdb?

Thank you.


BR, Andrej

Andrej Timchenko <silpol@yahoo.com> wrote:
: and if I have same binary in different subdirectories, what I should
: expect from that core-in-one-source system to do?
: e.g. if I have
: /usr/local/foo/binary-name
: /usr/local/bar/binary-name
: where binary-name are identical files

: if they coredumped simultaneously (or almost simultaneously), how can I
: differ them?

If you run dumper with the -n option, a number is appended to each filename.


Steve Reid stever@qnx.com
TechPubs (Technical Publications)
QNX Software Systems