From: Michael Snyder <msnyder@redhat.com>
To: GDB Patches <gdb-patches@sources.redhat.com>
Subject: [RFA] Add new command class_experimental
Date: Fri, 18 Nov 2005 21:35:00 -0000 [thread overview]
Message-ID: <437E38CA.1040300@redhat.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 584 bytes --]
This is to add a new category of gdb commands, "experimental".
These will be explicitly "use at your own risk", and gdb will
tell you so.
This is for new stuff under development, for example the
restore-core-file command, which are meant only for use
by savvy folks who won't be surprised if stuff goes wrong.
They're not really 'maintainance', and they're not really
'obscure', and having a separate class makes it possible
for gdb to explicitly be a nudge about them.
If and when such a command is judged mature and stable,
it will be moved into one of the traditional classes.
[-- Attachment #2: xperimental --]
[-- Type: text/plain, Size: 4490 bytes --]
2005-11-18 Michael Snyder <msnyder@redhat.com>
* command.h (enum command_class): Add new class 'experimental'.
* cli/cli-cmds.c (init_cli_cmds): Initialize class_experimental.
* cli/cli-decode.c (help_cmd): Add warning flag to help for
any command of class_experimental.\
* doc/gdb.texinfo (List of classes of commands): Mention
experimental command class.
Index: command.h
===================================================================
RCS file: /cvs/src/src/gdb/command.h,v
retrieving revision 1.53
diff -p -r1.53 command.h
*** command.h 26 May 2005 20:48:57 -0000 1.53
--- command.h 18 Nov 2005 20:04:26 -0000
*************** enum command_class
*** 35,41 ****
no_class = -1, class_run = 0, class_vars, class_stack,
class_files, class_support, class_info, class_breakpoint, class_trace,
class_alias, class_obscure, class_user, class_maintenance,
! class_pseudo, class_tui, class_xdb
};
/* FIXME: cagney/2002-03-17: Once cmd_type() has been removed, ``enum
--- 35,41 ----
no_class = -1, class_run = 0, class_vars, class_stack,
class_files, class_support, class_info, class_breakpoint, class_trace,
class_alias, class_obscure, class_user, class_maintenance,
! class_pseudo, class_tui, class_xdb, class_experimental
};
/* FIXME: cagney/2002-03-17: Once cmd_type() has been removed, ``enum
Index: cli/cli-cmds.c
===================================================================
RCS file: /cvs/src/src/gdb/cli/cli-cmds.c,v
retrieving revision 1.62
diff -p -r1.62 cli-cmds.c
*** cli/cli-cmds.c 4 Jul 2005 13:29:13 -0000 1.62
--- cli/cli-cmds.c 18 Nov 2005 20:04:29 -0000
*************** Some gdb commands are provided just for
*** 1110,1117 ****
These commands are subject to frequent change, and may not be as\n\
well documented as user commands."),
&cmdlist);
! add_cmd ("obscure", class_obscure, NULL, _("Obscure features."), &cmdlist);
! add_cmd ("aliases", class_alias, NULL, _("Aliases of other commands."), &cmdlist);
add_cmd ("user-defined", class_user, NULL, _("\
User-defined commands.\n\
The commands in this class are those defined by the user.\n\
--- 1110,1122 ----
These commands are subject to frequent change, and may not be as\n\
well documented as user commands."),
&cmdlist);
! add_cmd ("obscure", class_obscure, NULL,
! _("Obscure features."), &cmdlist);
! add_cmd ("experimental", class_experimental, NULL,
! _("Experimental features (no guarantees; use at own risk)."),
! &cmdlist);
! add_cmd ("aliases", class_alias, NULL,
! _("Aliases of other commands."), &cmdlist);
add_cmd ("user-defined", class_user, NULL, _("\
User-defined commands.\n\
The commands in this class are those defined by the user.\n\
Index: cli/cli-decode.c
===================================================================
RCS file: /cvs/src/src/gdb/cli/cli-decode.c,v
retrieving revision 1.55
diff -p -r1.55 cli-decode.c
*** cli/cli-decode.c 26 May 2005 20:49:02 -0000 1.55
--- cli/cli-decode.c 18 Nov 2005 20:04:29 -0000
*************** help_cmd (char *command, struct ui_file
*** 771,779 ****
fputs_filtered (c->doc, stream);
fputs_filtered ("\n", stream);
if (c->prefixlist == 0 && c->func != NULL)
return;
! fprintf_filtered (stream, "\n");
/* If this is a prefix command, print it's subcommands */
if (c->prefixlist)
--- 771,785 ----
fputs_filtered (c->doc, stream);
fputs_filtered ("\n", stream);
+ if (c->func != NULL && c->class == class_experimental)
+ {
+ fputs_filtered ("Experimental! Use at your own risk!\n",
+ stream);
+ }
+
if (c->prefixlist == 0 && c->func != NULL)
return;
! fputs_filtered ("\n", stream);
/* If this is a prefix command, print it's subcommands */
if (c->prefixlist)
Index: doc/gdb.texinfo
===================================================================
RCS file: /cvs/src/src/gdb/doc/gdb.texinfo,v
retrieving revision 1.294
diff -p -r1.294 gdb.texinfo
*** doc/gdb.texinfo 18 Nov 2005 19:20:56 -0000 1.294
--- doc/gdb.texinfo 18 Nov 2005 20:20:17 -0000
*************** List of classes of commands:
*** 1545,1550 ****
--- 1545,1551 ----
aliases -- Aliases of other commands
breakpoints -- Making program stop at certain points
data -- Examining data
+ experimental -- Experimental features (no guarantees; use at own risk)
files -- Specifying and examining files
internals -- Maintenance commands
obscure -- Obscure features
next reply other threads:[~2005-11-18 20:25 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-11-18 21:35 Michael Snyder [this message]
2005-11-18 21:36 ` Eli Zaretskii
2005-11-18 21:41 ` Michael Snyder
2005-11-19 1:17 ` Eli Zaretskii
2005-11-19 1:21 ` Michael Snyder
2005-11-19 1:22 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=437E38CA.1040300@redhat.com \
--to=msnyder@redhat.com \
--cc=gdb-patches@sources.redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox