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] Dwarf2 "main" pointer die for VMS (2nd try)



This is a revised patch implementing the debug main pointer die requirement for VMS Debug. It's been on hold pending the recently commitment of the end_prologue/begin_epilogue code.


A separate patch submission will implement in config/ia64/ the calling of this code.


2010-06-19  Douglas B Rupp  <rupp@gnat.com>

	* dwarf2out.c (dwarf2out_vms_debug_main_pointer): New function.
	* dwarf2out.h (dwarf2out_vms_debug_main_pointer): Declare new function.

diff -rupN gcc/dwarf2out.c gcc/dwarf2out.c
--- gcc/dwarf2out.c	2010-06-17 13:10:19.000000000 -0700
+++ gcc/dwarf2out.c	2010-06-19 09:27:36.000000000 -0700
@@ -17367,6 +17367,39 @@ add_name_and_src_coords_attributes (dw_d
 #endif
 }
 
+#ifdef VMS_DEBUGGING_INFO
+
+/* Output the debug main pointer die for VMS */
+
+void
+dwarf2out_vms_debug_main_pointer (void)
+{
+  char label[MAX_ARTIFICIAL_LABEL_BYTES];
+  dw_die_ref die;
+
+  /* Allocate the VMS debug main subprogram die.  */
+  die = ggc_alloc_cleared_die_node ();
+  die->die_tag = DW_TAG_subprogram;
+  add_name_attribute (die, VMS_DEBUG_MAIN_POINTER);
+  ASM_GENERATE_INTERNAL_LABEL (label, PROLOGUE_END_LABEL,
+			       current_function_funcdef_no);
+  add_AT_lbl_id (die, DW_AT_entry_pc, label);
+
+  /* Make it the first child of comp_unit_die.  */
+  die->die_parent = comp_unit_die;
+  if (comp_unit_die->die_child)
+    {
+      die->die_sib = comp_unit_die->die_child->die_sib;
+      comp_unit_die->die_child->die_sib = die;
+    }
+  else
+    {
+      die->die_sib = die;
+      comp_unit_die->die_child = die;
+    }
+}
+#endif
+
 /* Push a new declaration scope.  */
 
 static void
diff -rupN gcc/dwarf2out.h gcc/dwarf2out.h
--- gcc/dwarf2out.h	2010-06-16 12:40:46.000000000 -0700
+++ gcc/dwarf2out.h	2010-06-16 23:56:03.000000000 -0700
@@ -27,6 +27,9 @@ extern void debug_dwarf (void);
 struct die_struct;
 extern void debug_dwarf_die (struct die_struct *);
 extern void dwarf2out_set_demangle_name_func (const char *(*) (const char *));
+#ifdef VMS_DEBUGGING_INFO
+extern void dwarf2out_vms_debug_main_pointer (void);
+#endif
 
 struct array_descr_info
 {

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