From: Tom Tromey <tom@tromey.com>
To: Simon Marchi via Gdb-patches <gdb-patches@sourceware.org>
Subject: Re: [PATCH v2] gdb/dwarf: fix reading subprogram with DW_AT_specification (PR gdb/26693)
Date: Wed, 21 Oct 2020 14:42:39 -0600 [thread overview]
Message-ID: <878sbzgvk0.fsf@tromey.com> (raw)
In-Reply-To: <20201020165055.93142-1-simon.marchi@polymtl.ca> (Simon Marchi via Gdb-patches's message of "Tue, 20 Oct 2020 12:50:55 -0400")
>>>>> "Simon" == Simon Marchi via Gdb-patches <gdb-patches@sourceware.org> writes:
Simon> 0x00000014: DW_TAG_subprogram
Simon> DW_AT_name [DW_FORM_string] ("apply")
Simon> 0x0000001b: DW_TAG_subprogram
Simon> DW_AT_specification [DW_FORM_ref4] (0x00000014 "apply")
gdb currently goes through a lot of work to support DWARF like this, but
I wish it didn't have to. It complicates the DWARF reader -- but IIRC
both gcc and clang just emit specializations with names like
"apply<int>". So, I wonder if we could drop support for this at some
point.
Simon> Since the caller of load_full_comp_unit knows about the existing
Simon> dwarf2_cu object for the CU we are reading (the one load_full_comp_unit
Simon> is expected to find), we can simply make it pass it down, instead of
Simon> having load_full_comp_unit look up the per-objfile map.
Sounds reasonable.
Simon> @@ -9231,12 +9233,12 @@ die_eq (const void *item_lhs, const void *item_rhs)
Simon> static void
Simon> load_full_comp_unit (dwarf2_per_cu_data *this_cu,
Simon> dwarf2_per_objfile *per_objfile,
Simon> + dwarf2_cu *existing_cu,
I think a comment explaining why this is needed would be really helpful.
The patch looks good to me. Thank you very much for the detailed
explanation.
Tom
next prev parent reply other threads:[~2020-10-21 20:42 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-13 14:18 [PATCH] " Simon Marchi via Gdb-patches
2020-10-20 15:13 ` Simon Marchi via Gdb-patches
2020-10-20 15:55 ` Strasuns, Mihails via Gdb-patches
2020-10-20 16:29 ` Tom de Vries
2020-10-20 16:48 ` Simon Marchi via Gdb-patches
2020-10-20 16:50 ` [PATCH v2] " Simon Marchi via Gdb-patches
2020-10-21 20:42 ` Tom Tromey [this message]
2020-10-22 2:37 ` Simon Marchi via Gdb-patches
2020-10-22 14:18 ` Tom Tromey
2020-10-22 14:51 ` Simon Marchi via Gdb-patches
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=878sbzgvk0.fsf@tromey.com \
--to=tom@tromey.com \
--cc=gdb-patches@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