When searching gdb command history, is there a way to go through only those command matching a given one?
for example, sometimes I only want to search previous break commands, not the entire command history. Is there a shortcut to only go through commands that start with “break” or “b”? That can save me a million keystroke.
In regular GDB, CtrlR enables search mode. This works the same as bash, zsh, and many other shells.
Once in search mode, the prompt changes:
Typing letters then enters the text to find:
To find the next command that matches, hit CtrlR again.
To run the command again, hit Enter.
To edit the command, hit the left or right cursor key.