aboutsummaryrefslogtreecommitdiff
path: root/gdb/doc
diff options
context:
space:
mode:
authorEli Zaretskii <eliz@gnu.org>2004-10-23 15:05:29 +0000
committerEli Zaretskii <eliz@gnu.org>2004-10-23 15:05:29 +0000
commit384ee23f420548428e348baa10bb9bdb697a1f1d (patch)
treeb27db6631b9476589a9d90589a8e615540e74235 /gdb/doc
parentf8568604725321863bcd619082d6a3a2feeaac6d (diff)
downloadgdb-384ee23f420548428e348baa10bb9bdb697a1f1d.zip
gdb-384ee23f420548428e348baa10bb9bdb697a1f1d.tar.gz
gdb-384ee23f420548428e348baa10bb9bdb697a1f1d.tar.bz2
* gdb.texinfo (Core File Generation): New section.
Diffstat (limited to 'gdb/doc')
-rw-r--r--gdb/doc/ChangeLog1
-rw-r--r--gdb/doc/gdb.texinfo31
2 files changed, 32 insertions, 0 deletions
diff --git a/gdb/doc/ChangeLog b/gdb/doc/ChangeLog
index 920ccb5..466c929 100644
--- a/gdb/doc/ChangeLog
+++ b/gdb/doc/ChangeLog
@@ -9,6 +9,7 @@
is first used, and add an index entry for the term.
(Calling): Expand and elaborate text. Add "print". Add the
description of problems with weak aliases.
+ (Core File Generation): New section.
2004-10-12 Andrew Cagney <cagney@gnu.org>
diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
index 3d42495..b78e7b7 100644
--- a/gdb/doc/gdb.texinfo
+++ b/gdb/doc/gdb.texinfo
@@ -4780,6 +4780,7 @@ Table}.
* 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 @@ the @var{bias} argument is applied.
@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