public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Richard Biener <richard.guenther@gmail.com>
To: Olivier Hainque <hainque@adacore.com>
Cc: gcc-patches <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH] Introduce DWARF_VERSION_DEFAULT (and redefine for VxWorks)
Date: Thu, 6 Oct 2022 14:15:03 +0200	[thread overview]
Message-ID: <CAFiYyc010+twoYb=wmvzTH21NsmHOyeMLRp=OF9H=4MWGWjLhQ@mail.gmail.com> (raw)
In-Reply-To: <30A5CEC6-062F-4DE3-8A36-E6A34C2EE4BB@adacore.com>

On Fri, Sep 30, 2022 at 6:18 PM Olivier Hainque via Gcc-patches
<gcc-patches@gcc.gnu.org> 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,
Richard.

> Thanks in advance!
>
> Best Regards,
>
> Olivier
>
> 2022-09-30  Olivier Hainque  <hainque@adacore.com>
>
> gcc/
>         * defaults.h (DWARF_DEFAULT_VERSION): Define if not
>         defined already.
>         * common.opt (gdwarf-): Use it.
>         * doc/tm.texi.in (DWARF_DEFAULT_VERSION): Document.
>         * doc/tm.texi: Update accordingly.
>
>         * config/vxworks.h (DWARF_DEFAULT_VERSION): Redefine.
>         * config/vxworks.cc: 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:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

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

  git send-email \
    --in-reply-to='CAFiYyc010+twoYb=wmvzTH21NsmHOyeMLRp=OF9H=4MWGWjLhQ@mail.gmail.com' \
    --to=richard.guenther@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=hainque@adacore.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* 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).