Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Keith Seitz <keiths@redhat.com>
To: Simon Marchi <simon.marchi@polymtl.ca>,
	Kevin Buettner <kevinb@redhat.com>,
	gdb-patches@sourceware.org
Subject: Re: [PATCH 1/2] Fix BZ 25065 - Ensure that physnames are computed for inherited DIEs
Date: Mon, 21 Oct 2019 20:05:00 -0000	[thread overview]
Message-ID: <9d4006e3-8155-ad45-c7d4-ff83c9e741da@redhat.com> (raw)
In-Reply-To: <8b301205-e8f6-ead5-0484-eacfb82e5b7a@polymtl.ca>

On 10/18/19 8:07 AM, Simon Marchi wrote:
>> I spent a little time trying to figure out what CU is used for in
>> dwarf2_physname() and its callees.  What I noticed most is that
>> cu->language is used to figure out some appropriate thing to do.
>> I seem to remember Keith running into problems with mismatched
>> languages in different CUs.  So there might be problems if the
>> languages associated with the CUs are different.
> 
> Yeah, I remember this saga, but I did not really follow it.  Keith, would
> you have an idea of what would be the right CU to pass here?

The language mismatch that Kevin refers to was a problem that appeared
with LTO. The primary DIE would be marked artificial and having language C99.
That DIE would then import other DIEs of different languages (mostly C++),
and that would cause problems because all these symbols are supposed to
live in the same dictionary. That was resolved by moving to multidictionary
a while back. [Reminder, a symbol's language is used for searching. Different
languages now have different searching algorithms. This was introduced to
help with Pedro's multi-breakpoint/linespec work to deal with namespaces,
ABI tags, etc.]

As far as the correct DIEs to use when passing to dwarf2_physname, I don't
think/remember it being anything particularly unexpected. If the physname
for a DIE is computed, the DIE/CU passed must be able to give us this
information.

Since dwarf2_physname largely uses linkage names nowadays (there was only
one or two instances where we actually needed to compute the physname),
the correct CU/DIE would be the pair containing DW_AT_linkage_name for
the symbol.

It is debatable whether we even still need delayed physnames. I don't
think we actually need to compute physnames much anymore. [As I recall,
one place we've had to do this with was dtors. GCC did not emit linkage
names for them.]

Keith


  reply	other threads:[~2019-10-21 20:05 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-14  0:19 [PATCH 0/2] Fix BZ 25065 (LTO related GDB segfault) Kevin Buettner
2019-10-14  0:19 ` [PATCH 1/2] Fix BZ 25065 - Ensure that physnames are computed for inherited DIEs Kevin Buettner
2019-10-14  3:02   ` Simon Marchi
2019-10-15 16:27     ` Kevin Buettner
2019-10-17  3:54       ` Simon Marchi
2019-10-17  5:30         ` Simon Marchi
2019-10-18  1:08           ` Kevin Buettner
2019-10-18 15:07             ` Simon Marchi
2019-10-21 20:05               ` Keith Seitz [this message]
2019-10-22 22:23               ` Kevin Buettner
2019-11-04 20:42                 ` Kevin Buettner
2019-11-04 20:49                 ` Simon Marchi
2019-11-27 20:17                   ` Kevin Buettner
2019-10-14  0:19 ` [PATCH 2/2] Test case for BZ 25065 Kevin Buettner
2019-12-08 10:29   ` [committed] Fix inter-CU references using intra-CU form in imported-unit Tom de Vries

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=9d4006e3-8155-ad45-c7d4-ff83c9e741da@redhat.com \
    --to=keiths@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=kevinb@redhat.com \
    --cc=simon.marchi@polymtl.ca \
    /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