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:
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?
Is it possible to generate a core file with complete memory of process via GDB? If so, how?
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
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
gcorecommand? If not, why? What does it depend on?