From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31994 invoked by alias); 17 Jan 2008 10:27:24 -0000 Received: (qmail 31980 invoked by uid 22791); 17 Jan 2008 10:27:23 -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; Thu, 17 Jan 2008 10:27:06 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 70D8B2A9651; Thu, 17 Jan 2008 05:27:04 -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 keBnQlYiCx9G; Thu, 17 Jan 2008 05:27:04 -0500 (EST) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id 67B1B2A9650; Thu, 17 Jan 2008 05:27:03 -0500 (EST) Received: by joel.gnat.com (Postfix, from userid 1000) id 18901E7ACB; Thu, 17 Jan 2008 02:26:21 -0800 (PST) Date: Thu, 17 Jan 2008 10:27:00 -0000 From: Joel Brobecker To: Markus Deuling Cc: gdb-patches@sourceware.org Subject: Re: [RFA] new set/show multiple-choice-auto-select commands (take 2) Message-ID: <20080117102621.GB28020@adacore.com> References: <20080116135551.GE20837@adacore.com> <478EF71D.4060007@de.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <478EF71D.4060007@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/msg00435.txt.bz2 Hi Markus, > (gdb) br foo2 > Breakpoint 2 at 0xf86444: file > /home/deuling/gdb/dev/gdb/testsuite/gdb.base/solib-symbol-lib.c, line 29. > (gdb) set multiple-choice-auto-select all > (gdb) br foo2 > [0] cancel > [1] all > [2] foo2 at > /home/deuling/gdb/dev/gdb/testsuite/gdb.base/solib-symbol-main.c:39 > [3] foo2 at > /home/deuling/gdb/dev/gdb/testsuite/gdb.base/solib-symbol-lib.c:29 > >2 3 > Breakpoint 3 at 0x8048523: file > /home/deuling/gdb/dev/gdb/testsuite/gdb.base/solib-symbol-main.c, line 39. > Note: breakpoint 2 also set at pc 0xf86444. > Breakpoint 4 at 0xf86444: file > /home/deuling/gdb/dev/gdb/testsuite/gdb.base/solib-symbol-lib.c, line 29. > warning: Multiple breakpoints were set. > Use the "delete" command to delete unwanted breakpoints. > (gdb) It looks to me that you may be confused as to the semantics of the new setting that I introduced. I want to say purely at the user level for now, and worry about the implementation later. Let me clarify the current semantics of multiple-choice-auto-select. The idea is that, if multiple-choice-auto-select is turned on, then some "auto-select" will happen. Otherwise, no auto-select, and thus a menu needs to be displayed in order for the expression to be disambiguated. Now, in terms of the command itself: 1. set multiple-choice-auto-select off (default): Auto-select is turned off, so the multiple-choice menu is displayed, and the user must chose the ones he wants. 2. set multiple-choice-auto-select all: In that case, the auto-select will automatically choose the "all" choice. If the "all" option is not available because you are expected to choose 1 and only 1 choice, then an error is triggered. 3. set multiple-choice-auto-select cancel: In that case, the auto-select will automatically choose the "cancel" option of the multiple-choice menu. Following this logic: In your example above, after having set "multiple-choice-auto-select" to all, your "break" command should not result in a menu being displayed - instead, it should automatically break at both locations. However, in the first case, when multiple-choice-auto-select was still off, the menu should have been displayed, so that the user can choose which one he wants. Back to your particular case: The semantics that you are looking for are: 1. Multiple-choice menu activated: Let the user choose. 2. Multiple-choice menu deactivated: Choose the symbol in the "current" shared library first. I spent some time familiarizing myself with -Bsymbolic and the way you introduced handling of these duplicated symbol names. Although you and Daniel thought that it would be a good idea to treat these types of symbols differently from other ambiguous expressions, I don't quite understand why. But regardless of that fact, it seems that the semantics of what you'd like to do is different from what I am introducing, and that you should therefore have your own option. What do you think? -- Joel