From: Magne Hov Date: Wed, 13 Dec 2023 11:45:49 +0000 (+0000) Subject: [gdb/tui] add SingleKey bindings for reverse execution commands X-Git-Tag: binutils-2_42~609 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=14a2449eee4654bee0686020e6eeb4e4f2a8f9ca;p=thirdparty%2Fbinutils-gdb.git [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 Approved-By: Tom Tromey --- diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo index 6e4adf512ee..7a5d357b99b 100644 --- a/gdb/doc/gdb.texinfo +++ b/gdb/doc/gdb.texinfo @@ -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 diff --git a/gdb/tui/tui.c b/gdb/tui/tui.c index 33aced2e7e3..885588a1b95 100644 --- a/gdb/tui/tui.c +++ b/gdb/tui/tui.c @@ -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" },