It's clear that GDB can generate a core dump of process for example via its wrapper - gcore, however it's not clear what exactly it includes and it's really hard to find an answear because different sources say totally different things.

Because of that I've got following questions:

  1. Does it contain a whole virtual memory of process? If not, what part of it? All writable regions or stack only or just (as its name suggests) some essential part or what?

  2. Is it possible to generate a core file with complete memory of process via GDB? If so, how?

  3. What would be the difference between a "dump" generated by saving and concatenating memory from all regions according to process' memory map and automatically generated file with gcore command?

  4. A process wrote some data somewhere into RAM. Can I be sure that the data will be (always) accessed and saved in a core file generated with gcore command? If not, why? What does it depend on?

  • core means memory. The term comes from those half-forgotten times when RAM was made using one small magnetic core for each bit. See magnetic-core memory on Wikipedia.
    – AlexP
    Commented Jan 26, 2017 at 14:02
  • The questioner uses the word "memory" five times, and "RAM" once. Xe is probably muttering that xe already knew that much. (-:
    – JdeBP
    Commented Jan 26, 2017 at 20:00
  • @JdeBP He knows it's related to memory, but when he wrote "as its name suggests", it seems like he was understanding the word's normal meaning as an adjective, which means "central" or "primary".
    – Barmar
    Commented Jan 26, 2017 at 23:30

1 Answer 1


The core file contains all the parts of the process's virtual memory that are specific to that process, which is generally the data and stack segments. It doesn't include the text segment, which contains the executable code -- when you want to debug a core file, you have to tell the debugger what program was being run.

You can find a detailed explanation of the contents at Anatomy of an ELF core file

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .