public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "rguenth at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug debug/95482] Feature request: add -gsplit-dwarf=single
Date: Wed, 03 Jun 2020 06:03:43 +0000	[thread overview]
Message-ID: <bug-95482-4-YTckHZXoCb@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-95482-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95482

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|normal                      |enhancement

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
GCC does not by itself generate the separate .dwo file but instead the driver,
after the assembler finished, runs objcopy via ASM_FINAL_SPEC:

/* config.h can define ASM_FINAL_SPEC to run a post processor after
   the assembler has run.  */
#ifndef ASM_FINAL_SPEC
#define ASM_FINAL_SPEC \
  "%{gsplit-dwarf: \n\
       objcopy --extract-dwo \
         %{c:%{o*:%*}%{!o*:%w%b%O}}%{!c:%U%O} \
         %b.dwo \n\
       objcopy --strip-dwo \
         %{c:%{o*:%*}%{!o*:%w%b%O}}%{!c:%U%O} \
    }"
#endif

so I would guess there's only small massaging necessary to get the desired
functionality (the sections are already marked SHF_EXCLUDE).  Patches welcome,
just figure out the correct magic to guard the SPEC above, like maybe
"%{!gsplit-dwarf=single: %{gsplit-dwarf: ...

The choice of -gsplit-dwarf=single is probably not too nice here though.

      reply	other threads:[~2020-06-03  6:03 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-02 17:03 [Bug debug/95482] New: " i at maskray dot me
2020-06-03  6:03 ` rguenth at gcc dot gnu.org [this message]

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=bug-95482-4-YTckHZXoCb@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /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).