diff options
author | Dodji Seketeli <dodji@redhat.com> | 2011-05-31 12:09:06 +0000 |
---|---|---|
committer | Dodji Seketeli <dodji@gcc.gnu.org> | 2011-05-31 14:09:06 +0200 |
commit | 874e7c171cd2af43b4dc9dddae981120e1b29e33 (patch) | |
tree | 9c47c4f2973048814d4053c3e7690993b6e03ac2 /gcc/dwarf2out.c | |
parent | 755b3b7cf7c635a5c766400865c2bfa52d6aa16d (diff) | |
download | gcc-874e7c171cd2af43b4dc9dddae981120e1b29e33.tar.gz |
re PR debug/49047 (DW_AT_linkage_name missing for constructors and destructors)
Fix PR debug/49047
gcc/
* dwarf2out.c (gen_subprogram_die): Emit linkage name attribute
for concrete functions containing the code of cloned functions.
gcc/testsuite/
* g++.dg/debug/dwarf2/cdtor-1.C: New test.
From-SVN: r174472
Diffstat (limited to 'gcc/dwarf2out.c')
-rw-r--r-- | gcc/dwarf2out.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index 7ec1e931eed..9a415e9a171 100644 --- a/gcc/dwarf2out.c +++ b/gcc/dwarf2out.c @@ -19636,6 +19636,12 @@ gen_subprogram_die (tree decl, dw_die_ref context_die) subr_die = new_die (DW_TAG_subprogram, context_die, decl); add_abstract_origin_attribute (subr_die, origin); + /* This is where the actual code for a 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); } else if (old_die) { |