From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16310 invoked by alias); 18 Nov 2005 20:25:58 -0000 Received: (qmail 16269 invoked by uid 22791); 18 Nov 2005 20:25:55 -0000 Received: from mx1.redhat.com (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Fri, 18 Nov 2005 20:25:55 +0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.11/8.12.11) with ESMTP id jAIKPrSt026221 for ; Fri, 18 Nov 2005 15:25:53 -0500 Received: from potter.sfbay.redhat.com (potter.sfbay.redhat.com [172.16.27.15]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id jAIKPmV16695 for ; Fri, 18 Nov 2005 15:25:53 -0500 Received: from [172.16.24.50] (bluegiant.sfbay.redhat.com [172.16.24.50]) by potter.sfbay.redhat.com (8.12.8/8.12.8) with ESMTP id jAIKPkPe021377 for ; Fri, 18 Nov 2005 15:25:47 -0500 Message-ID: <437E38CA.1040300@redhat.com> Date: Fri, 18 Nov 2005 21:35:00 -0000 From: Michael Snyder User-Agent: Mozilla Thunderbird (X11/20050322) MIME-Version: 1.0 To: GDB Patches Subject: [RFA] Add new command class_experimental Content-Type: multipart/mixed; boundary="------------040708080309010501020905" X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2005-11/txt/msg00343.txt.bz2 This is a multi-part message in MIME format. --------------040708080309010501020905 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-length: 584 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. --------------040708080309010501020905 Content-Type: text/plain; name="xperimental" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="xperimental" Content-length: 4490 2005-11-18 Michael Snyder * 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 --------------040708080309010501020905--