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
+2011-05-31 Dodji Seketeli <dodji@redhat.com>
+
+ PR debug/49047
+ * dwarf2out.c (gen_subprogram_die): Emit linkage name attribute
+ for concrete functions containing the code of cloned functions.
+
2011-05-31 Richard Guenther <rguenther@suse.de>
* tree-ssa-forwprop.c (forward_propagate_into_comparison): Rename
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)
{
+2011-05-31 Dodji Seketeli <dodji@redhat.com>
+
+ PR debug/49047
+ * g++.dg/debug/dwarf2/cdtor-1.C: New test.
+
2011-05-31 Ira Rosen <ira.rosen@linaro.org>
PR testsuite/49239
--- /dev/null
+// origin PR debug/49047
+// { dg-options "-g -dA" }
+// { dg-do compile }
+
+struct K
+{
+ K () { }
+ ~K () { }
+};
+
+int
+main()
+{
+ K k;
+}
+
+// { dg-final {scan-assembler-times "\[^\n\r\]*DW_AT_MIPS_linkage_name:" 2 } }