From patchwork Fri Jul 21 13:07:54 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nathan Sidwell X-Patchwork-Id: 792109 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-458648-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="FsAdgiJZ"; 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 3xDWKS0SShz9sNx for ; Fri, 21 Jul 2017 23:08:10 +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 :subject:to:cc:references:from:message-id:date:mime-version :in-reply-to:content-type; q=dns; s=default; b=oe8et7PIDQ1HZ1/zx VZb1DCs9pyKU6ukpDsGZ6/n6RJodhrGFKHpYxrxMHjOIojI7Bsea7S2BVBaIR1yM OnTl8/4gUXGCbv6Q2mLxBLg1kFQMXMZ9VB28OPMGljSUEoJBIvSjOHQa141rtLS/ brCBVNwSTN9CD/TQs7yYZQJO2U= 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 :subject:to:cc:references:from:message-id:date:mime-version :in-reply-to:content-type; s=default; bh=ToSQzQLm8JeZnuQVbK+Crtt D3hM=; b=FsAdgiJZwE597EZCqI1+QxdSZ6/fdSFsMgY3bzksphCHaZDUaVZZVae 8GZY9sZ19UFz/FBc2vL7K7Lz2zR9wtxVQIaOmkYwDKY1Tzkjzq2mhGXRG9Kk2gv9 TyUwHXwPBljRyNEWToPMdP0kO9iNbLXyBcWnYsIppxN5Wmp8JQ1o= Received: (qmail 78761 invoked by alias); 21 Jul 2017 13:08:03 -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 78712 invoked by uid 89); 21 Jul 2017 13:08:01 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-11.4 required=5.0 tests=BAYES_00, FREEMAIL_FROM, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, RCVD_IN_SORBS_SPAM, SPF_PASS autolearn=ham version=3.3.2 spammy= X-HELO: mail-yw0-f194.google.com Received: from mail-yw0-f194.google.com (HELO mail-yw0-f194.google.com) (209.85.161.194) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 21 Jul 2017 13:07:59 +0000 Received: by mail-yw0-f194.google.com with SMTP id h189so2168155ywf.4 for ; Fri, 21 Jul 2017 06:07:58 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language; bh=O4OX43QMan2XJm5US6tezram6OvYxTFnhovFSwOFNcU=; b=oi+a+Qd7NzJSOJXjKkeWtXwH9qpL8QE9HbBXgvuMX4iJkZT2XhI6siieEdd7S89u6b 98sZ/Mdqvu6MyNaMaJQIdEonVNdvqVavsqTrNTULRx229L89b7cSEFxymqi2tZQJJ1ac A8bebfM0QGMdTQTaClNyahhDOOjbwnOjIkyzOihWMINzFC02iqP6LAs6oB6Is7pJrDut ihikp7SUHPTX5Buz6pKpDcGNuQDSEqa8Id08tQ6SEIi1vXfKGNsLCc5ImJdsuxxQVM8g E5a/T3WN77zVeLsHSjLnAXbuxYNJF3zaRdBL3NIEiJQyzOisTUTvrc+JztA35CG6pNy9 fPUg== X-Gm-Message-State: AIVw111Sdw+tgQJkLCa7RwVNe+7ZYzKsnhcn4HB9p4dL4Vc4GyDOpgzE e4jlP7RsdO7MRg== X-Received: by 10.129.55.137 with SMTP id e131mr6740533ywa.185.1500642476987; Fri, 21 Jul 2017 06:07:56 -0700 (PDT) Received: from ?IPv6:2620:10d:c0a3:20fb:7500:e7fb:4a6f:2254? ([2620:10d:c091:200::3:fb48]) by smtp.googlemail.com with ESMTPSA id r8sm1665746ywl.39.2017.07.21.06.07.55 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 21 Jul 2017 06:07:56 -0700 (PDT) Subject: Deprecate DBX/stabs? To: Richard Biener , Jim Wilson Cc: GCC Patches , Jason Merrill , Jim Wilson , Jan Hubicka , mikestump@comcast.net, iain@codesourcery.com, Nick Clifton , 10walls@gmail.com References: <8377f2cd-577c-60b2-63ac-f2619ebe63aa@acm.org> <6af64e4b-403e-2b88-3067-cd0dc4da64d8@linaro.org> <000f20c2-86fb-9d71-dc66-03167de00142@acm.org> <0be1446d-d866-f3b9-8691-3df4cc088211@acm.org> <0170999F-BBCE-41AE-BC3F-36E8AF53A7C6@gmail.com> From: Nathan Sidwell Message-ID: Date: Fri, 21 Jul 2017 09:07:54 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: <0170999F-BBCE-41AE-BC3F-36E8AF53A7C6@gmail.com> [darwin, cygwin, rx maintainers, you might have an opinion] On 07/21/2017 01:11 AM, Richard Biener wrote: > On July 21, 2017 12:03:58 AM GMT+02:00, Jim Wilson wrote: >> On Thu, Jul 20, 2017 at 2:00 PM, Nathan Sidwell wrote: >>> With this patch the gdb stabs test results are still awful, but they >> are >>> unchanged awfulness. >> >> Anyways, your new dbxout.c patch looks good. And maybe we should >> think about deprecating the stabs support some day. > > I've suggested that multiple times also to be able to get rid of the debug hook interfacing in GCC and emit dwarf directly from FEs where that makes sense. DWARF should be a superset of other debug formats so it should be possible to build stabs from dwarf. Let's at least deprecate it. I attach a patch to do so. With the patch, you'll get a note about dbx being deprecated whenever you use stabs debugging on a system that prefers stabs (thus both -g and -gstabs will warn). On systems where stabs is not preferred, -gstabs will not give you a warning. The patch survices an x86_64-linux bootstrap. A config can chose to override thus by defining 'DBX_DEBUG_OK' in the build defines. I did try build time CPP tricks, but config/rx.h and config/i386/darwin.h define it to be a conditional expression. AFAICT, the following include files are not used, and could probably be binned too: config/dbx.h config/dbxcoff.h config/dbxelf.h (+ configi386/gstabs.h Jim found) It looks like DBX is the default for: i386/cygming configured for 32-bit or lacking PE_SECREL32_RELOC i386/darwin.h for 32-bit target rx/rx.h when using AS100 syntax nathan 2017-07-21 Nathan Sidwell * toplev.c (process_options): Warn about DBX being deprecated. Index: toplev.c =================================================================== --- toplev.c (revision 250424) +++ toplev.c (working copy) @@ -1413,6 +1413,12 @@ process_options (void) debug_info_level = DINFO_LEVEL_NONE; } +#ifndef DBX_DEBBUG_OK + if (PREFERRED_DEBUGGING_TYPE == DBX_DEBUG + && write_symbols == DBX_DEBUG) + inform (UNKNOWN_LOCATION, "DBX (stabs) debugging is deprecated"); +#endif + if (flag_dump_final_insns && !flag_syntax_only && !no_backend) { FILE *final_output = fopen (flag_dump_final_insns, "w");