From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22180 invoked by alias); 4 Dec 2017 16:49:08 -0000 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 Received: (qmail 22171 invoked by uid 89); 4 Dec 2017 16:49:07 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.3 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 spammy= X-HELO: mail-qt0-f182.google.com Received: from mail-qt0-f182.google.com (HELO mail-qt0-f182.google.com) (209.85.216.182) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 04 Dec 2017 16:49:06 +0000 Received: by mail-qt0-f182.google.com with SMTP id d15so22410282qte.4 for ; Mon, 04 Dec 2017 08:49:06 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=VpbpS93Dv48He7XeO+JxsQcSVAq/97cECF7/bO3sLbM=; b=JZ/2eoEmRNI4K6IMU2eBku836Yk72qhWoq5lFLobdDZx1b7UMLMGcPROEb5OYnrIov MA8GkBdf9jRvXdl3B43ttergg/PeAVM0IHS1EZtxuDNGOwCyiJugxKY7STHXA6iwHGnd NrgjKSH/N7NUCo/HWxIPZOutuigO9AEConyijBuyqiYShO48kfivNB3UXrl/DyCRua6Q JVDyZOtbdFt7X/1Arg4wLQ44Qa9EmEL56EjVic3CTLbY0Qy2+3XusrYSLUgcJSaaxKvf egLsy91SHrFEfHzzzJIeYn00g04Ryiha3GormRZuegJ8pUriSupcR0MiazsXD+cAezgY Rxhg== X-Gm-Message-State: AKGB3mJ95Hd+DmnauGf6KqyMHjcQP8+9EXYqUUlMDT5ItpcwMhVbaQEl 7h7MKta03pv4K+Sl8J8bjvMwiERcAxgHyBGqAwO4Qg== X-Google-Smtp-Source: AGs4zMaB4UnUJLicoRkANlzPOuCR3L+GlP/FInnJKzBy+ACbXljKvYu1qEKxkwzKnsu2/xKCs3p08mkwxLm6LF2Or9E= X-Received: by 10.233.230.69 with SMTP id x5mr19054179qkl.321.1512406144721; Mon, 04 Dec 2017 08:49:04 -0800 (PST) MIME-Version: 1.0 Received: by 10.140.101.233 with HTTP; Mon, 4 Dec 2017 08:49:04 -0800 (PST) In-Reply-To: References: <20171203041719.11506-1-jimw@sifive.com> From: Jim Wilson Date: Mon, 04 Dec 2017 16:49:00 -0000 Message-ID: Subject: Re: [RFA, PATCH] Deprecate stabs if dwarf2 support available. To: Richard Biener Cc: GCC Patches Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-SW-Source: 2017-12/txt/msg00153.txt.bz2 On Mon, Dec 4, 2017 at 2:38 AM, Richard Biener wrote: > Note that "deprecation" doesn't match up with giving an error when using. > We should warn (or maybe just document deprecation) instead. OK. I can warn instead. That makes a lot of things simpler for gcc-8. Nothing will be broken by the change, except for the debug torture support in the gcc testsuite, which is easy enough to fix. > Maybe we can add a DWARF2_ONLY_DEBUGGING_INFO or > NO_DBX_DEBUGGING_INFO macro so targets can decide they do not > want to support -gstabs and reject it this way? I'm not sure if > #undefing DBX_DEBUGGING_INFO for those targets would be enough to > achieve this? It seems clearly not. Thus sth like I think we have too many *_DEBUGGING_INFO macros already. And some of them are undocumented and/or incorrectly documented. So I'd rather not add more. DWARF2_LINENO_DEBUGGING_INFO is undocumented. XCOFF_DEBUGGING_INFO is incorrectly documented. The docs say it emits a stabs variant, but it is used in both dbxout.c and dwarf2out.c, so it is also emitting a dwarf2 variant. > +#ifndef DBX_DEBUGGING_INFO > + warning ("-gstabs is deprecated on this target"); > + > +#endif It is already the case that you can't emit stabs if DBX_DEBUGGING_INFO is not defined. So this patch would do nothing useful. rohan:2017$ ./xgcc -B./ -gstabs tmp.c cc1: error: target system does not support the =E2=80=98stabs=E2=80=99 debu= g format rohan:2018$ > and/or ignore stabs and use -gdwarf -g1 when -gstabs is specified? Except that we can't emit dwarf-2 unless DWARF2_DEBUGGING_INFO is defined. So that takes us back to my patch which checks for DWARF2_DEBUGGING_INFO. It just needs to emit a warning instead of an error, and then force a switch to dwarf2. That leaves open the question of what to do about targets that only support stabs. We could do nothing for now and continue to emit stabs. We could call inform() to emit the deprecation message, to avoid breaking -Werror, and continue to emit stabs. I think the latter is more useful, so I will try that. > So unless we want to remove any support for GCC 8 I'd suggest to document > the deprecation in gcc-8/changes.html and emit a deprecation warning from > the --with-stabs configure option. Note that deprecating stabs means > deprecating > those targets (or just debugging on those?) that only support stabs. No, I don't want to remove stabs support at this time. I just want to start nudging people in the right direction, to switch to dwarf2. I think avr is the only actively maintained target that depends on stabs, and we can ask them to add dwarf support. For the other targets, we can just drop debugging support if people are still interested in the target, or drop the target if no one is still interested in it. Jim