Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: "Eli Zaretskii" <eliz@gnu.org>
To: Michael Snyder <msnyder@redhat.com>
Cc: cagney@gnu.org, cmarkle@sendmail.com, gdb@sources.redhat.com,
	gdb-patches@sources.redhat.com
Subject: Re: gcore or generate-core-file command?
Date: Mon, 25 Oct 2004 09:27:00 -0000	[thread overview]
Message-ID: <01c4b911$Blat.v2.2.2$0f0b5500@zahav.net.il> (raw)
In-Reply-To: <40F5B514.8070906@redhat.com> (message from Michael Snyder on Wed, 14 Jul 2004 22:35:00 +0000)

I've committed the attached patch to document this command.

2004-10-23  Eli Zaretskii  <eliz@gnu.org>

	* gdb.texinfo (Core File Generation): New section.

Index: gdb.texinfo
===================================================================
RCS file: /cvs/src/src/gdb/doc/gdb.texinfo,v
retrieving revision 1.221
diff -u -r1.221 gdb.texinfo
--- gdb.texinfo	23 Oct 2004 14:34:53 -0000	1.221
+++ gdb.texinfo	23 Oct 2004 15:00:42 -0000
@@ -4780,6 +4780,7 @@
 * Auxiliary Vector::            Auxiliary data provided by operating system
 * Memory Region Attributes::    Memory region attributes
 * Dump/Restore Files::          Copy between memory and a file
+* Core File Generation::        Cause a program dump its core
 * Character Sets::              Debugging programs that use a different
                                 character set than GDB does
 @end menu
@@ -6176,6 +6177,36 @@
 
 @end table
 
+@node Core File Generation
+@section How to Produce a Core File from Your Program
+@cindex dump core from inferior
+
+A @dfn{core file} or @dfn{core dump} is a file that records the memory
+image of a running process and its process status (register values
+etc.).  Its primary use is post-mortem debugging of a program that
+crashed while it ran outside a debugger.  A program that crashes
+automatically produces a core file, unless this feature is disabled by
+the user.  @xref{Files}, for information on invoking @value{GDBN} in
+the post-mortem debugging mode.
+
+Occasionally, you may wish to produce a core file of the program you
+are debugging in order to preserve a snapshot of its state.
+@value{GDBN} has a special command for that.
+
+@table @code
+@kindex gcore
+@kindex generate-core-file
+@item generate-core-file [@var{file}]
+@itemx gcore [@var{file}]
+Produce a core dump of the inferior process.  The optional argument
+@var{file} specifies the file name where to put the core dump.  If not
+specified, the file name defaults to @file{core.@var{pid}}, where
+@var{pid} is the inferior process ID.
+
+Note that this command is implemented only for some systems (as of
+this writing, @sc{gnu}/Linux, FreeBSD, Solaris, Unixware, and S390).
+@end table
+
 @node Character Sets
 @section Character Sets
 @cindex character sets


      reply	other threads:[~2004-10-23 15:04 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-07-11  7:08 Chris Markle
2004-07-14 19:48 ` Andrew Cagney
2004-07-14 23:01   ` Michael Snyder
2004-10-25  9:27     ` Eli Zaretskii [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='01c4b911$Blat.v2.2.2$0f0b5500@zahav.net.il' \
    --to=eliz@gnu.org \
    --cc=cagney@gnu.org \
    --cc=cmarkle@sendmail.com \
    --cc=gdb-patches@sources.redhat.com \
    --cc=gdb@sources.redhat.com \
    --cc=msnyder@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox