GDB reads its input commands via the Readline interface. This
GNU library provides consistent behavior for programs which provide a
command line interface to the user. Advantages are GNU Emacs-style
or vi-style inline editing of commands,
substitution, and a storage and recall of command history across
You may control the behavior of command line editing in GDB with the
set editing on
Enable command line editing (enabled by default).
set editing off
Disable command line editing.
Show whether command line editing is enabled.
See Command Line Editing,
for more details about the Readline
interface. Users unfamiliar with GNU Emacs or
encouraged to read that chapter.
GDB sets the Readline application name to ‘gdb’. This is useful for conditions in .inputrc.
GDB defines a bindable Readline command,
operate-and-get-next. This is bound to C-o by default.
This command accepts the current line for execution and fetches the
next line relative to the current line from the history for editing.
Any argument is ignored.