1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

【gdb】コマンドラインの履歴をファイルに保存する

Posted at

gdbのコマンドラインの履歴をファイルに保存する

ホームディレクトリに .gdbinit を置いておくと、gdb を起動する際に読み込まれます。
以下の通り記述しておくとgdb のコマンドラインの履歴を覚えておいてくれるようになります。

set history save on
set history size 1000
set history filename ~/.gdb_history

各行の説明

  1. gdb のコマンドラインの履歴をファイルに保存する
  2. 保存する行を最大 1000 行にする
  3. 保存するファイル名を指定。この例であれば ~/.gdb_history
1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?