gdb.info: Keyboard Macros

Go forward to Miscellaneous Commands
Go backward to Commands For Completion
Go up to Bindable Readline Commands
Go to the top op gdb

Keyboard Macros

`start-kbd-macro (C-x ()'
     Begin saving the characters typed into the current keyboard macro.
`end-kbd-macro (C-x ))'
     Stop saving the characters typed into the current keyboard macro
     and save the definition.
`call-last-kbd-macro (C-x e)'
     Re-execute the last keyboard macro defined, by making the
     characters in the macro appear as if typed at the keyboard.