gcore - 実行プログラムのコアファイルを生成する
gcore [-a] [-o prefix] pid1 [pid2...pidN]
1 つまたは複数の実行プログラムのプロセス ID pid1,
pid2 などを使って、 コアダンプを生成します。
gcore から生成される 1 つのコアファイルは、
プロセスがクラッシュしたときに (そして ulimit -c
を用いて、適切にコアダンプ制限が設定されているときに)
カーネルが生成するものと同じです。
ただし、クラッシュ後に生成されるものとは違って、 gcore
が処理を終えた後は、そのプログラムは何も変更なく動作し続けます。
メモリマッピングをすべてダンプします。
このオプションが実際にどのように効果を発揮するかは、オペレーティングシステムによります。
GNU/Linux の場合、 use-coredump-filter
が無効となり、
dump-excluded-mappings
が有効となります。
任意の引数 prefix を指定すると、コアダンプのファイル名を定める際のプレフィックスとして、その値が用いられます。 ファイル名は prefix.pid として構成されます。 この場合の pid は、 gcore が解析している実行プログラムのプロセス ID です。 これが指定されたなかった場合、 prefix のデフォルト値は gcore です。
GDB の完全なドキュメントは Texinfo
マニュアルとしてメンテナンスされています。info
と
gdb
の両プログラム、および GDB の Texinfo
ドキュメントが適切にインストールされていれば、以下のコマンド
info gdb
を実行して完全なマニュアルを参照できます。
Using GDB: A Guide to the GNU Source-Level Debugger, Richard M. Stallman and Roland H. Pesch, July 1991.
Copyright (c) 1988-2022 Free Software Foundation, Inc.
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with the Invariant Sections being Free Software and Free Software Needs Free Documentation, with the Front-Cover Texts being A GNU Manual, and with the Back-Cover Texts as in (a) below.
(a) FSF の裏表紙には、 以下の文章が記述されています: You are free to copy and modify this GNU Manual. Buying copies from GNU Press supports the FSF in developing GNU and promoting software freedom.