From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28659 invoked by alias); 31 Mar 2011 15:38:05 -0000 Received: (qmail 28524 invoked by uid 22791); 31 Mar 2011 15:38:03 -0000 X-SWARE-Spam-Status: No, hits=-6.2 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 31 Mar 2011 15:37:54 +0000 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p2VFbsMH009318 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 31 Mar 2011 11:37:54 -0400 Received: from anchor.twiddle.home (ovpn-113-141.phx2.redhat.com [10.3.113.141]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id p2VFbr0f017229; Thu, 31 Mar 2011 11:37:53 -0400 Message-ID: <4D949FD1.2010809@redhat.com> Date: Thu, 31 Mar 2011 15:42:00 -0000 From: Richard Henderson User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.15) Gecko/20110307 Fedora/3.1.9-0.39.b3pre.fc14 Thunderbird/3.1.9 MIME-Version: 1.0 To: Dodji Seketeli CC: Jan Kratochvil , GCC Patches Subject: Re: [PATCH] PR debug/47471 (set prologue_end in .debug_line) References: <4D93EE06.6000501@redhat.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2011-03/txt/msg02214.txt.bz2 On 03/31/2011 07:35 AM, Dodji Seketeli wrote: > redundant .loc directives. It seems to me that in the case of direct > output (i.e when we the underlying assembler doesn't support the .loc > directive) we already avoid the duplication. And that avoidance fixes > the immediate issue GDB is facing, with -g -O0. There's no avoidance with direct output either. See the #if 0 bits inside output_line_info itself. #if 0 /* Don't emit anything for redundant notes. */ if (line_info->dw_line_num == current_line && line_info->dw_file_num == current_file && line_info->function == function) goto cont; #endif > With -g -O>0, GDB doesn't have the issue as the DW_AT_location > attributes of the variable DIEs are locations that are valid in the > region of the prologue, so it doesn't need to know where the prologue > ends. Just trusting DW_AT_location is enough. Ah, I see. And I can see how having end_prologue might help there. Well, let's see if we can clean things up here then. As for your patch itself, you're not checking to see if you're outputting to the same section, which could cause line info to go missing at the beginning of a different section. That said, the patch I'm working on will do this elimination in one place for both direct output and assembler output, and be mindful of sections. r~