From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15843 invoked by alias); 4 Feb 2015 18:15:26 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 15823 invoked by uid 89); 4 Feb 2015 18:15:26 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,SPF_PASS,T_RP_MATCHES_RCVD autolearn=unavailable version=3.3.2 X-HELO: mail-ob0-f181.google.com Received: from mail-ob0-f181.google.com (HELO mail-ob0-f181.google.com) (209.85.214.181) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Wed, 04 Feb 2015 18:15:21 +0000 Received: by mail-ob0-f181.google.com with SMTP id vb8so2801309obc.12 for ; Wed, 04 Feb 2015 10:15:19 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=MIK05Xr8ieTFfFph6eMvO3PRtjO3FgnFiSy2vOWcDHM=; b=axXnZVr4WQ619AY2ZVFCar6jUFb9bGMxPmGy7/DNlMfg4geYE4PY3SIBe4BiWyjkfP Yrf/WyQLJdBzh6nX+d32z2fOUQK/wbEYeRwhx/nP3ioIa7JIrsijJtinb+izc93KVnJY ONGqyi0kOdO0t0dHSrXPuDIH+oy1YzUyueLVHvic71pg9A9Ovei1dPYNn8NQZU7mEuXB xC05nKqnXHkgi4yd18Eim2QuISwkRg72zMeLwnVfhzT7bGGNz1GGr0lqdN6uMrNXgv+y /ILkuh09B0ckG0joKy5JnNr2fGjbFN77jj315MeISIFedvA+XC8P6Ye1ol1VgNgqPMvp /cXg== X-Gm-Message-State: ALoCoQnE+6t4sskMLut49enOYircp5KMvg/5YWz275tGlN+fCcOYSodhdy1uiaVwAVGC0Oxwgcs4 MIME-Version: 1.0 X-Received: by 10.182.148.98 with SMTP id tr2mr19949154obb.28.1423073719767; Wed, 04 Feb 2015 10:15:19 -0800 (PST) Received: by 10.182.222.98 with HTTP; Wed, 4 Feb 2015 10:15:19 -0800 (PST) In-Reply-To: <1422990635.4947.29.camel@bordewijk.wildebeest.org> References: <20150116224234.GA6176@host2.jankratochvil.net> <20150203185912.GA26920@host1.jankratochvil.net> <1422990635.4947.29.camel@bordewijk.wildebeest.org> Date: Wed, 04 Feb 2015 18:15:00 -0000 Message-ID: Subject: Re: [patch+7.9] compile: Filter out -fpreprocessed From: Doug Evans To: Mark Wielaard Cc: Jan Kratochvil , gdb-patches , gcc-patches@gcc.gnu.org Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes X-SW-Source: 2015-02/txt/msg00094.txt.bz2 On Tue, Feb 3, 2015 at 11:10 AM, Mark Wielaard wrote: > On Tue, 2015-02-03 at 19:59 +0100, Jan Kratochvil wrote: >> On Tue, 03 Feb 2015 19:50:40 +0100, Doug Evans wrote: >> > On Fri, Jan 16, 2015 at 2:42 PM, Jan Kratochvil >> > wrote: >> > > [...] >> > > It is wrong that gcc puts -fpreprocessed into DW_AT_producer - I may post a gcc >> > > patch for it. >> > >> > I wasn't aware there are now rules for what can and cannot go in DW_AT_producer. >> > DW_AT_producer has gone from being informational to having a formal >> > spec (in the sense that something will break if, for example, a >> > particular option is mentioned). >> > Is this spec written down somewhere? [At least guidelines for what >> > things may lead to breakage?] >> >> No. Do you have a suggestion where to put it? Should it be only a GNU >> extension or should it be even DWARF-standardized? > > The gcc documentation describes it: > https://gcc.gnu.org/onlinedocs/gcc/Debugging-Options.html > > -grecord-gcc-switches > This switch causes the command-line options used to invoke the > compiler that may affect code generation to be appended to the > DW_AT_producer attribute in DWARF debugging information. The > options are concatenated with spaces separating them from each > other and from the compiler version. See also > -frecord-gcc-switches for another way of storing compiler > options into the object file. This is the default. > > -gno-record-gcc-switches > Disallow appending command-line options to the DW_AT_producer > attribute in DWARF debugging information. > > So Jan is right that gcc adding -fpreprocessed, which doesn't affect > code generation, but is a preprocessor option, shouldn't be there. Thanks. Still, there's no hint to the reader that things may break if certain rules are not followed. It still seems like it's for informational purposes for human readers, with no suggestion that programs use this information too. [For completeness sake, I'm setting aside the compiler and version string. That seemed common enough knowledge to not need documentation as much as this does. I realize we're now talking about -grecord-gcc-switches, but this thread was originally about DW_AT_producer in general.]