This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Fix DW_AT_abstract_origin of DW_TAG_formal_parameter (PR debug/40573)


If origin is non-NULL and the same as node, calling
equate_decl_number_to_die for a PARM_DECL means we can't look up
anymore the DIE in the abstract DW_TAG_subprogram DIE and instead
will give in all subsequent cases the DIE in the outlined copy
of the inline function.

Bootstrapped/regtested on x86_64-linux and i686-linux, Daniel
has tested it with gdb testsuite.  Ok for trunk?

2009-06-30  Jakub Jelinek  <>

	PR debug/40573
	* dwarf2out.c (gen_formal_parameter_die): Call
	equate_decl_number_to_die if node is different from origin.

--- gcc/dwarf2out.c.jj	2009-06-30 13:10:30.000000000 +0200
+++ gcc/dwarf2out.c	2009-06-30 18:18:50.000000000 +0200
@@ -13717,7 +13717,7 @@ gen_formal_parameter_die (tree node, tre
 	    add_AT_flag (parm_die, DW_AT_artificial, 1);
-      if (node)
+      if (node && node != origin)
         equate_decl_number_to_die (node, parm_die);
       if (! DECL_ABSTRACT (node_or_origin))
 	add_location_or_const_value_attribute (parm_die, node_or_origin,


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]