dbxout.c (dbx_debug_hooks): Update end_prologue, end_epilogue.
authorDouglas B Rupp <rupp@gnat.com>
Thu, 15 Aug 2002 19:59:29 +0000 (19:59 +0000)
committerDouglas Rupp <rupp@gcc.gnu.org>
Thu, 15 Aug 2002 19:59:29 +0000 (19:59 +0000)
* dbxout.c (dbx_debug_hooks): Update end_prologue, end_epilogue.
(xcoff_debug_hooks): Update end_prologue.
* debug.c (do_nothing_debug_hooks): Update end_prologue, end_epilogue.
* debug.h (end_prologue): Add file arg.
(end_epilogue): Add line and file args.
(dwarf2out_end_epilogue): Add line and file args.
(vmsdbgout_after_prologue): Remove.
* dwarf2out.c (dwarf2out_end_epilogue): Add line and file args.
(dwarf2_debug_hooks): Update end_prologue.
* dwarfout.c (dwarfout_end_epilogue): Add line and file args.
(dwarfout_end_prologue): Add file arg.
* final.c (vmsdbgout_after_prologue): Remove
(final_end_function): Update end_epilogue call.
(final_scan_insn): Update end_prologue call.
* sdbout.c (sdbout_end_epilogue): Add line and file args.
(sdbout_end_prologue): Add file arg.
(sdb_debug_hooks): Update end_prologue.
(sdb_begin_prologue): Update sdbout_end_prologue call.
* vmsdbgout.c (vmsdbg_debug_hooks): Add vmsdbgout_end_prologue,
vmsdbgout_end_function.
(vmsdbgout_end_prologue): New function renamed from
vmsdbgout_after_prologue. Call vmsdbgout_source_line.
(vmsdbgout_end_function): New function.
(vmsdbgout_end_epilogue): Add line and file args. Call
vmsdbgout_source_line.
(write_pclines): Write only valid line numbers.
(write_srccorr): Don't write source correlation records if 0 lines.
* xcoffout.c (xcoffout_end_epilogue): Add line and file args.

From-SVN: r56356

gcc/ChangeLog
gcc/dbxout.c
gcc/debug.c
gcc/debug.h
gcc/dwarf2out.c
gcc/dwarfout.c
gcc/final.c
gcc/sdbout.c
gcc/vmsdbgout.c
gcc/xcoffout.c
gcc/xcoffout.h

index 040889a6029c7b2c8868a98cbdc80a01c8da5ac6..7d618c39a5fda16a689be5ed155d2a680bc46e2e 100644 (file)
@@ -1,3 +1,34 @@
+2002-08-15  Douglas B Rupp  <rupp@gnat.com>
+
+       * dbxout.c (dbx_debug_hooks): Update end_prologue, end_epilogue.
+       (xcoff_debug_hooks): Update end_prologue.
+       * debug.c (do_nothing_debug_hooks): Update end_prologue, end_epilogue.
+       * debug.h (end_prologue): Add file arg.
+       (end_epilogue): Add line and file args.
+       (dwarf2out_end_epilogue): Add line and file args.
+       (vmsdbgout_after_prologue): Remove.
+       * dwarf2out.c (dwarf2out_end_epilogue): Add line and file args.
+       (dwarf2_debug_hooks): Update end_prologue.
+       * dwarfout.c (dwarfout_end_epilogue): Add line and file args.
+       (dwarfout_end_prologue): Add file arg.
+       * final.c (vmsdbgout_after_prologue): Remove
+       (final_end_function): Update end_epilogue call.
+       (final_scan_insn): Update end_prologue call.
+       * sdbout.c (sdbout_end_epilogue): Add line and file args.
+       (sdbout_end_prologue): Add file arg.
+       (sdb_debug_hooks): Update end_prologue.
+       (sdb_begin_prologue): Update sdbout_end_prologue call.
+       * vmsdbgout.c (vmsdbg_debug_hooks): Add vmsdbgout_end_prologue,
+       vmsdbgout_end_function.
+       (vmsdbgout_end_prologue): New function renamed from
+       vmsdbgout_after_prologue. Call vmsdbgout_source_line.
+       (vmsdbgout_end_function): New function.
+       (vmsdbgout_end_epilogue): Add line and file args. Call
+       vmsdbgout_source_line.
+       (write_pclines): Write only valid line numbers.
+       (write_srccorr): Don't write source correlation records if 0 lines.
+       * xcoffout.c (xcoffout_end_epilogue): Add line and file args.
+
 2002-08-15  Steve Ellcey  <sje@cup.hp.com>
 
        * gcc/unwind.h (_Unwind_Ptr): Make 64 bits on IA64 HP-UX.
index ddebf51355d6f75c87d0d7571ae04df1fc17788d..4e467739d246e96f7297c31f1dd80ef241fb254c 100644 (file)
@@ -1,6 +1,6 @@
 /* Output dbx-format symbol table information from GNU compiler.
    Copyright (C) 1987, 1988, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
-   1999, 2000, 2001 Free Software Foundation, Inc.
+   1999, 2000, 2001, 2002 Free Software Foundation, Inc.
 
 This file is part of GCC.
 
@@ -340,8 +340,8 @@ const struct gcc_debug_hooks dbx_debug_hooks =
   debug_true_tree,             /* ignore_block */
   dbxout_source_line,          /* source_line */
   dbxout_source_line,          /* begin_prologue: just output line info */
-  debug_nothing_int,           /* end_prologue */
-  debug_nothing_void,          /* end_epilogue */
+  debug_nothing_int_charstar,  /* end_prologue */
+  debug_nothing_int_charstar,  /* end_epilogue */
 #ifdef DBX_FUNCTION_FIRST
   dbxout_begin_function,
 #else
@@ -370,7 +370,7 @@ const struct gcc_debug_hooks xcoff_debug_hooks =
   debug_true_tree,             /* ignore_block */
   xcoffout_source_line,
   xcoffout_begin_prologue,     /* begin_prologue */
-  debug_nothing_int,           /* end_prologue */
+  debug_nothing_int_charstar,  /* end_prologue */
   xcoffout_end_epilogue,
   debug_nothing_tree,          /* begin_function */
   xcoffout_end_function,
index 685602e16c629d3f82458f1baf473b4dcddb824e..682f6ed1be30851296b51922d5e8d186dbe0b49a 100644 (file)
@@ -33,8 +33,8 @@ const struct gcc_debug_hooks do_nothing_debug_hooks =
   debug_true_tree,             /* ignore_block */
   debug_nothing_int_charstar,  /* source_line */
   debug_nothing_int_charstar,  /* begin_prologue */
-  debug_nothing_int,           /* end_prologue */
-  debug_nothing_void,          /* end_epilogue */
+  debug_nothing_int_charstar,  /* end_prologue */
+  debug_nothing_int_charstar,  /* end_epilogue */
   debug_nothing_tree,          /* begin_function */
   debug_nothing_int,           /* end_function */
   debug_nothing_tree,          /* function_decl */
index a8b1954f85045de81a1b08a957295aff2f58a31b..8b65567b5ab6c1df28495ee6b90d6d3edb63d2be 100644 (file)
@@ -68,10 +68,10 @@ struct gcc_debug_hooks
 
   /* Called at end of prologue code.  LINE is the first line in the
      function.  */
-  void (* end_prologue) PARAMS ((unsigned int line));
+  void (* end_prologue) PARAMS ((unsigned int line, const char *file));
 
   /* Record end of epilogue code.  */
-  void (* end_epilogue) PARAMS ((void));
+  void (* end_epilogue) PARAMS ((unsigned int line, const char *file));
 
   /* Called at start of function DECL, before it is declared.  */
   void (* begin_function) PARAMS ((tree decl));
@@ -135,17 +135,11 @@ extern const struct gcc_debug_hooks vmsdbg_debug_hooks;
 /* Dwarf2 frame information.  */
 
 extern void dwarf2out_begin_prologue   PARAMS ((unsigned int, const char *));
-extern void dwarf2out_end_epilogue     PARAMS ((void));
+extern void dwarf2out_end_epilogue     PARAMS ((unsigned int, const char *));
 extern void dwarf2out_frame_init       PARAMS ((void));
 extern void dwarf2out_frame_finish     PARAMS ((void));
 /* Decide whether we want to emit frame unwind information for the current
    translation unit.  */
 extern int dwarf2out_do_frame          PARAMS ((void));
 
-/* When writing VMS debug info, output label after the prologue of the
-   function.  */
-extern void vmsdbgout_after_prologue   PARAMS ((void));
-
-
-
 #endif /* !GCC_DEBUG_H  */
index d783d3b3a7fef344bdf0bba4efe02f2fd91ea23c..4368fd379fe8aa4324e9be95e29ed05f157038c2 100644 (file)
@@ -2131,7 +2131,9 @@ dwarf2out_begin_prologue (line, file)
    been generated.  */
 
 void
-dwarf2out_end_epilogue ()
+dwarf2out_end_epilogue (line, file)
+     unsigned int line ATTRIBUTE_UNUSED;
+     const char *file ATTRIBUTE_UNUSED;
 {
   dw_fde_ref fde;
   char label[MAX_ARTIFICIAL_LABEL_BYTES];
@@ -3106,7 +3108,7 @@ const struct gcc_debug_hooks dwarf2_debug_hooks =
   dwarf2out_ignore_block,
   dwarf2out_source_line,
   dwarf2out_begin_prologue,
-  debug_nothing_int,           /* end_prologue */
+  debug_nothing_int_charstar,  /* end_prologue */
   dwarf2out_end_epilogue,
   debug_nothing_tree,          /* begin_function */
   debug_nothing_int,           /* end_function */
index 1f7817adb7de4788099ebc9a6b97d768e7e01330..5e621237bee122ec2510129886f9b81b89d9f782 100644 (file)
@@ -1,6 +1,6 @@
 /* Output Dwarf format symbol table information from the GNU C compiler.
    Copyright (C) 1992, 1993, 1995, 1996, 1997, 1998, 2002,
-   1999, 2000, 2001 Free Software Foundation, Inc.
+   1999, 2000, 2001, 2002 Free Software Foundation, Inc.
    Contributed by Ron Guilmette (rfg@monkeys.com) of Network Computing Devices.
 
 This file is part of GCC.
@@ -782,9 +782,9 @@ static void dwarfout_end_source_file        PARAMS ((unsigned));
 static void dwarfout_end_source_file_check PARAMS ((unsigned));
 static void dwarfout_begin_block       PARAMS ((unsigned, unsigned));
 static void dwarfout_end_block         PARAMS ((unsigned, unsigned));
-static void dwarfout_end_epilogue      PARAMS ((void));
+static void dwarfout_end_epilogue      PARAMS ((unsigned int, const char *));
 static void dwarfout_source_line       PARAMS ((unsigned int, const char *));
-static void dwarfout_end_prologue      PARAMS ((unsigned int));
+static void dwarfout_end_prologue      PARAMS ((unsigned int, const char *));
 static void dwarfout_end_function      PARAMS ((unsigned int));
 static void dwarfout_function_decl     PARAMS ((tree));
 static void dwarfout_global_decl       PARAMS ((tree));
@@ -5835,8 +5835,9 @@ dwarfout_end_block (line, blocknum)
    to their home locations).  */
 
 static void
-dwarfout_end_prologue (line)
+dwarfout_end_prologue (line, file)
      unsigned int line ATTRIBUTE_UNUSED;
+     const char *file ATTRIBUTE_UNUSED;
 {
   char label[MAX_ARTIFICIAL_LABEL_BYTES];
 
@@ -5869,7 +5870,9 @@ dwarfout_end_function (line)
    has been generated. */
 
 static void
-dwarfout_end_epilogue ()
+dwarfout_end_epilogue (line, file)
+     unsigned int line ATTRIBUTE_UNUSED;
+     const char *file ATTRIBUTE_UNUSED;
 {
   char label[MAX_ARTIFICIAL_LABEL_BYTES];
 
index 1b009c6752eb6220c5c29a9e7c3d833f6e3d3899..3ce6a13becf15d9d533517a8085c17c1563846f2 100644 (file)
@@ -1681,12 +1681,6 @@ final_start_function (first, file, optimize)
   /* First output the function prologue: code to set up the stack frame.  */
   (*targetm.asm_out.function_prologue) (file, get_frame_size ());
 
-#ifdef VMS_DEBUGGING_INFO
-  /* Output label after the prologue of the function.  */
-  if (write_symbols == VMS_DEBUG || write_symbols == VMS_AND_DWARF2_DEBUG)
-    vmsdbgout_after_prologue ();
-#endif
-
   /* If the machine represents the prologue as RTL, the profiling code must
      be emitted when NOTE_INSN_PROLOGUE_END is scanned.  */
 #ifdef HAVE_prologue
@@ -1797,12 +1791,12 @@ final_end_function ()
   (*targetm.asm_out.function_epilogue) (asm_out_file, get_frame_size ());
 
   /* And debug output.  */
-  (*debug_hooks->end_epilogue) ();
+  (*debug_hooks->end_epilogue) (last_linenum, last_filename);
 
 #if defined (DWARF2_UNWIND_INFO)
   if (write_symbols != DWARF2_DEBUG && write_symbols != VMS_AND_DWARF2_DEBUG
       && dwarf2out_do_frame ())
-    dwarf2out_end_epilogue ();
+    dwarf2out_end_epilogue (last_linenum, last_filename);
 #endif
 }
 \f
@@ -2061,7 +2055,7 @@ final_scan_insn (insn, file, optimize, prescan, nopeepholes)
 
        case NOTE_INSN_FUNCTION_BEG:
          app_disable ();
-         (*debug_hooks->end_prologue) (last_linenum);
+         (*debug_hooks->end_prologue) (last_linenum, last_filename);
          break;
 
        case NOTE_INSN_BLOCK_BEG:
index aa928de13419cf4bfe63e8270e0a41d1cccf4d9c..9effe7851108a39abce04a3e2508e46cf03414d1 100644 (file)
@@ -102,12 +102,12 @@ static void sdbout_end_source_file        PARAMS ((unsigned int));
 static void sdbout_begin_block         PARAMS ((unsigned int, unsigned int));
 static void sdbout_end_block           PARAMS ((unsigned int, unsigned int));
 static void sdbout_source_line         PARAMS ((unsigned int, const char *));
-static void sdbout_end_epilogue                PARAMS ((void));
+static void sdbout_end_epilogue                PARAMS ((unsigned int, const char *));
 static void sdbout_global_decl         PARAMS ((tree));
 #ifndef MIPS_DEBUGGING_INFO
 static void sdbout_begin_prologue      PARAMS ((unsigned int, const char *));
 #endif
-static void sdbout_end_prologue                PARAMS ((unsigned int));
+static void sdbout_end_prologue                PARAMS ((unsigned int, const char *));
 static void sdbout_begin_function      PARAMS ((tree));
 static void sdbout_end_function                PARAMS ((unsigned int));
 static void sdbout_toplevel_data       PARAMS ((tree));
@@ -321,7 +321,7 @@ const struct gcc_debug_hooks sdb_debug_hooks =
   sdbout_end_prologue,         /* end_prologue */
 #else
   sdbout_begin_prologue,       /* begin_prologue */
-  debug_nothing_int,           /* end_prologue */
+  debug_nothing_int_charstar,  /* end_prologue */
 #endif
   sdbout_end_epilogue,         /* end_epilogue */
   sdbout_begin_function,       /* begin_function */
@@ -1642,13 +1642,14 @@ sdbout_begin_prologue (line, file)
      unsigned int line;
      const char *file ATTRIBUTE_UNUSED;
 {
-  sdbout_end_prologue (line);
+  sdbout_end_prologue (line, file);
 }
 #endif
 
 static void
-sdbout_end_prologue (line)
+sdbout_end_prologue (line, file)
      unsigned int line;
+     const char *file ATTRIBUTE_UNUSED;
 {
   sdb_begin_function_line = line - 1;
   PUT_SDB_FUNCTION_START (line);
@@ -1678,7 +1679,9 @@ sdbout_end_function (line)
    Called after the epilogue is output.  */
 
 static void
-sdbout_end_epilogue ()
+sdbout_end_epilogue (line, file)
+     unsigned int line ATTRIBUTE_UNUSED;
+     const char *file ATTRIBUTE_UNUSED;
 {
   const char *const name ATTRIBUTE_UNUSED
     = IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (current_function_decl));
index c4f2fe67c038453832ec49d379d31a0de22a21e2..6f322c0885883528b5f9892df3c25cacb4a34e55 100644 (file)
@@ -156,7 +156,9 @@ static void vmsdbgout_end_block             PARAMS ((unsigned int, unsigned int));
 static bool vmsdbgout_ignore_block     PARAMS ((tree));
 static void vmsdbgout_source_line      PARAMS ((unsigned int, const char *));
 static void vmsdbgout_begin_prologue   PARAMS ((unsigned int, const char *));
-static void vmsdbgout_end_epilogue     PARAMS ((void));
+static void vmsdbgout_end_prologue     PARAMS ((unsigned int, const char *));
+static void vmsdbgout_end_function     PARAMS ((unsigned int));
+static void vmsdbgout_end_epilogue     PARAMS ((unsigned int, const char *));
 static void vmsdbgout_begin_function   PARAMS ((tree));
 static void vmsdbgout_decl             PARAMS ((tree));
 static void vmsdbgout_global_decl      PARAMS ((tree));
@@ -176,10 +178,10 @@ const struct gcc_debug_hooks vmsdbg_debug_hooks
    vmsdbgout_ignore_block,
    vmsdbgout_source_line,
    vmsdbgout_begin_prologue,
-   debug_nothing_int,          /* end_prologue */
-   vmsdbgout_end_epilogue,     /* end_epilogue */
-   vmsdbgout_begin_function,   /* begin_function */
-   debug_nothing_int,          /* end_function */
+   vmsdbgout_end_prologue,
+   vmsdbgout_end_epilogue,
+   vmsdbgout_begin_function,
+   vmsdbgout_end_function,
    vmsdbgout_decl,
    vmsdbgout_global_decl,
    debug_nothing_tree,         /* deferred_inline_function */
@@ -984,8 +986,8 @@ write_pclines (dosizeonly)
   totsize += write_debug_data1 (pcline.dst_b_pcline_command,
                                "line_num (SET LINUM LONG)", dosizeonly);
 
-  sprintf (buff, "line_num (%d)", ln - 1);
-  totsize += write_debug_data4 (ln - 1, buff, dosizeonly);
+  sprintf (buff, "line_num (%d)", ln ? ln - 1 : 0);
+  totsize += write_debug_data4 (ln ? ln - 1 : 0, buff, dosizeonly);
 
   lastln = ln;
   strcpy (lastlabel, TEXT_SECTION_ASM_OP);
@@ -1184,62 +1186,66 @@ write_srccorr (fileid, file_info_entry, dosizeonly)
   src_header.dst_a_source_corr_header.dst__header_type.dst_w_type
     = DST_K_SOURCE;
 
-  totsize += write_debug_header (&src_header.dst_a_source_corr_header,
-                                "source corr", dosizeonly);
-
-  totsize += write_debug_data1 (src_command_sf.dst_b_src_command,
-                               "source_corr (src setfile)", dosizeonly);
-
-  totsize += write_debug_data2
-    (src_command_sf.dst_a_src_cmd_fields.dst_w_src_unsword,
-     "source_corr (fileid)", dosizeonly);
-
-  totsize += write_debug_data1 (src_command_sr.dst_b_src_command,
-                               "source_corr (setrec)", dosizeonly);
-
-  totsize += write_debug_data2
-    (src_command_sr.dst_a_src_cmd_fields.dst_w_src_unsword,
-     "source_corr (recnum)", dosizeonly);
-
-  totsize += write_debug_data1 (src_command_sl.dst_b_src_command,
-                               "source_corr (setlnum)", dosizeonly);
+  if (src_command_dl.dst_a_src_cmd_fields.dst_w_src_unsword)
+    {
+      totsize += write_debug_header (&src_header.dst_a_source_corr_header,
+                                    "source corr", dosizeonly);
 
-  totsize += write_debug_data4
-    (src_command_sl.dst_a_src_cmd_fields.dst_l_src_unslong,
-     "source_corr (linenum)", dosizeonly);
+      totsize += write_debug_data1 (src_command_sf.dst_b_src_command,
+                                   "source_corr (src setfile)", dosizeonly);
 
-  totsize += write_debug_data1 (src_command_dl.dst_b_src_command,
-                               "source_corr (deflines)", dosizeonly);
+      totsize += write_debug_data2
+       (src_command_sf.dst_a_src_cmd_fields.dst_w_src_unsword,
+        "source_corr (fileid)", dosizeonly);
 
-  sprintf (buff, "source_corr (%d)",
-          src_command_dl.dst_a_src_cmd_fields.dst_w_src_unsword);
-  totsize += write_debug_data2
-    (src_command_dl.dst_a_src_cmd_fields.dst_w_src_unsword, buff, dosizeonly);
+      totsize += write_debug_data1 (src_command_sr.dst_b_src_command,
+                                   "source_corr (setrec)", dosizeonly);
 
-  while (linesleft > 0)
-    {
-      src_header.dst_a_source_corr_header.dst__header_length.dst_w_length
-       = DST_K_SOURCE_CORR_HEADER_SIZE + 3 - 1;
-      src_header.dst_a_source_corr_header.dst__header_type.dst_w_type
-       = DST_K_SOURCE;
-      src_command_dl.dst_b_src_command = DST_K_SRC_DEFLINES_W;
+      totsize += write_debug_data2
+       (src_command_sr.dst_a_src_cmd_fields.dst_w_src_unsword,
+        "source_corr (recnum)", dosizeonly);
 
-      if (linesleft > 65534)
-       linesleft = linesleft - 65534, linestodo = 65534;
-      else
-       linestodo = linesleft, linesleft = 0;
+      totsize += write_debug_data1 (src_command_sl.dst_b_src_command,
+                                   "source_corr (setlnum)", dosizeonly);
 
-      src_command_dl.dst_a_src_cmd_fields.dst_w_src_unsword = linestodo;
+      totsize += write_debug_data4
+       (src_command_sl.dst_a_src_cmd_fields.dst_l_src_unslong,
+        "source_corr (linenum)", dosizeonly);
 
-      totsize += write_debug_header (&src_header.dst_a_source_corr_header,
-                                    "source corr", dosizeonly);
       totsize += write_debug_data1 (src_command_dl.dst_b_src_command,
                                    "source_corr (deflines)", dosizeonly);
+
       sprintf (buff, "source_corr (%d)",
               src_command_dl.dst_a_src_cmd_fields.dst_w_src_unsword);
       totsize += write_debug_data2
        (src_command_dl.dst_a_src_cmd_fields.dst_w_src_unsword,
         buff, dosizeonly);
+
+      while (linesleft > 0)
+       {
+         src_header.dst_a_source_corr_header.dst__header_length.dst_w_length
+           = DST_K_SOURCE_CORR_HEADER_SIZE + 3 - 1;
+         src_header.dst_a_source_corr_header.dst__header_type.dst_w_type
+           = DST_K_SOURCE;
+         src_command_dl.dst_b_src_command = DST_K_SRC_DEFLINES_W;
+
+         if (linesleft > 65534)
+           linesleft = linesleft - 65534, linestodo = 65534;
+         else
+           linestodo = linesleft, linesleft = 0;
+
+         src_command_dl.dst_a_src_cmd_fields.dst_w_src_unsword = linestodo;
+
+         totsize += write_debug_header (&src_header.dst_a_source_corr_header,
+                                        "source corr", dosizeonly);
+         totsize += write_debug_data1 (src_command_dl.dst_b_src_command,
+                                       "source_corr (deflines)", dosizeonly);
+         sprintf (buff, "source_corr (%d)",
+                  src_command_dl.dst_a_src_cmd_fields.dst_w_src_unsword);
+         totsize += write_debug_data2
+           (src_command_dl.dst_a_src_cmd_fields.dst_w_src_unsword,
+            buff, dosizeonly);
+       }
     }
 
   return totsize;
@@ -1285,30 +1291,50 @@ vmsdbgout_begin_prologue (line, file)
 /* Output a marker (i.e. a label) for the beginning of a function, after
    the prologue.  */
 
-void
-vmsdbgout_after_prologue ()
+static void
+vmsdbgout_end_prologue (line, file)
+     unsigned int line;
+     const char *file;
 {
   char label[MAX_ARTIFICIAL_LABEL_BYTES];
 
+  if (write_symbols == VMS_AND_DWARF2_DEBUG)
+    (*dwarf2_debug_hooks.end_prologue) (line, file);
+
   if (debug_info_level > DINFO_LEVEL_TERSE)
     {
       ASM_GENERATE_INTERNAL_LABEL (label, FUNC_PROLOG_LABEL,
                                   current_function_funcdef_no);
       ASM_OUTPUT_LABEL (asm_out_file, label);
+
+      /* VMS PCA expects every PC range to correlate to some line and file */
+      vmsdbgout_source_line (line, file);
     }
 }
 
+/* No output for VMS debug, but make obligatory call to Dwarf2 debug */
+
+static void
+vmsdbgout_end_function (line)
+     unsigned int line;
+{
+  if (write_symbols == VMS_AND_DWARF2_DEBUG)
+    (*dwarf2_debug_hooks.end_function) (line);
+}
+
 /* 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.  */
 
 static void
-vmsdbgout_end_epilogue ()
+vmsdbgout_end_epilogue (line, file)
+     unsigned int line;
+     const char *file;
 {
   char label[MAX_ARTIFICIAL_LABEL_BYTES];
 
   if (write_symbols == VMS_AND_DWARF2_DEBUG)
-    (*dwarf2_debug_hooks.end_epilogue) ();
+    (*dwarf2_debug_hooks.end_epilogue) (line, file);
 
   if (debug_info_level > DINFO_LEVEL_NONE)
     {
@@ -1317,6 +1343,9 @@ vmsdbgout_end_epilogue ()
       ASM_GENERATE_INTERNAL_LABEL (label, FUNC_END_LABEL,
                                   current_function_funcdef_no);
       ASM_OUTPUT_LABEL (asm_out_file, label);
+
+      /* VMS PCA expects every PC range to correlate to some line and file */
+      vmsdbgout_source_line (line, file);
     }
 }
 
index e0265898a9ea6995715bcbe29bd85929c7dbda77..528bd7cf6c9806eb5029f7bfcf695ca96f25a05c 100644 (file)
@@ -476,7 +476,9 @@ xcoffout_end_function (last_linenum)
    Called after the epilogue is output.  */
 
 void
-xcoffout_end_epilogue ()
+xcoffout_end_epilogue (line, file)
+     unsigned int line ATTRIBUTE_UNUSED;
+     const char *file ATTRIBUTE_UNUSED;
 {
   /* We need to pass the correct function size to .function, otherwise,
      the xas assembler can't figure out the correct size for the function
index 74ddd98a5180494375eb0de84a7c47b3e833dc27..afa7274dcc2f4f42ca8cbc7d755e2f41309ddf10 100644 (file)
@@ -1,6 +1,6 @@
 /* XCOFF definitions.  These are needed in dbxout.c, final.c,
    and xcoffout.h.
-   Copyright (C) 1998, 2000 Free Software Foundation, Inc.
+   Copyright (C) 1998, 2000, 2002 Free Software Foundation, Inc.
 
 This file is part of GCC.
 
@@ -202,7 +202,8 @@ extern int stab_to_sclass                   PARAMS ((int));
 extern void xcoffout_begin_prologue            PARAMS ((unsigned int,
                                                         const char *));
 extern void xcoffout_begin_block               PARAMS ((unsigned, unsigned));
-extern void xcoffout_end_epilogue              PARAMS ((void));
+extern void xcoffout_end_epilogue              PARAMS ((unsigned int,
+                                                        const char *));
 extern void xcoffout_end_function              PARAMS ((unsigned int));
 extern void xcoffout_end_block                 PARAMS ((unsigned, unsigned));
 #endif /* BUFSIZ */