From patchwork Tue Jul 10 13:00:10 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Biener X-Patchwork-Id: 941982 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-481290-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="egTHmutY"; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 41Q2Q85tf4z9s00 for ; Tue, 10 Jul 2018 23:01:19 +1000 (AEST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:subject:message-id:mime-version:content-type; q=dns; s= default; b=v8psLq4/6ekB7Y/ExUewgrKxwRIO07IdOjQnM4OVCv0tZm2av44+T au2BQ3aHVPMOiok0hlet3SdzdKYgYQItXM4r2Tvun3PgDtpt+MzOfsta1exUXW9t ixBlX82hW9XznqroDENcp/4ICaGWQazGxlHfDUyj4I9Lc/m/omIyLY= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:subject:message-id:mime-version:content-type; s= default; bh=FDecV3i6jr9kNcrysKpeBxK4jkA=; b=egTHmutY+vKX52zTbPnH WNxyS1JYMswWrt3JUj9QDJdfWXOS775okytftA0X+vA8QSYqauQ0D4pvsVuS+q7z 9qjbB4ltxG5AvLZULAVDQS0C6Pkk07G0ncGsBc5Q+NjDx/gu+vNRrJiye/+Ez8aO 8ypzgUAwUPCX9wEZ2BRlQ2I= Received: (qmail 124937 invoked by alias); 10 Jul 2018 13:01:10 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 124783 invoked by uid 89); 10 Jul 2018 13:00:55 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-11.4 required=5.0 tests=BAYES_00, GIT_PATCH_2, GIT_PATCH_3, KAM_NUMSUBJECT, SPF_PASS, TIME_LIMIT_EXCEEDED autolearn=unavailable version=3.3.2 spammy=Hx-languages-length:1773 X-HELO: mx1.suse.de Received: from mx2.suse.de (HELO mx1.suse.de) (195.135.220.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 10 Jul 2018 13:00:26 +0000 Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id BCD40AD8D for ; Tue, 10 Jul 2018 13:00:10 +0000 (UTC) Date: Tue, 10 Jul 2018 15:00:10 +0200 (CEST) From: Richard Biener To: gcc-patches@gcc.gnu.org Subject: [PATCH] Fix PR86457 Message-ID: User-Agent: Alpine 2.20 (LSU 67 2015-01-07) MIME-Version: 1.0 The following fixes PR86457. I also removed some leftover tests of dwarf2out_as_loc_support in favor of output_asm_line_debug_info. Bootstrap and regtest running on x86_64-unknown-linux-gnu. Richard. 2018-07-10 Richard Biener PR debug/86457 * dwarf2out.c (init_sections_and_labels): Use output_asm_line_debug_info consistently. (dwarf2out_early_finish): Likewise. (dwarf2out_finish): Remove DW_AT_stmt_list from early generated type units. Index: gcc/dwarf2out.c =================================================================== --- gcc/dwarf2out.c (revision 262538) +++ gcc/dwarf2out.c (working copy) @@ -28483,7 +28483,7 @@ init_sections_and_labels (bool early_lto debug_str_section = get_section (DEBUG_LTO_STR_SECTION, DEBUG_STR_SECTION_FLAGS | SECTION_EXCLUDE, NULL); - if (!dwarf_split_debug_info && !dwarf2out_as_loc_support) + if (!dwarf_split_debug_info && !output_asm_line_debug_info ()) debug_line_str_section = get_section (DEBUG_LTO_LINE_STR_SECTION, DEBUG_STR_SECTION_FLAGS | SECTION_EXCLUDE, NULL); @@ -31125,9 +31125,9 @@ dwarf2out_finish (const char *) if (*slot != HTAB_EMPTY_ENTRY) continue; - /* Add a pointer to the line table for the main compilation unit - so that the debugger can make sense of DW_AT_decl_file - attributes. */ + /* Remove the pointer to the line table. */ + remove_AT (ctnode->root_die, DW_AT_stmt_list); + if (debug_info_level >= DINFO_LEVEL_TERSE) reset_dies (ctnode->root_die); @@ -31819,7 +31819,7 @@ dwarf2out_early_finish (const char *file /* When emitting DWARF5 .debug_line_str, move DW_AT_name and DW_AT_comp_dir into .debug_line_str section. */ - if (!dwarf2out_as_loc_support + if (!output_asm_line_debug_info () && dwarf_version >= 5 && DWARF5_USE_DEBUG_LINE_STR) {