From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9168 invoked by alias); 28 Oct 2003 04:03:49 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 9119 invoked from network); 28 Oct 2003 04:03:48 -0000 Received: from unknown (HELO nevyn.them.org) (66.93.172.17) by sources.redhat.com with SMTP; 28 Oct 2003 04:03:48 -0000 Received: from drow by nevyn.them.org with local (Exim 4.24 #1 (Debian)) id 1AEL59-0006pi-Vg for ; Mon, 27 Oct 2003 23:03:47 -0500 Date: Tue, 28 Oct 2003 04:03:00 -0000 From: Daniel Jacobowitz To: gdb-patches@sources.redhat.com Subject: Re: report valid values for all errors for enum variables... Message-ID: <20031028040347.GA26218@nevyn.them.org> Mail-Followup-To: gdb-patches@sources.redhat.com References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.1i X-SW-Source: 2003-10/txt/msg00802.txt.bz2 On Mon, Oct 27, 2003 at 06:03:45PM -0800, Jim Ingham wrote: > Hi, all... > > The set command for "var_enum" type gdb variables will give you a > helpful error message if you say something like: > > (gdb) set osabi > Requires an argument. Valid arguments are auto, default, none, Darwin, > Darwin64. > > But not if you do: > > (gdb) set osabi Blubby > Undefined item: "Blubby" > > It would be nice if folks didn't have to remember that osabi is an enum > type variable, and they should go back and type "set osabi" with no > arguments, etc. The following patch makes it symmetrical, so you get: > > (top-gdb) set osabi > Requires an argument. Valid values are auto, default, none, Darwin, > Darwin64. > (top-gdb) set osabi foobar > Undefined item: "foobar". Valid values are auto, default, none, Darwin, > Darwin64. > (top-gdb) set osabi Darw > Ambiguous item "Darw". Valid values are auto, default, none, Darwin, > Darwin64. > > Does this seem good? > > 2003-10-27 Jim Ingham > > * cli/cli-setshow.c (do_setshow_command): For var_enum type > variables, > return the list of valid values for all errors, not just no argument. > I like it. In fact, I really, really, really like it :) This is OK. -- Daniel Jacobowitz MontaVista Software Debian GNU/Linux Developer