From 8d8a3bda40b0fa5aeb801287f0e2e79affe26c54 Mon Sep 17 00:00:00 2001 From: Dodji Seketeli Date: Tue, 31 May 2011 12:17:21 +0000 Subject: 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: r174474 --- gcc/dwarf2out.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'gcc/dwarf2out.c') diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index 7ec1e93..9a415e9 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) { -- cgit v1.1