OSDN Git Service

Fix PR debug/49047
[pf3gnuchains/gcc-fork.git] / gcc / dwarf2out.c
index 7ec1e93..9a415e9 100644 (file)
@@ -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)
     {