From: Jason Merrill <jason@redhat.com>
To: GCC Patches <gcc-patches@gcc.gnu.org>, Tom Tromey <tromey@redhat.com>
Subject: Re: [PATCH] PR debug/49047 (linkage name missing for cdtors)
Date: Fri, 27 May 2011 08:31:00 -0000 [thread overview]
Message-ID: <4DDF2BE2.4030901@redhat.com> (raw)
In-Reply-To: <m3wrhdp6ui.fsf@seketeli.org>
On 05/26/2011 04:03 PM, Dodji Seketeli wrote:
> That is what I first did and it worked for this case. But then I wasn't
> sure if there could be cases where a function DIE would have the
> DW_AT_abstract_origin set, but won't have any actual code? For instance
> if the function has DECL_EXTERNAL set. That's why I wanted to call
> add_linkage_name only if the function has DW_AT_{low,high}_pc so that I
> am sure it contains actual code.
I think that we only generate debug info for a function if we emit it,
so it should always have pc attributes. But you could try adding an
assert to see if I'm right.
> + if (TREE_PUBLIC (origin))
> + /* So this is where the actual code for a publicly accessible
> + cloned function is. Let's emit linkage name attribute for
> + it. This helps debuggers to e.g, set breakpoints into
> + constructors/destructors when the user asks "break
> + K::K". */
> + add_linkage_name (subr_die, decl);
add_name_and_src_coords_attributes doesn't check TREE_PUBLIC, so I don't
think we should here, either; we want the debugger to be able to find
cloned constructors in anonymous namespaces, too.
Jason
next prev parent reply other threads:[~2011-05-27 4:43 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-26 15:45 Dodji Seketeli
2011-05-26 16:38 ` Jason Merrill
2011-05-26 22:02 ` Dodji Seketeli
2011-05-27 8:31 ` Jason Merrill [this message]
2011-05-30 15:17 ` Dodji Seketeli
2011-05-31 12:18 ` Jason Merrill
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=4DDF2BE2.4030901@redhat.com \
--to=jason@redhat.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=tromey@redhat.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).