This is the mail archive of the
mailing list for the GDB project.
[RFC] New command 'gcore'
- From: Michael Snyder <msnyder at cygnus dot com>
- To: gdb-patches at sources dot redhat dot com
- Date: Wed, 12 Dec 2001 14:01:04 -0800
- Subject: [RFC] New command 'gcore'
- Newsgroups: cygnus.patches.gdb
- Organization: Red Hat, Inc.
I would like to discuss adding a new command 'gcore' to gdb.
This is at a very early stage, I just want to sound people out
The idea is that 'gcore' would cause gdb to generate a core image
of the inferior program (just like the 'gcore' unix command).
The user could drop a core file at any point in the inferior's
execution, and save the memory and register state for debugging later.
We ought to be able to cook up an elf core file pretty easily using
This would probably require one or more new target and/or architecture
vectors, for instance to get a list of memory regions in use (which
would be easy for a /proc target, but might be progressively harder
for ptrace, sim, remote...). Some targets may not be able to
implement it right away, but in principle it could even be made
to work for remote embedded targets.
The holy grail, of course, would be to then give gdb the ability
to restart the process from the core file state. That would
give us a checkpoint-and-restart capability that very few
debuggers have ever had. But that's down the line...