From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21028 invoked by alias); 9 Nov 2011 16:05:54 -0000 Received: (qmail 21017 invoked by uid 22791); 9 Nov 2011 16:05:53 -0000 X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 09 Nov 2011 16:05:40 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 92F932BB396; Wed, 9 Nov 2011 11:05:39 -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 z6oFr2lu4xSv; Wed, 9 Nov 2011 11:05:39 -0500 (EST) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id 4CC332BB092; Wed, 9 Nov 2011 11:05:39 -0500 (EST) Received: by joel.gnat.com (Postfix, from userid 1000) id E29C7145615; Wed, 9 Nov 2011 11:05:29 -0500 (EST) Date: Wed, 09 Nov 2011 16:05:00 -0000 From: Joel Brobecker To: Tom Tromey , Jerome Guitton Cc: Jan Kratochvil , gdb-patches@sourceware.org Subject: Re: RFA: implement ambiguous linespec proposal Message-ID: <20111109160529.GO14508@adacore.com> References: <20111028221459.GA28467@host1.jankratochvil.net> <20111104074543.GA13839@host1.jankratochvil.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.20 (2009-06-14) 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: 2011-11/txt/msg00232.txt.bz2 > I think it would also make some Ada cases work more sanely, though I > don't know enough to say with certainty. I'm thinking here about how > ada_lookup_symbol_list returns a list but then the linespec code only > uses the first one (via some call through ada_lookup_encoded_symbol, I > don't remember the details). You are missing part of the picture, I think, because some of our code is not in the FSF tree [1]. We get multiple breakpoints for situations such as homonyms, or generics (aka templates in C++) instantiations. In that situation, I think that the FSF GDB only picks the first one, whereas AdaCore's GDB creates multiple breakpoints. > My problem with this is that it adds more complexity to the user > interface: some linespecs will create a single breakpoint with multiple > locations, some will create multiple breakpoints once again, depending > on the context. We have a similar issue: When the user inserts a breakpoint, and there are multiple possible choices, we have two scnearios: 1. He selects `all' -> In that case, we actually create one breakpoint with multiple locations; 2. He selects a subset -> In that situation, we create one breakpoint per location. I think this can be pretty confusing. I am copying Jerome Guitton on this message, since he did the work for that. -- Joel [1]: We tried contributing it, but it was too hacky to really be part of the FSF sources. The main complaint at the time was the fact that it introduced a canonical form that was specific to Ada. I was planning on looking at generalizing it to all languages, but never got around to doing it.