public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Richard Biener <rguenther@suse.de>
To: gcc-patches@gcc.gnu.org
Cc: mwilliams@fb.com, jason@redhat.com
Subject: [PATCH] fix -fdebug-prefix-map without gas .file support
Date: Fri, 21 Feb 2020 10:02:00 -0000	[thread overview]
Message-ID: <nycvar.YFH.7.76.2002211102080.5137@zhemvz.fhfr.qr> (raw)

This applies file mapping when emitting the directory table
directly instead of using the assemblers .file directive where
we already correctly apply the map.  Notably the non-assembler
path is used for the early debug emission for LTO.

Bootstrapped and tested on x86_64-unknown-linux-gnu.

OK for trunk?

Thanks,
Richard.

2020-02-21  Mark Williams  <mwilliams@fb.com>

	* dwarf2out.c (file_name_acquire): Call remap_debug_filename.
---
 gcc/dwarf2out.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c
index 577be3d52d3..ba9da0f2cc2 100644
--- a/gcc/dwarf2out.c
+++ b/gcc/dwarf2out.c
@@ -12205,8 +12205,9 @@ file_name_acquire (dwarf_file_data **slot, file_name_acquire_data *fnad)
 
   fi = fnad->files + fnad->used_files++;
 
+  f = remap_debug_filename (d->filename);
+
   /* Skip all leading "./".  */
-  f = d->filename;
   while (f[0] == '.' && IS_DIR_SEPARATOR (f[1]))
     f += 2;
 
-- 
2.16.4

             reply	other threads:[~2020-02-21 10:02 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-21 10:02 Richard Biener [this message]
2020-02-26  5:04 ` Jason Merrill
2020-02-27 10:46   ` Richard Biener

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=nycvar.YFH.7.76.2002211102080.5137@zhemvz.fhfr.qr \
    --to=rguenther@suse.de \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jason@redhat.com \
    --cc=mwilliams@fb.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).