This is the mail archive of the gcc-patches@gcc.gnu.org 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 last dwarf2out change with pubnames


Noticed when trying to do sth on Darwin.  Lightly tested, committed
as obvious.

Richard.

2017-08-30  Richard Biener  <rguenther@suse.de>

	* dwarf2out.c (dwarf2out_finish): Remove setting AT_pubnames.
	(dwarf2out_early_finish): Move setting of AT_pubnames from
	early debug output to early finish.

Index: gcc/dwarf2out.c
===================================================================
--- gcc/dwarf2out.c	(revision 251449)
+++ gcc/dwarf2out.c	(working copy)
@@ -29965,13 +29965,6 @@ dwarf2out_finish (const char *)
       *slot = ctnode;
     }
 
-  /* The AT_pubnames attribute needs to go in all skeleton dies, including
-     both the main_cu and all skeleton TUs.  Making this call unconditional
-     would end up either adding a second copy of the AT_pubnames attribute, or
-     requiring a special case in add_top_level_skeleton_die_attrs.  */
-  if (!dwarf_split_debug_info)
-    add_AT_pubnames (comp_unit_die ());
-
   if (dwarf_split_debug_info)
     {
       int mark;
@@ -30521,6 +30514,13 @@ dwarf2out_early_finish (const char *file
   for (limbo_die_node *node = limbo_die_list; node; node = node->next)
     note_variable_value (node->die);
 
+  /* The AT_pubnames attribute needs to go in all skeleton dies, including
+     both the main_cu and all skeleton TUs.  Making this call unconditional
+     would end up either adding a second copy of the AT_pubnames attribute, or
+     requiring a special case in add_top_level_skeleton_die_attrs.  */
+  if (!dwarf_split_debug_info)
+    add_AT_pubnames (comp_unit_die ());
+
   /* The early debug phase is now finished.  */
   early_dwarf_finished = true;
 
@@ -30581,13 +30581,6 @@ dwarf2out_early_finish (const char *file
       *slot = ctnode;
     }
 
-  /* The AT_pubnames attribute needs to go in all skeleton dies, including
-     both the main_cu and all skeleton TUs.  Making this call unconditional
-     would end up either adding a second copy of the AT_pubnames attribute, or
-     requiring a special case in add_top_level_skeleton_die_attrs.  */
-  if (!dwarf_split_debug_info)
-    add_AT_pubnames (comp_unit_die ());
-
   /* Stick a unique symbol to the main debuginfo section.  */
   compute_comp_unit_symbol (comp_unit_die ());
 


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