From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14806 invoked by alias); 16 Jan 2006 10:03:04 -0000 Received: (qmail 14797 invoked by uid 22791); 16 Jan 2006 10:03:03 -0000 X-Spam-Check-By: sourceware.org Received: from nile.gnat.com (HELO nile.gnat.com) (205.232.38.5) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 16 Jan 2006 10:03:00 +0000 Received: from localhost (localhost [127.0.0.1]) by filtered-nile.gnat.com (Postfix) with ESMTP id AE13348CBF3; Mon, 16 Jan 2006 05:02:58 -0500 (EST) Received: from nile.gnat.com ([127.0.0.1]) by localhost (nile.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 25150-01-9; Mon, 16 Jan 2006 05:02:58 -0500 (EST) Received: from [127.0.0.1] (dhcp10.gnat.com [205.232.38.232]) by nile.gnat.com (Postfix) with ESMTP id 637F248CBE0; Mon, 16 Jan 2006 05:02:58 -0500 (EST) Message-ID: <43CB6F51.4050506@adacore.com> Date: Mon, 16 Jan 2006 10:03:00 -0000 From: Robert Dewar User-Agent: Mozilla Thunderbird 1.0.6 (Windows/20050716) MIME-Version: 1.0 To: Jim Blandy CC: Paul Koning , comar@adacore.com, hilfingr@gnat.com, gdb@sourceware.org Subject: Re: : Re: [RFC] multiple breakpoints from FILE:LINE References: <43C9AAA8.2030605@adacore.com> <17354.31047.417000.385481@gargle.gargle.HOWL> <43CA888E.20607@adacore.com> <8f2776cb0601152258n1210346ak95154a1dda2a22d1@mail.gmail.com> In-Reply-To: <8f2776cb0601152258n1210346ak95154a1dda2a22d1@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2006-01/txt/msg00137.txt.bz2 Jim Blandy wrote: >But the case being discussed in this thread is menus that appear in >response to a location specified by a filename and line number. It's >not clear that the kind of legitimate ambiguity you're concerned about >is present here. > > OK, understood. >When a function has been inlined, it's odd for users to demand to be >able to set breakpoints on one inlined instance but not another. You >can't set a breakpoint on a function conditional on it having been >called from a certain place; why would users suddenly require that >functionality just because the compiler decided to optimize the code >in a certain way? > > I agree with this for the caser of inlined procedures, and I don't think it is even necessary to have the possibility of setting breakpoints on an instance by instance basis >In-charge and not-in-charge constructors are a similar situation. >There's nothing in the semantics of the source language that ever >suggests that there are two separate reifications of the single block >of code the user wrote. This differs from instantiations of generics, >which (if I understand right) are things that the user actually did >ask for. The two constructor instances don't behave differently, as >far as the source level in concerned. Separating the two is purely an >implementation strategy, and should be hidden from the user when >reasonable. > > I agree >In cases where the same code has been #included twice, I think there's >more of a case that users might want to choose one or the other, since >it is indeed explicit in the source code that this particular source >line is going to contribute twice to the translation unit. But even >here, setting the breakpoint in both places would be a clear >improvement over what we do now: choose one #inclusion randomly. > > Indeed, one random instance is for suer wrong >(The last time we discussed this, Michael Chastain pointed out that >you actually *do* want to choose a specific constructor instance when >you're disassembling. But we're talking about breakpoints here; the >decision just needs to be made at the right place, so we can do one >thing for 'break' and a different thing for 'disass'.) > > There is one more case, related to the #include case, which is generic templates in Ada, and here too I think you want the possibility of setting a breakpoint in specific instances.