public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] [gdb/tui] add SingleKey bindings for reverse execution commands
@ 2023-12-08 13:38 Magne Hov
  2023-12-08 15:11 ` Tom Tromey
  2023-12-08 16:27 ` [PATCH v2] " Magne Hov
  0 siblings, 2 replies; 8+ messages in thread
From: Magne Hov @ 2023-12-08 13:38 UTC (permalink / raw)
  To: gdb-patches; +Cc: Magne Hov

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.
---
 gdb/tui/tui.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/gdb/tui/tui.c b/gdb/tui/tui.c
index 941c65c970f..6d6a03251e7 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" },
-- 
2.40.1


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] [gdb/tui] add SingleKey bindings for reverse execution commands
  2023-12-08 13:38 [PATCH] [gdb/tui] add SingleKey bindings for reverse execution commands Magne Hov
@ 2023-12-08 15:11 ` Tom Tromey
  2023-12-08 16:27 ` [PATCH v2] " Magne Hov
  1 sibling, 0 replies; 8+ messages in thread
From: Tom Tromey @ 2023-12-08 15:11 UTC (permalink / raw)
  To: Magne Hov; +Cc: gdb-patches

>>>>> "Magne" == Magne Hov <mhov@undo.io> writes:

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

IMO it's fine to do this, but this patch needs an accompanying change to
the manual.  See the "TUI Single Key Mode" node.

thanks,
Tom

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH v2] [gdb/tui] add SingleKey bindings for reverse execution commands
  2023-12-08 13:38 [PATCH] [gdb/tui] add SingleKey bindings for reverse execution commands Magne Hov
  2023-12-08 15:11 ` Tom Tromey
@ 2023-12-08 16:27 ` Magne Hov
  2023-12-08 19:23   ` Eli Zaretskii
  2023-12-11 15:11   ` Tom Tromey
  1 sibling, 2 replies; 8+ messages in thread
From: Magne Hov @ 2023-12-08 16:27 UTC (permalink / raw)
  To: gdb-patches; +Cc: Magne Hov

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.
---
 gdb/doc/gdb.texinfo | 24 ++++++++++++++++++++++++
 gdb/tui/tui.c       |  6 ++++++
 2 files changed, 30 insertions(+)

diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
index d2428efdb63..c42ccfdcb6d 100644
--- a/gdb/doc/gdb.texinfo
+++ b/gdb/doc/gdb.texinfo
@@ -30431,6 +30431,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
@@ -30439,14 +30443,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.
@@ -30459,10 +30475,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 941c65c970f..6d6a03251e7 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" },
-- 
2.40.1


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH v2] [gdb/tui] add SingleKey bindings for reverse execution commands
  2023-12-08 16:27 ` [PATCH v2] " Magne Hov
@ 2023-12-08 19:23   ` Eli Zaretskii
  2023-12-11 15:11   ` Tom Tromey
  1 sibling, 0 replies; 8+ messages in thread
From: Eli Zaretskii @ 2023-12-08 19:23 UTC (permalink / raw)
  To: Magne Hov; +Cc: gdb-patches

> From: Magne Hov <mhov@undo.io>
> Cc: Magne Hov <mhov@undo.io>
> Date: Fri,  8 Dec 2023 16:27:54 +0000
> 
> 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.
> ---
>  gdb/doc/gdb.texinfo | 24 ++++++++++++++++++++++++
>  gdb/tui/tui.c       |  6 ++++++
>  2 files changed, 30 insertions(+)

Thanks, the documentation part is OK.

Reviewed-By: Eli Zaretskii <eliz@gnu.org>

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH v2] [gdb/tui] add SingleKey bindings for reverse execution commands
  2023-12-08 16:27 ` [PATCH v2] " Magne Hov
  2023-12-08 19:23   ` Eli Zaretskii
@ 2023-12-11 15:11   ` Tom Tromey
  2023-12-12 14:59     ` Magne Hov
  1 sibling, 1 reply; 8+ messages in thread
From: Tom Tromey @ 2023-12-11 15:11 UTC (permalink / raw)
  To: Magne Hov; +Cc: gdb-patches

>>>>> "Magne" == Magne Hov <mhov@undo.io> writes:

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

Thanks.
Approved-By: Tom Tromey <tom@tromey.com>

Tom

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH v2] [gdb/tui] add SingleKey bindings for reverse execution commands
  2023-12-11 15:11   ` Tom Tromey
@ 2023-12-12 14:59     ` Magne Hov
  2023-12-12 18:15       ` Tom Tromey
  0 siblings, 1 reply; 8+ messages in thread
From: Magne Hov @ 2023-12-12 14:59 UTC (permalink / raw)
  To: Tom Tromey; +Cc: gdb-patches

Thank you.

Would you want any other maintainers to approve before I check this in?

On Mon, Dec 11 2023, Tom Tromey wrote:

>>>>>> "Magne" == Magne Hov <mhov@undo.io> writes:
>
> Magne> The bindings for the reverse execution commands are the same letters
> Magne> as the forward execution command, but with the opposite case. This way
> Magne> one can simply hold down the Shift modifier key or tap the Caps Lock key
> Magne> to change the direction of execution.
>
> Thanks.
> Approved-By: Tom Tromey <tom@tromey.com>
>
> Tom

-- 
Magne Hov | Software Engineer | Direct: +44 7395 395 648 | mhov@undo.io

Undo | Record. Replay. Resolve

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH v2] [gdb/tui] add SingleKey bindings for reverse execution commands
  2023-12-12 14:59     ` Magne Hov
@ 2023-12-12 18:15       ` Tom Tromey
  2023-12-13 12:06         ` Magne Hov
  0 siblings, 1 reply; 8+ messages in thread
From: Tom Tromey @ 2023-12-12 18:15 UTC (permalink / raw)
  To: Magne Hov; +Cc: Tom Tromey, gdb-patches

>>>>> "Magne" == Magne Hov <mhov@undo.io> writes:

Magne> Thank you.
Magne> Would you want any other maintainers to approve before I check this in?

I think it's fine to just go ahead.
Worst case, if someone does not like it, we can always pull it if we
really need to.

Tom

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH v2] [gdb/tui] add SingleKey bindings for reverse execution commands
  2023-12-12 18:15       ` Tom Tromey
@ 2023-12-13 12:06         ` Magne Hov
  0 siblings, 0 replies; 8+ messages in thread
From: Magne Hov @ 2023-12-13 12:06 UTC (permalink / raw)
  To: Tom Tromey; +Cc: Tom Tromey, gdb-patches

On Tue, Dec 12 2023, Tom Tromey wrote:

>>>>>> "Magne" == Magne Hov <mhov@undo.io> writes:
>
> Magne> Thank you.
> Magne> Would you want any other maintainers to approve before I check this in?
>
> I think it's fine to just go ahead.
> Worst case, if someone does not like it, we can always pull it if we
> really need to.

Thank you. This is pushed now.

>
> Tom

-- 
Magne Hov | Software Engineer | Direct: +44 7395 395 648 | mhov@undo.io

Undo | Record. Replay. Resolve

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2023-12-13 12:06 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-12-08 13:38 [PATCH] [gdb/tui] add SingleKey bindings for reverse execution commands Magne Hov
2023-12-08 15:11 ` Tom Tromey
2023-12-08 16:27 ` [PATCH v2] " Magne Hov
2023-12-08 19:23   ` Eli Zaretskii
2023-12-11 15:11   ` Tom Tromey
2023-12-12 14:59     ` Magne Hov
2023-12-12 18:15       ` Tom Tromey
2023-12-13 12:06         ` Magne Hov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).