[gdb/tui] add SingleKey bindings for reverse execution commands

The bindings for the reverse execution commands are the same letters
as the forward execution command, but with the opposite case. This way
one can simply hold down the Shift modifier key or tap the Caps Lock key
to change the direction of execution.

Reviewed-By: Eli Zaretskii <eliz@gnu.org>
Approved-By: Tom Tromey <tom@tromey.com>
This commit is contained in:
Magne Hov 2023-12-13 11:45:49 +00:00
parent 8170efad36
commit 14a2449eee
2 changed files with 30 additions and 0 deletions

View File

@ -30481,6 +30481,10 @@ switch into this mode, where the following key bindings are used:
@item c
continue
@kindex C @r{(SingleKey TUI key)}
@item C
reverse-continue
@kindex d @r{(SingleKey TUI key)}
@item d
down
@ -30489,14 +30493,26 @@ down
@item f
finish
@kindex F @r{(SingleKey TUI key)}
@item F
reverse-finish
@kindex n @r{(SingleKey TUI key)}
@item n
next
@kindex N @r{(SingleKey TUI key)}
@item N
reverse-next
@kindex o @r{(SingleKey TUI key)}
@item o
nexti. The shortcut letter @samp{o} stands for ``step Over''.
@kindex O @r{(SingleKey TUI key)}
@item O
reverse-nexti
@kindex q @r{(SingleKey TUI key)}
@item q
exit the SingleKey mode.
@ -30509,10 +30525,18 @@ run
@item s
step
@kindex S @r{(SingleKey TUI key)}
@item S
reverse-step
@kindex i @r{(SingleKey TUI key)}
@item i
stepi. The shortcut letter @samp{i} stands for ``step Into''.
@kindex I @r{(SingleKey TUI key)}
@item I
reverse-stepi
@kindex u @r{(SingleKey TUI key)}
@item u
up

View File

@ -85,13 +85,19 @@ struct tui_char_command
mode. */
static const struct tui_char_command tui_commands[] = {
{ 'c', "continue" },
{ 'C', "reverse-continue" },
{ 'd', "down" },
{ 'f', "finish" },
{ 'F', "reverse-finish" },
{ 'n', "next" },
{ 'N', "reverse-next" },
{ 'o', "nexti" },
{ 'O', "reverse-nexti" },
{ 'r', "run" },
{ 's', "step" },
{ 'S', "reverse-step" },
{ 'i', "stepi" },
{ 'I', "reverse-stepi" },
{ 'u', "up" },
{ 'v', "info locals" },
{ 'w', "where" },