views:

45

answers:

2

Possible Duplicate:
Why core dump file is generated ?

When my programs segfault, I get this message on stderr:

Segmentation fault

Sometimes, however, I see this instead:

Segmentation fault (core dumped)

What is the 'core'? Is it useful for debugging? What triggers it to be dumped? Where are these dumps located?

+2  A: 

A core dump is basically a snapshot of the computer memory when the program crashed.

http://en.wikipedia.org/wiki/Core_dump

It could be many things that limit the core dump, from ulimit... http://www.akadia.com/services/ora_enable_core.html

To C runtime settings.

kervin
+1  A: 

Look for cores in /cores.

I may be wrong, but I think that it depends on whether a program is compiled to enable debugging whether you get a core dump.

gdb is the standard gcc debugger; you can sometimes get a hint of what happened without having to be a serious programmer.

Richard Careaga
Yeah, I often compile with `-O0 -g` then use `gdb` with `run`, `where`, `list`, and `wh`.
Delan Azabani