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] Dwarf2out end prologue/begin epilogue for IVMS (Revised)


This patch was getting a little fuzzy, so please find attached a fresh version incorporating comments received to date.

Justification from the HP OpenVMS DWARF Extensions Manual:

When a breakpoint is set on entry to a function, it is generally desirable for execution to be suspended, not on the very first instruction of the function, but rather at a point after the function's frame has been set up, after any language defined local declaration processing has been completed, and before execution of the first statement of the function begins. Debuggers generally cannot properly determine where this point is. Similarly for a breakpoint set on exit from a function. The prologue and epilogue attributes allow a compiler to communicate the location(s) to use.
2009-08-17  Douglas B Rupp  <rupp@gnat.com>

	* dbxout.c (gcc_debug_hooks): New entry begin_epilogue.
	* debug.c: Likewise.
	* sdbout.c: Likewise.
	* vmsdbgout.c: Likewise.
	* debug.h: Likewise. (dwarf2out_{begin,end}_prologue): Declare.
	* doc/tm.texi (ASM_OUTPUT_DWARF_DELTA_UNITS): Document.
	* dwarf2asm.c (dw2_asm_output_delta_units): New function.
	(ASM_OUTPUT_DWARF_DELTA_UNITS): New macro.
	* dwarf2asm.h (dw2_asm_output_delta_units): Declare.
	* dwarf2out.c (dw_fde_struct): New fields dw_fde_{end,begin}_prologue.
	(PROLOGUE_END_LABEL, EPILOGUE_BEGIN_LABEL): New macros.
	(dwarf2out_begin_prologue): Set dw_fde_struct defaults for above.
	(dwarf2out_end_prologue): New function.
	(dwarf2out_begin_epilogue): New function.
	(dw_val_struct): New value dw_val_class_delta.
	(gcc_debug_hooks): New entry begin_epilogue. Set end_prologue,
	begin_epilogue for VMS.
	(AT_delta1, AT_delta2, AT_delta_units, add_AT_delta): Declare
	new static functions.
	(dwarf_attr_name): New cases DW_AT_HP_{prologue,epilogue}.
	(AT_delta1, AT_delta2, AT_delta_units, add_AT_delta): New 
	static functions.
	(print_die): New case dw_val_class_delta.
	(attr_checksum): Likewise.
	(same_dw_val_p: Likewise.
	(size_of_die): Likewise.
	(value_format): Likewise.
	(output_die): Likewise.
	(gen_subprogram_die): Call add_AT_delta on VMS.
	* dwarf2out.c (dwarf2out_begin_epilogue): Rename to
	dwarf2out_cfi_begin_epilogue
	* dwarf2out.h (dwarf2out_begin_epilogue): Rename to
	dwarf2out_cfi_begin_epilogue
	* final.c (final_scan_insn): Likewise. Call begin_epilogue.
	* include/dwarf2.h (dwarf_attribute): New values DW_AT_HP_
	{prologue,epilogue}).

diff -rup gcc-head-src-orig/gcc/dbxout.c gcc-head-src/gcc/dbxout.c
--- gcc/dbxout.c	2009-07-07 13:46:06.000000000 -0700
+++ gcc/dbxout.c	2009-08-19 09:10:46.941724314 -0700
@@ -356,6 +356,7 @@ const struct gcc_debug_hooks dbx_debug_h
   dbxout_source_line,		         /* source_line */
   dbxout_begin_prologue,	         /* begin_prologue */
   debug_nothing_int_charstar,	         /* end_prologue */
+  debug_nothing_int_charstar,	         /* begin_epilogue */
   debug_nothing_int_charstar,	         /* end_epilogue */
 #ifdef DBX_FUNCTION_FIRST
   dbxout_begin_function,
@@ -393,6 +394,7 @@ const struct gcc_debug_hooks xcoff_debug
   xcoffout_source_line,
   xcoffout_begin_prologue,	         /* begin_prologue */
   debug_nothing_int_charstar,	         /* end_prologue */
+  debug_nothing_int_charstar,	         /* begin_epilogue */
   xcoffout_end_epilogue,
   debug_nothing_tree,		         /* begin_function */
   xcoffout_end_function,
diff -rup gcc-head-src-orig/gcc/debug.c gcc-head-src/gcc/debug.c
--- gcc/debug.c	2009-06-17 16:54:40.000000000 -0700
+++ gcc/debug.c	2009-08-19 09:10:46.942724156 -0700
@@ -37,6 +37,7 @@ const struct gcc_debug_hooks do_nothing_
   debug_nothing_int_charstar_int_bool,	 /* source_line */
   debug_nothing_int_charstar,	         /* begin_prologue */
   debug_nothing_int_charstar,	         /* end_prologue */
+  debug_nothing_int_charstar,	         /* begin_epilogue */
   debug_nothing_int_charstar,	         /* end_epilogue */
   debug_nothing_tree,		         /* begin_function */
   debug_nothing_int,		         /* end_function */
diff -rup gcc-head-src-orig/gcc/debug.h gcc-head-src/gcc/debug.h
--- gcc/debug.h	2009-06-17 16:54:40.000000000 -0700
+++ gcc/debug.h	2009-08-19 09:10:46.946723528 -0700
@@ -71,6 +71,9 @@ struct gcc_debug_hooks
      function.  */
   void (* end_prologue) (unsigned int line, const char *file);
 
+  /* Called at beginning of epilogue code.  */
+  void (* begin_epilogue) (unsigned int line, const char *file);
+
   /* Record end of epilogue code.  */
   void (* end_epilogue) (unsigned int line, const char *file);
 
@@ -163,6 +166,8 @@ extern const struct gcc_debug_hooks vmsd
 /* Dwarf2 frame information.  */
 
 extern void dwarf2out_begin_prologue (unsigned int, const char *);
+extern void dwarf2out_end_prologue (unsigned int, const char *);
+extern void dwarf2out_begin_epilogue (unsigned int, const char *);
 extern void dwarf2out_end_epilogue (unsigned int, const char *);
 extern void dwarf2out_frame_init (void);
 extern void dwarf2out_frame_finish (void);
diff -rup gcc-head-src-orig/gcc/doc/tm.texi gcc-head-src/gcc/doc/tm.texi
--- gcc/doc/tm.texi	2009-08-12 09:23:12.000000000 -0700
+++ gcc/doc/tm.texi	2009-08-19 09:10:46.952722585 -0700
@@ -9148,6 +9148,12 @@ A C statement to issue assembly directiv
 @var{lab1} minus @var{lab2}, using an integer of the given @var{size}.
 @end defmac
 
+@defmac ASM_OUTPUT_DWARF_DELTA_UNITS (@var{stream}, @var{size}, @var{label1}, @var{label2}, @var{units})
+A C statement to issue assembly directives that create a difference
+between the two given labels in system defined units, e.g. instruction
+slots on IA64 VMS, using an integer of the given size.
+@end defmac
+
 @defmac ASM_OUTPUT_DWARF_OFFSET (@var{stream}, @var{size}, @var{label}, @var{section})
 A C statement to issue assembly directives that create a
 section-relative reference to the given @var{label}, using an integer of the
diff -rup gcc-head-src-orig/gcc/dwarf2asm.c gcc-head-src/gcc/dwarf2asm.c
--- gcc/dwarf2asm.c	2009-07-09 12:41:25.000000000 -0700
+++ gcc/dwarf2asm.c	2009-08-19 09:10:46.953722428 -0700
@@ -152,6 +152,34 @@ dw2_asm_output_delta (int size, const ch
   va_end (ap);
 }
 
+/* Output the difference between two symbols in instruction units
+   in a given size.  */
+
+void
+dw2_asm_output_delta_units (int size ATTRIBUTE_UNUSED,
+			    const char *lab1, const char *lab2,
+		            const int units ATTRIBUTE_UNUSED,
+			    const char *comment, ...)
+{
+  va_list ap;
+
+  va_start (ap, comment);
+
+#ifndef ASM_OUTPUT_DWARF_DELTA_UNITS
+  dw2_asm_output_delta (size, lab1, lab2, comment);
+#else
+  ASM_OUTPUT_DWARF_DELTA_UNITS (asm_out_file, size, lab1, lab2, units);
+  if (flag_debug_asm && comment)
+    {
+      fprintf (asm_out_file, "\t%s ", ASM_COMMENT_START);
+      vfprintf (asm_out_file, comment, ap);
+    }
+  fputc ('\n', asm_out_file);
+#endif
+
+  va_end (ap);
+}
+
 /* Output a section-relative reference to a LABEL, which was placed in
    BASE.  In general this can only be done for debugging symbols.
    E.g. on most targets with the GNU linker, this is accomplished with
diff -rup gcc-head-src-orig/gcc/dwarf2asm.h gcc-head-src/gcc/dwarf2asm.h
--- gcc/dwarf2asm.h	2009-02-20 07:20:38.000000000 -0800
+++ gcc/dwarf2asm.h	2009-08-19 09:10:46.954722271 -0700
@@ -30,6 +30,10 @@ extern void dw2_asm_output_delta (int, c
 				  const char *, ...)
      ATTRIBUTE_NULL_PRINTF_4;
 
+extern void dw2_asm_output_delta_units (int, const char *, const char *,
+				        const int, const char *, ...)
+     ATTRIBUTE_NULL_PRINTF_5;
+
 extern void dw2_asm_output_offset (int, const char *, section *, 
 				   const char *, ...)
      ATTRIBUTE_NULL_PRINTF_4;
diff -rup gcc-head-src-orig/gcc/dwarf2out.c gcc-head-src/gcc/dwarf2out.c
--- gcc/dwarf2out.c	2009-08-16 02:02:25.000000000 -0700
+++ gcc/dwarf2out.c	2009-08-19 13:56:28.000000000 -0700
@@ -280,6 +280,8 @@ typedef struct GTY(()) dw_fde_struct {
   const char *dw_fde_begin;
   const char *dw_fde_current_label;
   const char *dw_fde_end;
+  const char *dw_fde_end_prologue;
+  const char *dw_fde_begin_epilogue;
   const char *dw_fde_hot_section_label;
   const char *dw_fde_hot_section_end_label;
   const char *dw_fde_unlikely_section_label;
@@ -480,6 +482,14 @@ static void def_cfa_1 (const char *, dw_
 #define FUNC_END_LABEL		"LFE"
 #endif
 
+#ifndef PROLOGUE_END_LABEL
+#define PROLOGUE_END_LABEL	"LPE"
+#endif
+
+#ifndef EPILOGUE_BEGIN_LABEL
+#define EPILOGUE_BEGIN_LABEL	"LEB"
+#endif
+
 #ifndef FRAME_BEGIN_LABEL
 #define FRAME_BEGIN_LABEL	"Lframe"
 #endif
@@ -2766,7 +2776,7 @@ dwarf2out_frame_debug (rtx insn, bool af
    NOTE_INSN_CFA_RESTORE_STATE at the appropriate place in the stream.  */
 
 void
-dwarf2out_begin_epilogue (rtx insn)
+dwarf2out_cfi_begin_epilogue (rtx insn)
 {
   bool saw_frp = false;
   rtx i;
@@ -2839,7 +2849,8 @@ dwarf2out_begin_epilogue (rtx insn)
   cfa_remember.in_use = 1;
 }
 
-/* A "subroutine" of dwarf2out_begin_epilogue.  Emit the restore required.  */
+/* A "subroutine" of dwarf2out_cfi_begin_epilogue.  Emit the restore
+   required.  */
 
 void
 dwarf2out_frame_debug_restore_state (void)
@@ -3897,6 +3908,8 @@ dwarf2out_begin_prologue (unsigned int l
   fde->dw_fde_switched_sections = 0;
   fde->dw_fde_switched_cold_to_hot = 0;
   fde->dw_fde_end = NULL;
+  fde->dw_fde_end_prologue = NULL;
+  fde->dw_fde_begin_epilogue = NULL;
   fde->dw_fde_cfi = NULL;
   fde->dw_fde_switch_cfi = NULL;
   fde->funcdef_number = current_function_funcdef_no;
@@ -3940,6 +3953,51 @@ dwarf2out_begin_prologue (unsigned int l
     dwarf2out_do_cfi_startproc (false);
 }
 
+/* Output a marker (i.e. a label) for the end of the generated code
+   for a function prologue.  This gets called *after* the prologue code has
+   been generated.  */
+
+void
+dwarf2out_end_prologue (unsigned int line ATTRIBUTE_UNUSED,
+			const char *file ATTRIBUTE_UNUSED)
+{
+  dw_fde_ref fde;
+  char label[MAX_ARTIFICIAL_LABEL_BYTES];
+
+  /* Output a label to mark the endpoint of the code generated for this
+     function.  */
+  ASM_GENERATE_INTERNAL_LABEL (label, PROLOGUE_END_LABEL,
+			       current_function_funcdef_no);
+  ASM_OUTPUT_DEBUG_LABEL (asm_out_file, PROLOGUE_END_LABEL,
+			  current_function_funcdef_no);
+  fde = &fde_table[fde_table_in_use - 1];
+  fde->dw_fde_end_prologue = xstrdup (label);
+}
+
+/* Output a marker (i.e. a label) for the beginning of the generated code
+   for a function epilogue.  This gets called *before* the prologue code has
+   been generated.  */
+
+void
+dwarf2out_begin_epilogue (unsigned int line ATTRIBUTE_UNUSED,
+			  const char *file ATTRIBUTE_UNUSED)
+{
+  dw_fde_ref fde;
+  char label[MAX_ARTIFICIAL_LABEL_BYTES];
+
+  fde = &fde_table[fde_table_in_use - 1];
+  if (fde->dw_fde_begin_epilogue)
+    return;
+
+  /* Output a label to mark the endpoint of the code generated for this
+     function.  */
+  ASM_GENERATE_INTERNAL_LABEL (label, EPILOGUE_BEGIN_LABEL,
+			       current_function_funcdef_no);
+  ASM_OUTPUT_DEBUG_LABEL (asm_out_file, EPILOGUE_BEGIN_LABEL,
+			  current_function_funcdef_no);
+  fde->dw_fde_begin_epilogue = xstrdup (label);
+}
+
 /* Output a marker (i.e. a label) for the absolute end of the generated code
    for a function definition.  This gets called *after* the epilogue code has
    been generated.  */
@@ -4112,7 +4170,8 @@ enum dw_val_class
   dw_val_class_lineptr,
   dw_val_class_str,
   dw_val_class_macptr,
-  dw_val_class_file
+  dw_val_class_file,
+  dw_val_class_delta
 };
 
 /* Describe a double word constant value.  */
@@ -4158,6 +4217,12 @@ typedef struct GTY(()) dw_val_struct {
       char * GTY ((tag ("dw_val_class_lbl_id"))) val_lbl_id;
       unsigned char GTY ((tag ("dw_val_class_flag"))) val_flag;
       struct dwarf_file_data * GTY ((tag ("dw_val_class_file"))) val_file;
+      struct dw_val_delta_union
+	{
+	  char * lbl1;
+	  char * lbl2;
+	  int units;
+	} GTY ((tag ("dw_val_class_delta"))) val_delta;
     }
   GTY ((desc ("%1.val_class"))) v;
 }
@@ -5284,7 +5349,13 @@ const struct gcc_debug_hooks dwarf2_debu
   dwarf2out_ignore_block,
   dwarf2out_source_line,
   dwarf2out_begin_prologue,
-  debug_nothing_int_charstar,	/* end_prologue */
+#if VMS_DEBUGGING_INFO
+  dwarf2out_end_prologue,
+  dwarf2out_begin_epilogue,
+#else
+  debug_nothing_int_charstar,
+  debug_nothing_int_charstar,
+#endif
   dwarf2out_end_epilogue,
   dwarf2out_begin_function,
   debug_nothing_int,		/* end_function */
@@ -5913,6 +5984,11 @@ static void prune_unused_types_walk_attr
 static void prune_unused_types_prune (dw_die_ref);
 static void prune_unused_types (void);
 static int maybe_emit_file (struct dwarf_file_data *fd);
+static inline const char *AT_delta1 (dw_attr_ref);
+static inline const char *AT_delta2 (dw_attr_ref);
+static inline int AT_delta_units (dw_attr_ref);
+static inline void add_AT_delta (dw_die_ref, enum dwarf_attribute,
+				 const char *, const char *, int);
 
 /* Section names used to hold DWARF debugging information.  */
 #ifndef DEBUG_INFO_SECTION
@@ -6381,14 +6457,24 @@ dwarf_attr_name (unsigned int attr)
       return "DW_AT_MIPS_tail_loop_begin";
     case DW_AT_MIPS_epilog_begin:
       return "DW_AT_MIPS_epilog_begin";
+#if VMS_DEBUGGING_INFO
+    case DW_AT_HP_prologue:
+      return "DW_AT_HP_prologue";
+#else
     case DW_AT_MIPS_loop_unroll_factor:
       return "DW_AT_MIPS_loop_unroll_factor";
+#endif
     case DW_AT_MIPS_software_pipeline_depth:
       return "DW_AT_MIPS_software_pipeline_depth";
     case DW_AT_MIPS_linkage_name:
       return "DW_AT_MIPS_linkage_name";
+#if VMS_DEBUGGING_INFO
+    case DW_AT_HP_epilogue:
+      return "DW_AT_HP_epilogue";
+#else
     case DW_AT_MIPS_stride:
       return "DW_AT_MIPS_stride";
+#endif
     case DW_AT_MIPS_abstract_name:
       return "DW_AT_MIPS_abstract_name";
     case DW_AT_MIPS_clone_origin:
@@ -6878,6 +6964,21 @@ AT_file (dw_attr_ref a)
   return a->dw_attr_val.v.val_file;
 }
 
+/* Add a delta attribute value to a DIE.  */
+
+static inline void
+add_AT_delta (dw_die_ref die, enum dwarf_attribute attr_kind, const char *lbl1, const char *lbl2, int units)
+{
+  dw_attr_node attr;
+
+  attr.dw_attr = attr_kind;
+  attr.dw_attr_val.val_class = dw_val_class_delta;
+  attr.dw_attr_val.v.val_delta.lbl1 = xstrdup (lbl1);
+  attr.dw_attr_val.v.val_delta.lbl2 = xstrdup (lbl2);
+  attr.dw_attr_val.v.val_delta.units = units;
+  add_dwarf_attr (die, &attr);
+}
+
 /* Add a label identifier attribute value to a DIE.  */
 
 static inline void
@@ -6949,6 +7050,39 @@ add_AT_range_list (dw_die_ref die, enum 
   add_dwarf_attr (die, &attr);
 }
 
+/* Return the start label of a delta attribute.  */
+
+static inline const char *
+AT_delta1 (dw_attr_ref a)
+{
+  if (a && (AT_class (a) == dw_val_class_delta))
+    return a->dw_attr_val.v.val_delta.lbl1;
+
+  abort ();
+}
+
+/* Return the end label of a delta attribute.  */
+
+static inline const char *
+AT_delta2 (dw_attr_ref a)
+{
+  if (a && (AT_class (a) == dw_val_class_delta))
+    return a->dw_attr_val.v.val_delta.lbl2;
+
+  abort ();
+}
+
+/* Return the units value of a delta attribute.  */
+
+static inline int
+AT_delta_units (dw_attr_ref a)
+{
+  if (a && (AT_class (a) == dw_val_class_delta))
+    return a->dw_attr_val.v.val_delta.units;
+
+  abort ();
+}
+
 static inline const char *
 AT_lbl (dw_attr_ref a)
 {
@@ -7462,6 +7596,10 @@ print_die (dw_die_ref die, FILE *outfile
 	  else
 	    fprintf (outfile, "die -> <null>");
 	  break;
+	case dw_val_class_delta:
+	  fprintf (outfile, "delta: (%s-%s)/f(%d)",
+		   AT_delta2 (a), AT_delta1 (a), AT_delta_units (a));
+	  break;
 	case dw_val_class_lbl_id:
 	case dw_val_class_lineptr:
 	case dw_val_class_macptr:
@@ -7632,6 +7770,7 @@ attr_checksum (dw_attr_ref at, struct md
       break;
 
     case dw_val_class_fde_ref:
+    case dw_val_class_delta:
     case dw_val_class_lbl_id:
     case dw_val_class_lineptr:
     case dw_val_class_macptr:
@@ -7738,6 +7877,7 @@ same_dw_val_p (const dw_val_node *v1, co
       return same_die_p (v1->v.val_die_ref.die, v2->v.val_die_ref.die, mark);
 
     case dw_val_class_fde_ref:
+    case dw_val_class_delta:
     case dw_val_class_lbl_id:
     case dw_val_class_lineptr:
     case dw_val_class_macptr:
@@ -8332,6 +8472,9 @@ size_of_die (dw_die_ref die)
 	case dw_val_class_fde_ref:
 	  size += DWARF_OFFSET_SIZE;
 	  break;
+	case dw_val_class_delta:
+	  size += 4;
+	  break;
 	case dw_val_class_lbl_id:
 	  size += DWARF2_ADDR_SIZE;
 	  break;
@@ -8538,6 +8681,8 @@ value_format (dw_attr_ref a)
 	return DW_FORM_ref;
     case dw_val_class_fde_ref:
       return DW_FORM_data;
+    case dw_val_class_delta:
+      return DW_FORM_data4;
     case dw_val_class_lbl_id:
       return DW_FORM_addr;
     case dw_val_class_lineptr:
@@ -8884,6 +9029,14 @@ output_die (dw_die_ref die)
 	  }
 	  break;
 
+	case dw_val_class_delta:
+	  if (AT_delta_units (a))
+	    dw2_asm_output_delta_units (4, AT_delta2 (a), AT_delta1 (a),
+				        AT_delta_units (a), "%s", name);
+	  else
+	    dw2_asm_output_delta (4, AT_delta2 (a), AT_delta1 (a), "%s", name);
+	  break;
+
 	case dw_val_class_lbl_id:
 	  dw2_asm_output_addr (DWARF2_ADDR_SIZE, AT_lbl (a), "%s", name);
 	  break;
@@ -14446,6 +14599,32 @@ gen_subprogram_die (tree decl, dw_die_re
 				       current_function_funcdef_no);
 	  add_AT_lbl_id (subr_die, DW_AT_high_pc, label_id);
 
+#if VMS_DEBUGGING_INFO
+      /* HP OpenVMS Industry Standard 64: DWARF Extensions
+	 Section 2.3 Prologue and Epilogue Attributes:
+	 When a breakpoint is set on entry to a function, it is generally
+	 desirable for execution to be suspended, not on the very first
+	 instruction of the function, but rather at a point after the
+	 function's frame has been set up, after any language defined local
+	 declaration processing has been completed, and before execution of
+	 the first statement of the function begins. Debuggers generally
+	 cannot properly determine where this point is.  Similarly for a
+	 breakpoint set on exit from a function. The prologue and epilogue
+	 attributes allow a compiler to communicate the location(s) to use.  */
+
+      {
+        dw_fde_ref fde = &fde_table[current_funcdef_fde];
+
+        if (fde->dw_fde_end_prologue)
+          add_AT_delta (subr_die, DW_AT_HP_prologue,
+	    fde->dw_fde_begin, fde->dw_fde_end_prologue, 1);
+
+        if (fde->dw_fde_begin_epilogue)
+          add_AT_delta (subr_die, DW_AT_HP_epilogue,
+	    fde->dw_fde_begin, fde->dw_fde_begin_epilogue, 1);
+      }
+#endif
+
 	  add_pubname (decl, subr_die);
 	  add_arange (decl, subr_die);
 	}
diff -rup gcc-head-src-orig/gcc/dwarf2out.h gcc-head-src/gcc/dwarf2out.h
--- gcc/dwarf2out.h	2009-05-29 17:33:46.000000000 -0700
+++ gcc/dwarf2out.h	2009-08-19 09:10:47.014712841 -0700
@@ -20,7 +20,7 @@ along with GCC; see the file COPYING3.  
 
 extern void dwarf2out_decl (tree);
 extern void dwarf2out_frame_debug (rtx, bool);
-extern void dwarf2out_begin_epilogue (rtx);
+extern void dwarf2out_cfi_begin_epilogue (rtx);
 extern void dwarf2out_frame_debug_restore_state (void);
 
 extern void debug_dwarf (void);
diff -rup gcc-head-src-orig/gcc/final.c gcc-head-src/gcc/final.c
--- gcc/final.c	2009-08-14 08:39:15.000000000 -0700
+++ gcc/final.c	2009-08-19 09:10:47.016712527 -0700
@@ -1891,8 +1891,9 @@ final_scan_insn (rtx insn, FILE *file, i
 	case NOTE_INSN_EPILOGUE_BEG:
 #if defined (DWARF2_UNWIND_INFO) && defined (HAVE_epilogue)
 	  if (dwarf2out_do_frame ())
-	    dwarf2out_begin_epilogue (insn);
+	    dwarf2out_cfi_begin_epilogue (insn);
 #endif
+	  (*debug_hooks->begin_epilogue) (last_linenum, last_filename);
 	  targetm.asm_out.function_begin_epilogue (file);
 	  break;
 
diff -rup gcc-head-src-orig/gcc/sdbout.c gcc-head-src/gcc/sdbout.c
--- gcc/sdbout.c	2009-06-23 03:19:18.000000000 -0700
+++ gcc/sdbout.c	2009-08-19 09:10:46.943723999 -0700
@@ -324,6 +324,7 @@ const struct gcc_debug_hooks sdb_debug_h
   sdbout_begin_prologue,	         /* begin_prologue */
   debug_nothing_int_charstar,	         /* end_prologue */
 #endif
+  debug_nothing_int_charstar,	         /* begin_epilogue */
   sdbout_end_epilogue,		         /* end_epilogue */
   sdbout_begin_function,	         /* begin_function */
   sdbout_end_function,		         /* end_function */
@@ -1712,6 +1713,7 @@ const struct gcc_debug_hooks sdb_debug_h
   0,		/* source_line */
   0,		/* begin_prologue */
   0,		/* end_prologue */
+  0,		/* begin_epilogue */
   0,		/* end_epilogue */
   0,		/* begin_function */
   0,		/* end_function */
diff -rup gcc-head-src-orig/gcc/vmsdbgout.c gcc-head-src/gcc/vmsdbgout.c
--- gcc/vmsdbgout.c	2009-07-29 10:35:32.000000000 -0700
+++ gcc/vmsdbgout.c	2009-08-19 09:10:46.945723685 -0700
@@ -200,6 +200,7 @@ const struct gcc_debug_hooks vmsdbg_debu
    vmsdbgout_source_line,
    vmsdbgout_begin_prologue,
    vmsdbgout_end_prologue,
+   debug_nothing_int_charstar,  /* begin_epilogue */
    vmsdbgout_end_epilogue,
    vmsdbgout_begin_function,
    vmsdbgout_end_function,
diff -rup gcc-head-src-orig/include/dwarf2.h gcc-head-src/include/dwarf2.h
--- include/dwarf2.h	2009-07-20 14:00:52.000000000 -0700
+++ include/dwarf2.h	2009-08-19 09:10:46.973719285 -0700
@@ -370,6 +370,8 @@ enum dwarf_attribute
     /* HP extensions.  */
     DW_AT_HP_block_index         = 0x2000,
     DW_AT_HP_unmodifiable        = 0x2001, /* Same as DW_AT_MIPS_fde.  */
+    DW_AT_HP_prologue            = 0x2005, /* Loc of first instruction after prologue.  */
+    DW_AT_HP_epilogue            = 0x2008, /* Loc of first instruction in epilogue.  */
     DW_AT_HP_actuals_stmt_list   = 0x2010,
     DW_AT_HP_proc_per_section    = 0x2011,
     DW_AT_HP_raw_data_ptr        = 0x2012,

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