| 1 |
.\" -*- mode: troff; coding: utf-8 -*- |
| 2 |
.\" Automatically generated by Pod::Man v6.0.2 (Pod::Simple 3.47) |
| 3 |
.\" |
| 4 |
.\" Standard preamble: |
| 5 |
.\" ======================================================================== |
| 6 |
.de Sp \" Vertical space (when we can't use .PP) |
| 7 |
.if t .sp .5v |
| 8 |
.if n .sp |
| 9 |
.. |
| 10 |
.de Vb \" Begin verbatim text |
| 11 |
.ft CW |
| 12 |
.nf |
| 13 |
.ne \\$1 |
| 14 |
.. |
| 15 |
.de Ve \" End verbatim text |
| 16 |
.ft R |
| 17 |
.fi |
| 18 |
.. |
| 19 |
.\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. |
| 20 |
.ie n \{\ |
| 21 |
. ds C` "" |
| 22 |
. ds C' "" |
| 23 |
'br\} |
| 24 |
.el\{\ |
| 25 |
. ds C` |
| 26 |
. ds C' |
| 27 |
'br\} |
| 28 |
.\" |
| 29 |
.\" Escape single quotes in literal strings from groff's Unicode transform. |
| 30 |
.ie \n(.g .ds Aq \(aq |
| 31 |
.el .ds Aq ' |
| 32 |
.\" |
| 33 |
.\" If the F register is >0, we'll generate index entries on stderr for |
| 34 |
.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index |
| 35 |
.\" entries marked with X<> in POD. Of course, you'll have to process the |
| 36 |
.\" output yourself in some meaningful fashion. |
| 37 |
.\" |
| 38 |
.\" Avoid warning from groff about undefined register 'F'. |
| 39 |
.de IX |
| 40 |
.. |
| 41 |
.nr rF 0 |
| 42 |
.if \n(.g .if rF .nr rF 1 |
| 43 |
.if (\n(rF:(\n(.g==0)) \{\ |
| 44 |
. if \nF \{\ |
| 45 |
. de IX |
| 46 |
. tm Index:\\$1\t\\n%\t"\\$2" |
| 47 |
.. |
| 48 |
. if !\nF==2 \{\ |
| 49 |
. nr % 0 |
| 50 |
. nr F 2 |
| 51 |
. \} |
| 52 |
. \} |
| 53 |
.\} |
| 54 |
.rr rF |
| 55 |
.\" |
| 56 |
.\" Required to disable full justification in groff 1.23.0. |
| 57 |
.if n .ds AD l |
| 58 |
.\" ======================================================================== |
| 59 |
.\" |
| 60 |
.IX Title "GCORE 1" |
| 61 |
.TH GCORE 1 2026-02-25 gdb-17.1-4.fc44 "GNU Development Tools" |
| 62 |
.\" For nroff, turn off justification. Always turn off hyphenation; it makes |
| 63 |
.\" way too many mistakes in technical documents. |
| 64 |
.if n .ad l |
| 65 |
.nh |
| 66 |
.SH NAME |
| 67 |
gcore \- Generate a core file of a running program |
| 68 |
.SH SYNOPSIS |
| 69 |
.IX Header "SYNOPSIS" |
| 70 |
gcore [\-v | \-\-version] [\-h | \-\-help] [\-a] [\-o \fIprefix\fR] [\-d \fIdirectory\fR] |
| 71 |
\fIpid1\fR [\fIpid2\fR...\fIpidN\fR] |
| 72 |
.SH DESCRIPTION |
| 73 |
.IX Header "DESCRIPTION" |
| 74 |
Generate core dumps of one or more running programs with process IDs |
| 75 |
\&\fIpid1\fR, \fIpid2\fR, etc. A core file produced by \fBgcore\fR |
| 76 |
is equivalent to one produced by the kernel when the process crashes |
| 77 |
(and when \f(CW\*(C`ulimit \-c\*(C'\fR was used to set up an appropriate core dump |
| 78 |
limit). However, unlike after a crash, after \fBgcore\fR finishes |
| 79 |
its job the program remains running without any change. |
| 80 |
.SH OPTIONS |
| 81 |
.IX Header "OPTIONS" |
| 82 |
.IP \fB\-a\fR 4 |
| 83 |
.IX Item "-a" |
| 84 |
Dump all memory mappings. The actual effect of this option depends on |
| 85 |
the Operating System. On GNU/Linux, it will disable |
| 86 |
\&\f(CW\*(C`use\-coredump\-filter\*(C'\fR and |
| 87 |
enable \f(CW\*(C`dump\-excluded\-mappings\*(C'\fR. |
| 88 |
.IP "\fB\-o\fR \fIprefix\fR" 4 |
| 89 |
.IX Item "-o prefix" |
| 90 |
The optional argument \fIprefix\fR specifies the prefix to be used |
| 91 |
when composing the file names of the core dumps. The file name is |
| 92 |
composed as \fIprefix.pid\fR, where \fIpid\fR is the |
| 93 |
process ID of the running program being analyzed by \fBgcore\fR. |
| 94 |
If not specified, \fIprefix\fR defaults to \fIcore\fR. |
| 95 |
.IP "\fB\-d\fR \fIdirectory\fR" 4 |
| 96 |
.IX Item "-d directory" |
| 97 |
Use \fIdirectory\fR as the data directory when invoking GDB for running |
| 98 |
the gcore command. This argument is optional. |
| 99 |
.IP \fB\-\-help\fR 4 |
| 100 |
.IX Item "--help" |
| 101 |
.PD 0 |
| 102 |
.IP \fB\-h\fR 4 |
| 103 |
.IX Item "-h" |
| 104 |
.PD |
| 105 |
List all options, with brief explanations. |
| 106 |
.IP \fB\-\-version\fR 4 |
| 107 |
.IX Item "--version" |
| 108 |
.PD 0 |
| 109 |
.IP \fB\-v\fR 4 |
| 110 |
.IX Item "-v" |
| 111 |
.PD |
| 112 |
Print version information and then exit. |
| 113 |
.SH ENVIRONMENT |
| 114 |
.IX Header "ENVIRONMENT" |
| 115 |
.SH "SEE ALSO" |
| 116 |
.IX Header "SEE ALSO" |
| 117 |
The full documentation for GDB is maintained as a Texinfo manual. |
| 118 |
If the \f(CW\*(C`info\*(C'\fR and \f(CW\*(C`gdb\*(C'\fR programs and GDB\*(Aqs Texinfo |
| 119 |
documentation are properly installed at your site, the command |
| 120 |
.PP |
| 121 |
.Vb 1 |
| 122 |
\& info gdb |
| 123 |
.Ve |
| 124 |
.PP |
| 125 |
should give you access to the complete manual. |
| 126 |
.PP |
| 127 |
\&\fIUsing GDB: A Guide to the GNU Source\-Level Debugger\fR, |
| 128 |
Richard M. Stallman and Roland H. Pesch, July 1991. |
| 129 |
.SH COPYRIGHT |
| 130 |
.IX Header "COPYRIGHT" |
| 131 |
Copyright (c) 1988\-2025 Free Software Foundation, Inc. |
| 132 |
.PP |
| 133 |
Permission is granted to copy, distribute and/or modify this document |
| 134 |
under the terms of the GNU Free Documentation License, Version 1.3 or |
| 135 |
any later version published by the Free Software Foundation; with the |
| 136 |
Invariant Sections being "Free Software" and "Free Software Needs |
| 137 |
Free Documentation", with the Front\-Cover Texts being "A GNU Manual," |
| 138 |
and with the Back\-Cover Texts as in (a) below. |
| 139 |
.PP |
| 140 |
(a) The FSF\*(Aqs Back\-Cover Text is: "You are free to copy and modify |
| 141 |
this GNU Manual. Buying copies from GNU Press supports the FSF in |
| 142 |
developing GNU and promoting software freedom." |