[PATCH] Add shortcuts for "nexti" and "stepi" commands in Single-Key mode

Ruslan Kabatsayev
2017-07-13T06:13:23Z

Currently, "layout asm" is not so useful as "layout src" with Single-Key mode:
you have to use multi-key commands like "ni" and "si" to do single-stepping.
This patch adds, in addition to "next" and "step" commands, corresponding
assembly-level ones - "nexti" and "stepi" - to Single-Key mode, with the
shortcuts of "N" and "S" respectively.

gdb/ChangeLog:

* tui/tui.c: Add "nexti" and "stepi" to the tui_commands list
* doc/gdb.texinfo: Document the new shortcuts in Single-Key mode
---
gdb/doc/gdb.texinfo | 8 ++++++++
gdb/tui/tui.c | 2 ++
2 files changed, 10 insertions(+)

diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
index c167a86..56163ab 100644
--- a/gdb/doc/gdb.texinfo
+++ b/gdb/doc/gdb.texinfo
@@ -25415,6 +25415,10 @@ finish
@item n
next

+@kindex N @r{(SingleKey TUI key)}
+@item N
+nexti
+
@kindex q @r{(SingleKey TUI key)}
@item q
exit the SingleKey mode.
@@ -25427,6 +25431,10 @@ run
@item s
step

+@kindex S @r{(SingleKey TUI key)}
+@item S
+stepi
+
@kindex u @r{(SingleKey TUI key)}
@item u
up
diff --git a/gdb/tui/tui.c b/gdb/tui/tui.c
index c918f3e..dbd86e8 100644
--- a/gdb/tui/tui.c
+++ b/gdb/tui/tui.c
@@ -75,8 +75,10 @@ static const struct tui_char_command tui_commands[] = {
{ 'd', "down" },
{ 'f', "finish" },
{ 'n', "next" },
+ { 'N', "nexti" },
{ 'r', "run" },
{ 's', "step" },
+ { 'S', "stepi" },
{ 'u', "up" },
{ 'v', "info locals" },
{ 'w', "where" },
--
1.7.10.2