gcore or generate-core-file command?

Michael Snyder msnyder@redhat.com
Wed Jul 14 23:01:00 GMT 2004


Andrew Cagney wrote:
>> Hi - I am currently using some moldy oldy versions of gdb that do not 
>> appear
>> to have a way to generate core files (yes I know I should upgrade). I get
>> the impression that newer gdb versions have a gcore (or 
>> generate-core-file?)
>> command. Is this the case or is this somehow limited to Linux or some 
>> subset
>> of platforms (my interest here is generating cores with gdb on Solaris).
>> I've looked in the gdb doc and can't find refs to this ability. Is this
>> possible? Which version of gdb did this shwo up in? Thx in advance. Chris
> 
> 
> The command "gcore" was added to GDB 5.2.  You're right though, it isn't 
> doesn't appear to be documented.
> 
> Michael, was there any documentation for this command?

<scrounge scrounge>... Drat.  We had a conversation on gdb-patches
in January 2002, about what section of the manual they could go into.
That sort of trailed off without resolution, and I forgot to persue it.

There is of course the built-in help.

Yes, it does work on Solaris, and Linux, and Unixware.
And apparently bsd, and S390 (who knew?)

Chris, this is what the built-in help says:

(gdb) help gcore
Save a core file with the current state of the debugged process.
Argument is optional filename.  Default filename is 'core.<process_id>'.




More information about the Gdb mailing list