From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20424 invoked by alias); 16 Jan 2008 10:20:07 -0000 Received: (qmail 20416 invoked by uid 22791); 16 Jan 2008 10:20:07 -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; Wed, 16 Jan 2008 10:19:49 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id D619C2A9653; Wed, 16 Jan 2008 05:19:47 -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 e8Oq5jyQ+IpN; Wed, 16 Jan 2008 05:19:47 -0500 (EST) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id 02D992A964F; Wed, 16 Jan 2008 05:19:47 -0500 (EST) Received: by joel.gnat.com (Postfix, from userid 1000) id 85D5FE7ACB; Wed, 16 Jan 2008 02:19:39 -0800 (PST) Date: Wed, 16 Jan 2008 10:20: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: <20080116101939.GA28020@adacore.com> References: <20080101143621.GC24843@adacore.com> <20080102043449.GA15903@adacore.com> <478C7C48.2010502@de.ibm.com> <20080115123700.GK9143@adacore.com> <478DB261.5020807@de.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <478DB261.5020807@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/msg00392.txt.bz2 > >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? > > no, if it is set to off the default behaviour of GDB takes place. GDB > executes the "normal" symbol lookup routines as-is now. Actually, I was asking you to confirm what the current "normal" symbol lookup does. AFAIK, it picks one symbol at random, which is a bug. So my question still stands :), but the answer is not critical for my part of the patch - we can talk about that later when you make your own adjustments inside linespec. > Hm, I guess it should be ok to have "on" as default. I could change > the patch a bit so the the user menu only gets invoked if > 1 symbol > is found and the normal lookup routines if <= 1 symbol is found. > Then there would only be a choice if there are multiple symbols. Absolutely. There is no point in printing a menu if there is only one match :). You will notice that I am thinking purely in terms of user interface at this point, I'm leaving the implementation aspect out as an implementation detail. > Sure, if you put your command in linespec.c and set default to "on" > I'll rework the patch to make use of the command and invoke the user > menu if there are > 1 symbols found. Deal. A new patch should be sent soon. -- Joel