public inbox for
 help / color / mirror / Atom feed
From: Richard Biener <>
To: Olivier Hainque <>
Cc: gcc-patches <>
Subject: Re: [PATCH] Introduce DWARF_VERSION_DEFAULT (and redefine for VxWorks)
Date: Thu, 6 Oct 2022 14:15:03 +0200	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <>

On Fri, Sep 30, 2022 at 6:18 PM Olivier Hainque via Gcc-patches
<> wrote:
> Hello,
> This change is a proposal to introduce a target overridable macro
> to replace the hardcoded value used in common.opt to initialize
> dwarf_version.
> The main advantage compared to special code in a target
> override_options hook is that redefinitions by target config files
> are visible by both the compiler proper and by the driver, which
> might refer to dwarf_version in ASM_DEBUG_SPECs and friends.
> This is useful at least on VxWorks, where we usually need to
> default to dwarf 4 or even 2 to accommodate non-gdb debuggers
> provided by the environment, including for assembly sources
> used in libgcc for some ports (witnessed with lse.S on aarch64).
> We have been using this in a lot of gcc-11 based toolchains
> for various configurations for a while, cross and native.
> This is a noop for anything but VxWorks and helped cure crashes
> of target debuggers in VxWorks environments.
> Bootstrapped and regression tested for mainline on x86_64-linux.
> Is this ok to commit?

I think this is reasonable, thus OK.


> Thanks in advance!
> Best Regards,
> Olivier
> 2022-09-30  Olivier Hainque  <>
> gcc/
>         * defaults.h (DWARF_DEFAULT_VERSION): Define if not
>         defined already.
>         * common.opt (gdwarf-): Use it.
>         * doc/ (DWARF_DEFAULT_VERSION): Document.
>         * doc/tm.texi: Update accordingly.
>         * config/vxworks.h (DWARF_DEFAULT_VERSION): Redefine.
>         * config/ Remove code setting dwarf_version, now
>         handled by the DWARF_DEFAULT_VERSION redefinition.

  reply	other threads:[~2022-10-06 12:15 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-30 16:17 Olivier Hainque
2022-10-06 12:15 ` Richard Biener [this message]
2022-10-06 16:48   ` Olivier Hainque

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='' \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).