* [RFA] Ensure class_tui is listed in the output of "help" giving the list of classes.
@ 2020-05-23 21:22 Philippe Waroquiers
2020-05-26 20:13 ` Tom Tromey
0 siblings, 1 reply; 3+ messages in thread
From: Philippe Waroquiers @ 2020-05-23 21:22 UTC (permalink / raw)
To: gdb-patches
Before this change, "help" was not showing the TUI class.
With this change:
(gdb) help
...
support -- Support facilities.
text-user-interface -- TUI is the GDB text based interface.
tracepoints -- Tracing of program execution without stopping the program.
...
(gdb) help text-user-interface
TUI is the GDB text based interface.
In TUI mode, GDB can display several text windows showing
the source file, the processor registers, the program disassembly, ...
List of commands:
+ -- Scroll window forward.
...
Note that we cannot use "tui" for the fake class command name, as "tui"
is a command.
gdb/ChangeLog
YYYY-MM-DD Philippe Waroquiers <philippe.waroquiers@skynet.be>
* command.h: Add comment giving the name of class_tui.
* cli/cli-cmds.c (_initialize_cli_cmds): If TUI defined,
create the fake command for the help for class_tui.
---
gdb/cli/cli-cmds.c | 6 ++++++
gdb/command.h | 2 +-
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/gdb/cli/cli-cmds.c b/gdb/cli/cli-cmds.c
index eb6e32b046..fdc8758bcd 100644
--- a/gdb/cli/cli-cmds.c
+++ b/gdb/cli/cli-cmds.c
@@ -2150,6 +2150,12 @@ Variable lookups are done with respect to the selected frame.\n\
When the program being debugged stops, gdb selects the innermost frame.\n\
The commands below can be used to select other frames by number or address."),
&cmdlist);
+#ifdef TUI
+ add_cmd ("text-user-interface", class_tui,
+ _("TUI is the GDB text based interface.\n\
+In TUI mode, GDB can display several text windows showing\n\
+the source file, the processor registers, the program disassembly, ..."), &cmdlist);
+#endif
add_cmd ("running", class_run, _("Running the program."), &cmdlist);
/* Define general commands. */
diff --git a/gdb/command.h b/gdb/command.h
index 04a380cba4..32b5b35b0c 100644
--- a/gdb/command.h
+++ b/gdb/command.h
@@ -64,7 +64,7 @@ enum command_class
class_bookmark,
class_obscure, /* obscure */
class_maintenance, /* internals */
- class_tui,
+ class_tui, /* text-user-interface */
class_user, /* user-defined */
/* Used for "show" commands that have no corresponding "set" command. */
--
2.20.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [RFA] Ensure class_tui is listed in the output of "help" giving the list of classes.
2020-05-23 21:22 [RFA] Ensure class_tui is listed in the output of "help" giving the list of classes Philippe Waroquiers
@ 2020-05-26 20:13 ` Tom Tromey
2020-05-26 20:58 ` Philippe Waroquiers
0 siblings, 1 reply; 3+ messages in thread
From: Tom Tromey @ 2020-05-26 20:13 UTC (permalink / raw)
To: Philippe Waroquiers via Gdb-patches
>>>>> "Philippe" == Philippe Waroquiers via Gdb-patches <gdb-patches@sourceware.org> writes:
Philippe> YYYY-MM-DD Philippe Waroquiers <philippe.waroquiers@skynet.be>
Philippe> * command.h: Add comment giving the name of class_tui.
Philippe> * cli/cli-cmds.c (_initialize_cli_cmds): If TUI defined,
Philippe> create the fake command for the help for class_tui.
Looks good to me. Thanks for noticing this & fixing it.
Tom
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [RFA] Ensure class_tui is listed in the output of "help" giving the list of classes.
2020-05-26 20:13 ` Tom Tromey
@ 2020-05-26 20:58 ` Philippe Waroquiers
0 siblings, 0 replies; 3+ messages in thread
From: Philippe Waroquiers @ 2020-05-26 20:58 UTC (permalink / raw)
To: Tom Tromey, Philippe Waroquiers via Gdb-patches
On Tue, 2020-05-26 at 14:13 -0600, Tom Tromey wrote:
> > > > > > "Philippe" == Philippe Waroquiers via Gdb-patches <gdb-patches@sourceware.org> writes:
>
> Philippe> YYYY-MM-DD Philippe Waroquiers <philippe.waroquiers@skynet.be>
>
> Philippe> * command.h: Add comment giving the name of class_tui.
> Philippe> * cli/cli-cmds.c (_initialize_cli_cmds): If TUI defined,
> Philippe> create the fake command for the help for class_tui.
>
> Looks good to me. Thanks for noticing this & fixing it.
Thanks for the review, pushed.
Philippe
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-05-26 20:58 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-23 21:22 [RFA] Ensure class_tui is listed in the output of "help" giving the list of classes Philippe Waroquiers
2020-05-26 20:13 ` Tom Tromey
2020-05-26 20:58 ` Philippe Waroquiers
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).