From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by sourceware.org (Postfix) with ESMTPS id 38237385781D for ; Tue, 10 Aug 2021 07:23:47 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 38237385781D Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out2.suse.de (Postfix) with ESMTP id E14BA1FE28; Tue, 10 Aug 2021 07:23:45 +0000 (UTC) Received: from murzim.suse.de (murzim.suse.de [10.160.4.192]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by relay2.suse.de (Postfix) with ESMTPS id D549FA3BB6; Tue, 10 Aug 2021 07:23:45 +0000 (UTC) Date: Tue, 10 Aug 2021 09:23:45 +0200 (CEST) From: Richard Biener To: Eric Botcazou cc: Bernd Edlinger , gcc-patches@gcc.gnu.org, Arnaud Charlet Subject: Re: [PATCH 2/2] Ada: Remove debug line number for DECL_IGNORED_P functions In-Reply-To: <1886121.usQuhbGJ8B@arcturus> Message-ID: References: <2152447.iZASKD2KPV@arcturus> <1886121.usQuhbGJ8B@arcturus> User-Agent: Alpine 2.21 (LSU 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Spam-Status: No, score=-4.8 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Aug 2021 07:23:57 -0000 On Mon, 9 Aug 2021, Eric Botcazou wrote: > > But it is okay that we can set a breakpoint on defs__struct1IP, > > in the test case of PR 101598. > > And the debugger shall only show assembler here. > > Right? > > The defs__struct1IP procedure should be totally transparent for the user, so > setting a breakpoint in it is not supposed to come into play. > > > Do you have an example where this location information is used in the > > compiler itself for debugging? > > That's useful when you compile the code with -gnatD, i.e when you debug the > intermediate code generated by the front-end. > > > I assume You would agree that having the location for Test2 is better > > than no debug info at all? > > But we want no debug info at all for these IP functions. > > > What do you think? > > I guess I still don't understand why DECL_IGNORED_P was changed. ISTR it was changed because at least with location info generated by gas there's no way to have "no location" for a portion of code. Instead the assigned location will be that of the previous .loc directive which results in random and confusing results for the pc range of the DECL_INGORED_P function. I guess we should really revisit the decision to rely on gas to produce line info. What's the advantage of doing so (apart from "nice" annotated assembly)? Richard.