public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
From: Jakub Jelinek <jakub@gcc.gnu.org>
To: gcc-cvs@gcc.gnu.org
Subject: [gcc(refs/vendors/redhat/heads/gcc-8-branch)] backport: re PR debug/92664 (Wrong .debug_line section information when compiling stdin input with -
Date: Thu, 17 Sep 2020 16:39:36 +0000 (GMT)	[thread overview]
Message-ID: <20200917163936.ECAE6398B867@sourceware.org> (raw)

https://gcc.gnu.org/g:99fc0bc7b4628fe415e61e4be2bcebbb1b503967

commit 99fc0bc7b4628fe415e61e4be2bcebbb1b503967
Author: Jakub Jelinek <jakub@redhat.com>
Date:   Fri Feb 14 12:49:07 2020 +0100

    backport: re PR debug/92664 (Wrong .debug_line section information when compiling stdin input with -g3)
    
            Backported from mainline
            2019-11-27  Jakub Jelinek  <jakub@redhat.com>
    
            PR debug/92664
            * dwarf2out.c (lookup_filename): Use "<stdin>" instead of "".

Diff:
---
 gcc/ChangeLog   | 7 +++++++
 gcc/dwarf2out.c | 3 +++
 2 files changed, 10 insertions(+)

diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 85caceabfb6..a956570933d 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,6 +1,13 @@
 2020-02-14  Jakub Jelinek  <jakub@redhat.com>
 
 	Backported from mainline
+	2019-11-27  Jakub Jelinek  <jakub@redhat.com>
+
+	PR debug/92664
+	* dwarf2out.c (lookup_filename): Use "<stdin>" instead of "".
+
+2020-02-14  Jakub Jelinek  <jakub@redhat.com>
+
 	2019-11-23  Jakub Jelinek  <jakub@redhat.com>
 
 	PR target/92615
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c
index 0d67d303eb7..ab01f7dbcae 100644
--- a/gcc/dwarf2out.c
+++ b/gcc/dwarf2out.c
@@ -26999,6 +26999,9 @@ lookup_filename (const char *file_name)
   if (!file_name)
     return NULL;
 
+  if (!file_name[0])
+    file_name = "<stdin>";
+
   dwarf_file_data **slot
     = file_table->find_slot_with_hash (file_name, htab_hash_string (file_name),
 				       INSERT);


                 reply	other threads:[~2020-09-17 16:39 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20200917163936.ECAE6398B867@sourceware.org \
    --to=jakub@gcc.gnu.org \
    --cc=gcc-cvs@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).