From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29249 invoked by alias); 16 Jan 2008 10:40:13 -0000 Received: (qmail 29239 invoked by uid 22791); 16 Jan 2008 10:40:13 -0000 X-Spam-Check-By: sourceware.org Received: from mtagate1.de.ibm.com (HELO mtagate1.de.ibm.com) (195.212.29.150) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 16 Jan 2008 10:39:48 +0000 Received: from d12nrmr1607.megacenter.de.ibm.com (d12nrmr1607.megacenter.de.ibm.com [9.149.167.49]) by mtagate1.de.ibm.com (8.13.8/8.13.8) with ESMTP id m0GAdj34206312 for ; Wed, 16 Jan 2008 10:39:45 GMT Received: from d12av02.megacenter.de.ibm.com (d12av02.megacenter.de.ibm.com [9.149.165.228]) by d12nrmr1607.megacenter.de.ibm.com (8.13.8/8.13.8/NCO v8.7) with ESMTP id m0GAdjs62715854 for ; Wed, 16 Jan 2008 11:39:45 +0100 Received: from d12av02.megacenter.de.ibm.com (loopback [127.0.0.1]) by d12av02.megacenter.de.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id m0GAdiOG030470 for ; Wed, 16 Jan 2008 11:39:45 +0100 Received: from bbkeks.de.ibm.com (dyn-9-152-248-46.boeblingen.de.ibm.com [9.152.248.46]) by d12av02.megacenter.de.ibm.com (8.12.11.20060308/8.12.11) with ESMTP id m0GAdgn6030386 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 16 Jan 2008 11:39:44 +0100 Message-ID: <478DDE7F.2060305@de.ibm.com> Date: Wed, 16 Jan 2008 10:40:00 -0000 From: Markus Deuling User-Agent: Thunderbird 2.0.0.9 (X11/20071031) MIME-Version: 1.0 To: Joel Brobecker CC: Eli Zaretskii , gdb-patches@sourceware.org, Ulrich Weigand Subject: Re: [RFA] new set/show multiple-choice-auto-select commands References: <20080101143621.GC24843@adacore.com> <20080102043449.GA15903@adacore.com> <478C7C48.2010502@de.ibm.com> <20080115123700.GK9143@adacore.com> <478DB261.5020807@de.ibm.com> <20080116101939.GA28020@adacore.com> In-Reply-To: <20080116101939.GA28020@adacore.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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/msg00395.txt.bz2 Joel Brobecker schrieb: >>> 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. As far as I see there are two paths GDB can follow currently: 1. If GDB currently stands in a shared library which was built using -Bsymbolic it will pick the first symbol matching from exactly that library. 2. "default" In all other cases (so without -Bsymbolc in a shared library) GDB's lookup starts in the main executables binary. If the user for example stand in a shared library and invokes "br foo" and there is a symbol in that library and in the main executable as well, GDB will pick the one in the meain executable. If the symbol is not found in the main executable GDB iterates over the shared libraries and picks the first symbol found. > > Deal. A new patch should be sent soon. > Great, standing by ... :-) Regards, Markus -- Markus Deuling GNU Toolchain for Linux on Cell BE deuling@de.ibm.com