From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28422 invoked by alias); 15 Jan 2008 12:37:30 -0000 Received: (qmail 28408 invoked by uid 22791); 15 Jan 2008 12:37:28 -0000 X-Spam-Check-By: sourceware.org Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 15 Jan 2008 12:37:11 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 669A22A965A; Tue, 15 Jan 2008 07:37:09 -0500 (EST) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id O8aoNMOf0gZp; Tue, 15 Jan 2008 07:37:09 -0500 (EST) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id 81A112A9657; Tue, 15 Jan 2008 07:37:08 -0500 (EST) Received: by joel.gnat.com (Postfix, from userid 1000) id BFC72E7ACB; Tue, 15 Jan 2008 04:37:00 -0800 (PST) Date: Tue, 15 Jan 2008 12:37:00 -0000 From: Joel Brobecker To: Markus Deuling Cc: Eli Zaretskii , gdb-patches@sourceware.org, Ulrich Weigand Subject: Re: [RFA] new set/show multiple-choice-auto-select commands Message-ID: <20080115123700.GK9143@adacore.com> References: <20080101143621.GC24843@adacore.com> <20080102043449.GA15903@adacore.com> <478C7C48.2010502@de.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <478C7C48.2010502@de.ibm.com> User-Agent: Mutt/1.4.2.2i 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/msg00348.txt.bz2 Hi Markus, > I attached a patch which introduces a new command "set symbol-user-choice > on" which is off per default. If set to on a symbol lookup finding > >1 appropriate symbol (for example break foo, with foo in main and in a > >shared lib) a user choice (decode_line_2) is invoked. The principle is indeed the same. The semantics of your command are a little unclear to me, as you didn't say what should happen if symbol-user-choice is off and you have more than one symbol matching. Do you cancel the lookup, choose all symbols, and pick one at random? We have one non-technical issue to solve if we are to merge the two ideas into one setting: You suggest the default to be off, which means no menu. But in Ada, we want the default to be "on" because we have always printed these menus in Ada, and removing them now would be a change of behavior. > Maybe we can merge the patches? I'd like to see the "set > symbol-user-choice on|off" command rather in a language-undependent > place like linespec.c as in a language-specific file like ada. What do > you think? Do you see the possibility for that? Absolutely. The reason why I posted this patch as a RFC is that I realized that this feature could be used for all languages, not just Ada. It's still on my plate to adjust the patch to put this in linespec instead of ada-lang - I will get to it soon. Would you be ok with using my command, however? I like the name better, but most of all, it's a little more complete: It's a tri-state setting as opposed to a binary one. We need to resolve the issue of the default. > Btw, I'd really appreciate your feedback on that patch. Would this be ok > for mainline? I'll admit that I only quickly scanned the patch, because I actually prefer the command that I suggested... -- Joel