Commit 8d8a3bda by Dodji Seketeli Committed by Dodji Seketeli

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
parent 6e8c8b23
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
......
......@@ -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)
{
......
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
......
// 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 } }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment