public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
From: "simark at simark dot ca" <sourceware-bugzilla@sourceware.org>
To: gdb-prs@sourceware.org
Subject: [Bug symtab/25771] Inter-cu DW_AT_abstract_origin results in wrong file
Date: Fri, 03 Apr 2020 14:56:44 +0000	[thread overview]
Message-ID: <bug-25771-4717-xV2qoWzQvT@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-25771-4717@http.sourceware.org/bugzilla/>

https://sourceware.org/bugzilla/show_bug.cgi?id=25771

--- Comment #2 from Simon Marchi <simark at simark dot ca> ---
Let me rephrase the problem to make sure I understand.  We have a compile unit
(let's call it Importer) importing (with DW_TAG_imported_unit) another compile
unit (let's call it Importee).  This means that Importer knows about Importee,
but Importee does not know about Importer.

Importee defines a variable (let's call it BaseVar), with a DW_AT_decl_file. 
That number necessarily refers to its own file table.  Importer defines a
variable (let's call it ChildVar) that extends (with DW_AT_abstract_origin)
BaseVar.  ChildVar inherits the DW_AT_decl_file attribute from BaseVar.  The
value of the attribute necessarily refers to Importee's file table.

>From what I understand, GDB currently uses the DW_AT_decl_file value defined by
Importee to look up the file name in Importer's file table.  If that's the
case, I'd say GDB is at fault.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

  parent reply	other threads:[~2020-04-03 14:56 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-03 10:11 [Bug symtab/25771] New: " vries at gcc dot gnu.org
2020-04-03 10:13 ` [Bug symtab/25771] " vries at gcc dot gnu.org
2020-04-03 14:56 ` simark at simark dot ca [this message]
2020-04-03 15:14 ` vries at gcc dot gnu.org
2020-04-03 15:53 ` tromey at sourceware dot org
2020-10-30 10:41 ` vries at gcc dot gnu.org
2020-10-30 10:41 ` vries at gcc dot gnu.org
2020-11-04 16:12 ` vries at gcc dot gnu.org
2020-11-04 16:37 ` vries at gcc dot gnu.org

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-25771-4717-xV2qoWzQvT@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=gdb-prs@sourceware.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).