From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15274 invoked by alias); 1 Jan 2008 20:16:20 -0000 Received: (qmail 15266 invoked by uid 22791); 1 Jan 2008 20:16:19 -0000 X-Spam-Check-By: sourceware.org Received: from romy.inter.net.il (HELO romy.inter.net.il) (213.8.233.24) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 01 Jan 2008 20:15:54 +0000 Received: from HOME-C4E4A596F7 (IGLD-83-130-255-248.inter.net.il [83.130.255.248]) by romy.inter.net.il (MOS 3.7.3-GA) with ESMTP id JTZ49581 (AUTH halo1); Tue, 1 Jan 2008 22:14:48 +0200 (IST) Date: Tue, 01 Jan 2008 20:16:00 -0000 Message-Id: From: Eli Zaretskii To: Joel Brobecker CC: gdb-patches@sourceware.org In-reply-to: <20080101143621.GC24843@adacore.com> (message from Joel Brobecker on Tue, 1 Jan 2008 06:36:21 -0800) Subject: Re: [RFA] new set/show multiple-choice-auto-select commands Reply-to: Eli Zaretskii References: <20080101143621.GC24843@adacore.com> X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2008-01/txt/msg00009.txt.bz2 > Date: Tue, 1 Jan 2008 06:36:21 -0800 > From: Joel Brobecker > > The user sometimes enters an expression which is ambiguous. For instance, > the name of a function or a variable which has homonyms... In that case, > the debugger is expected to display the list of possibilities and ask > the user to choose which one he meant (with an additional 2 possible > choices: "all" and "cancel"). > > This has been a very practical solution when in interactive mode > (ie when a user is driving the session), but an annoyance when driving > the debugger with a tool. Please explain why, I'm not sure I understand. When driving GDB with a tool, the tool is responsible for doing TRT, so why is this a nuisance? And how does your solution alleviates that nuisance? > So we added a new set/show command that > allowed the user to configure the behavior of the debugger so that: > 1. Either the menu is still displayed (default behavior); > 2. The choice "all" is always automatically selected; > 3. The choice "cancel" is always automatically selected. > Some of the AdaCore engineers actually disliked the menu and started > using this new command to always select all options, even in > interactive mode. > > The syntax is as follow: > > (gdb) set multiple-choice-auto-select (off|all|cancel) > (gdb) show multiple-choice-auto-select > > As said above, the default is "off", which preserves the current > behavior by default. Can you please give an example of the behavior under each one of these settings? I'm afraid I cannot judge the suggestion without understanding its effect on the users. > + error (_("\ > +canceled because the command is ambiguous and the multiple-choice menu\n\ > +has been deactivated. See set/show multiple-choice-auto-select.")); Shouldn't "canceled" be capitalized? > + add_setshow_enum_cmd ("multiple-choice-auto-select", no_class, > + auto_select_choices, &auto_select_choice, > + _("\ > +Set the debugger behavior when part of a command is ambiguous and\n\ > +a multiple-choice menu would normally be printed."), _("\ The first line of the command's doc string should be a complete sentence, or at least a complete phrase. That's because some help commands only display the first line (and stop at the first comma or period in that line, IIRC). Thanks.