Viewing the Command History

You can see all the commands you have already entered by using the history command. This command is only available in DBX mode. Specify a number of commands to show, starting with the most recent. If you do not specify a number, the value of the debugger variable $historylines (default 20) will be used to determine the number of previous commands to show.

history_command

: history [ integer_constant ]

For example:

(idb) history 7

18: stop at 182

19: run

20: stop at 103

21: delete 1

22: cont

23: print "history_EXAMPLE START"

24: history 7

In GDB mode, the debugger will read the .gdb_history file by default.

To rename the history file, issue the following command. This command is only available in GDB mode:

(idb) set history filename <name>

or set the environment variable GDBHISTFILE to the filename of the history file you want to use. This can be overridden during the debug session by using the set history file <name> command.

To turn history recording on and off, issue the following command. This command is only available in GDB mode:

(idb) set history save [on|off]

To configure the history size, issue the following command. This command is only available in GDB mode:

(idb) set history size <number>

or set the environment variable HISTSIZE to the size you want.

If neither of these choices are used, the default size is 256.

See also:

History replacement of the line.