]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Makefile.in (emit-rtl.o, c-decl.o): Depend on debug.h.
authorNeil Booth <neil@daikokuya.demon.co.uk>
Thu, 19 Jul 2001 21:17:09 +0000 (21:17 +0000)
committerNeil Booth <neil@gcc.gnu.org>
Thu, 19 Jul 2001 21:17:09 +0000 (21:17 +0000)
* Makefile.in (emit-rtl.o, c-decl.o): Depend on debug.h.
(final.o): Don't depend on xcoffout.h, dbxout.h or sdbout.h.
(toplev.o): Don't depend on xcoffout.h.
* c-decl.c: Include debug.h
(duplicate_decls): Use debug hook.
* dbxout.c (dbxout_source_file, dbxout_args): Make static.
(dbx_debug_hooks, xcoff_debug_hooks): Update.
(dbxout_types): Remove.
* dbxout.h (dbxout_source_file, dbxout_types, dbxout_args): Remove.
* debug.c (do_nothing_debug_hooks): Update.
(debug_true_tree, debug_nothing_rtx): New.
* debug.h (struct rtx_def): New.
(struct gcc_debug_hooks): New hooks ignore_block,
outlining_inline_function and label.
(debug_true_tree, debug_nothing_rtx, dwarf2out_frame_init,
dwarf2out_frame_finish): New.
* dwarf2out.c (dwarf2out_ignore_block, dwarf2out_abstract_function):
Make static, update prototype.
(dwarf2_debug_hooks): Update.
* dwarf2out.h (dwarf2out_ignore_block, dwarf2out_abstract_function,
dwarf2out_frame_init, dwarf2out_frame_finish): Remove.
* dwarfout.c (dwarf_debug_hooks): Update.
* emit-rtl.c: Include debug.h.
(remove_unnecessary_notes): Use debug hook.
* final.c: Don't include dbxout.h, xcoffout.h or sdbout.h.
(final_scan_insn): Use debug hook.
* integrate.c (output_inline_function): Use debug hook.
* sdbout.c (sdbout_toplevel_data, sdbout_label): Make static.
(sdb_debug_hooks): Update.
* sdbout.h (sdbout_label, sdbout_toplevel_data): Remove.
* toplev.c: Don't include xcoffout.h.
(note_outlining_of_inline_function, debug_ignore_block): Remove.
* toplev.h (note_outlining_of_inline_function, debug_ignore_block):
Remove.
* tree.h (dwarf2out_do_frame): Remove.

From-SVN: r44163

18 files changed:
gcc/ChangeLog
gcc/Makefile.in
gcc/c-decl.c
gcc/dbxout.c
gcc/dbxout.h
gcc/debug.c
gcc/debug.h
gcc/dwarf2out.c
gcc/dwarf2out.h
gcc/dwarfout.c
gcc/emit-rtl.c
gcc/final.c
gcc/integrate.c
gcc/sdbout.c
gcc/sdbout.h
gcc/toplev.c
gcc/toplev.h
gcc/tree.h

index 63a57774b5e4124b4b91c43ddd77bf5307f55060..9d7ab64223b89cb3701e12a605911e51947ed89e 100644 (file)
@@ -1,3 +1,41 @@
+2001-07-19  Neil Booth  <neil@daikokuya.demon.co.uk>
+
+       * Makefile.in (emit-rtl.o, c-decl.o): Depend on debug.h.
+       (final.o): Don't depend on xcoffout.h, dbxout.h or sdbout.h.
+       (toplev.o): Don't depend on xcoffout.h.
+       * c-decl.c: Include debug.h
+       (duplicate_decls): Use debug hook.
+       * dbxout.c (dbxout_source_file, dbxout_args): Make static.
+       (dbx_debug_hooks, xcoff_debug_hooks): Update.
+       (dbxout_types): Remove.
+       * dbxout.h (dbxout_source_file, dbxout_types, dbxout_args): Remove.
+       * debug.c (do_nothing_debug_hooks): Update.
+       (debug_true_tree, debug_nothing_rtx): New.
+       * debug.h (struct rtx_def): New.
+       (struct gcc_debug_hooks): New hooks ignore_block,
+       outlining_inline_function and label.
+       (debug_true_tree, debug_nothing_rtx, dwarf2out_frame_init,
+       dwarf2out_frame_finish): New.
+       * dwarf2out.c (dwarf2out_ignore_block, dwarf2out_abstract_function):
+       Make static, update prototype.
+       (dwarf2_debug_hooks): Update.
+       * dwarf2out.h (dwarf2out_ignore_block, dwarf2out_abstract_function,
+       dwarf2out_frame_init, dwarf2out_frame_finish): Remove.
+       * dwarfout.c (dwarf_debug_hooks): Update.
+       * emit-rtl.c: Include debug.h.
+       (remove_unnecessary_notes): Use debug hook.
+       * final.c: Don't include dbxout.h, xcoffout.h or sdbout.h.
+       (final_scan_insn): Use debug hook.
+       * integrate.c (output_inline_function): Use debug hook.
+       * sdbout.c (sdbout_toplevel_data, sdbout_label): Make static.
+       (sdb_debug_hooks): Update.
+       * sdbout.h (sdbout_label, sdbout_toplevel_data): Remove.
+       * toplev.c: Don't include xcoffout.h.
+       (note_outlining_of_inline_function, debug_ignore_block): Remove.
+       * toplev.h (note_outlining_of_inline_function, debug_ignore_block):
+       Remove.
+       * tree.h (dwarf2out_do_frame): Remove.
+
 2001-07-19  Catherine Moore  <clm@cygnus.com>
 
         * config/v850/v850.h (ASM_OUTPUT_LABELREF): Restore. 
index 5b90382a58254554eee2f6076ba6bda37d7786c0..b6bb7c491e92d7e2b7d1b02eddba467ee7a84ee1 100644 (file)
@@ -1156,7 +1156,7 @@ $(srcdir)/c-parse.y: c-parse.in
 
 c-decl.o : c-decl.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) $(RTL_H) $(C_TREE_H) \
     $(GGC_H) $(TARGET_H) c-lex.h flags.h function.h output.h $(EXPR_H) \
-    toplev.h intl.h $(TM_P_H)
+    debug.h toplev.h intl.h $(TM_P_H)
 c-typeck.o : c-typeck.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) $(C_TREE_H) \
     $(TARGET_H) flags.h intl.h output.h $(EXPR_H) $(RTL_H) toplev.h $(TM_P_H)
 c-lang.o : c-lang.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) $(C_TREE_H) \
@@ -1339,7 +1339,7 @@ diagnostic.o : diagnostic.c diagnostic.h diagnostic.def \
    $(CONFIG_H) $(SYSTEM_H) $(TREE_H) $(RTL_H) $(TM_P_H) flags.h \
    $(GGC_H) input.h $(INSN_ATTR_H) insn-config.h toplev.h intl.h
 toplev.o : toplev.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) $(RTL_H) function.h \
-   flags.h input.h $(INSN_ATTR_H) xcoffout.h output.h diagnostic.h \
+   flags.h input.h $(INSN_ATTR_H) output.h diagnostic.h \
    debug.h insn-config.h intl.h $(RECOG_H) Makefile toplev.h \
    dwarf2out.h sdbout.h dbxout.h $(EXPR_H) hard-reg-set.h $(BASIC_BLOCK_H) \
    graph.h $(LOOP_H) except.h $(REGS_H) $(TIMEVAR_H) $(lang_options_files) \
@@ -1414,7 +1414,7 @@ xcoffout.o : xcoffout.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) $(RTL_H) xcoffout.h \
 emit-rtl.o : emit-rtl.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) $(TREE_H) flags.h \
    function.h $(REGS_H) insn-config.h $(RECOG_H) real.h $(GGC_H) \
    $(EXPR_H) $(srcdir)/../include/obstack.h hard-reg-set.h bitmap.h toplev.h \
-   $(HASHTAB_H) $(TM_P_H)
+   $(HASHTAB_H) $(TM_P_H) debug.h
 real.o : real.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) toplev.h $(TM_P_H)
 integrate.o : integrate.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) $(TREE_H) flags.h \
    debug.h $(INTEGRATE_H) insn-config.h $(EXPR_H) real.h $(REGS_H) \
@@ -1524,8 +1524,7 @@ sched-vis.o : sched-vis.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) sched-int.h \
 final.o : final.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) $(TREE_H) flags.h intl.h \
    $(REGS_H) $(RECOG_H) conditions.h insn-config.h $(INSN_ATTR_H) function.h \
    real.h output.h hard-reg-set.h except.h debug.h \
-   xcoffout.h toplev.h reload.h dwarf2out.h sdbout.h \
-   dbxout.h $(BASIC_BLOCK_H) $(TM_P_H) $(TARGET_H)
+   toplev.h reload.h dwarf2out.h $(BASIC_BLOCK_H) $(TM_P_H) $(TARGET_H)
 recog.o : recog.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) function.h $(BASIC_BLOCK_H) \
    $(REGS_H) $(RECOG_H) $(EXPR_H) hard-reg-set.h flags.h insn-config.h \
    $(INSN_ATTR_H) real.h toplev.h output.h reload.h $(TM_P_H)
index a9f6968b7ea9a6b9f1a02404aa79cdc3c7a0a2bf..25149f3e404e3106d153809dd4cc30393d5370cc 100644 (file)
@@ -42,6 +42,7 @@ Boston, MA 02111-1307, USA.  */
 #include "tm_p.h"
 #include "cpplib.h"
 #include "target.h"
+#include "debug.h"
 
 /* In grokdeclarator, distinguish syntactic contexts of declarators.  */
 enum decl_context
@@ -1960,7 +1961,7 @@ duplicate_decls (newdecl, olddecl, different_binding_level)
         been written out yet.  */
       if (new_is_definition && DECL_INITIAL (olddecl) && TREE_USED (olddecl))
        {
-         note_outlining_of_inline_function (olddecl);
+         (*debug_hooks->outlining_inline_function) (olddecl);
 
          /* The new defn must not be inline.  */
          DECL_INLINE (newdecl) = 0;
index ea05106fb02caec213a26ef0fb7ac92d9792e6bc..e7c2c546dcd6a9dbf916fab708c93b2db984dbda 100644 (file)
@@ -289,6 +289,7 @@ static void dbxout_finish           PARAMS ((const char *));
 static void dbxout_start_source_file   PARAMS ((unsigned, const char *));
 static void dbxout_end_source_file     PARAMS ((unsigned));
 static void dbxout_source_line         PARAMS ((unsigned int, const char *));
+static void dbxout_source_file         PARAMS ((FILE *, const char *));
 #if defined(ASM_OUTPUT_SECTION_NAME)
 static void dbxout_function_end                PARAMS ((void));
 #endif
@@ -297,6 +298,7 @@ static void dbxout_type_index               PARAMS ((tree));
 #if DBX_CONTIN_LENGTH > 0
 static void dbxout_continue            PARAMS ((void));
 #endif
+static void dbxout_args                        PARAMS ((tree));
 static void dbxout_type_fields         PARAMS ((tree));
 static void dbxout_type_method_1       PARAMS ((tree, const char *));
 static void dbxout_type_methods                PARAMS ((tree));
@@ -329,6 +331,7 @@ struct gcc_debug_hooks dbx_debug_hooks =
   dbxout_end_source_file,
   dbxout_begin_block,
   dbxout_end_block,
+  debug_true_tree,             /* ignore_block */
   dbxout_source_line,          /* source_line */
   dbxout_source_line,          /* begin_prologue: just output line info */
   debug_nothing_int,           /* end_prologue */
@@ -341,7 +344,9 @@ struct gcc_debug_hooks dbx_debug_hooks =
   debug_nothing_int,           /* end_function */
   dbxout_function_decl,
   debug_nothing_tree,          /* global_decl */
-  debug_nothing_tree           /* deferred_inline_function */
+  debug_nothing_tree,          /* deferred_inline_function */
+  debug_nothing_tree,          /* outlining_inline_function */
+  debug_nothing_rtx            /* label */
 };
 #endif /* DBX_DEBUGGING_INFO  */
 
@@ -356,6 +361,7 @@ struct gcc_debug_hooks xcoff_debug_hooks =
   dbxout_end_source_file,
   xcoffout_begin_block,
   xcoffout_end_block,
+  debug_true_tree,             /* ignore_block */
   xcoffout_source_line,
   xcoffout_begin_prologue,     /* begin_prologue */
   debug_nothing_int,           /* end_prologue */
@@ -364,7 +370,9 @@ struct gcc_debug_hooks xcoff_debug_hooks =
   xcoffout_end_function,
   debug_nothing_tree,          /* function_decl */
   debug_nothing_tree,          /* global_decl */
-  debug_nothing_tree           /* deferred_inline_function */
+  debug_nothing_tree,          /* deferred_inline_function */
+  debug_nothing_tree,          /* outlining_inline_function */
+  debug_nothing_rtx            /* label */
 };
 #endif /* XCOFF_DEBUGGING_INFO  */
 \f
@@ -547,7 +555,7 @@ dbxout_end_source_file (line)
 
 /* Output debugging info to FILE to switch to sourcefile FILENAME.  */
 
-void
+static void
 dbxout_source_file (file, filename)
      FILE *file;
      const char *filename;
@@ -2595,7 +2603,7 @@ dbxout_reg_parms (parms)
 /* Given a chain of ..._TYPE nodes (as come in a parameter list),
    output definitions of those names, in raw form */
 
-void
+static void
 dbxout_args (args)
      tree args;
 {
@@ -2608,24 +2616,6 @@ dbxout_args (args)
     }
 }
 \f
-/* Given a chain of ..._TYPE nodes,
-   find those which have typedef names and output those names.
-   This is to ensure those types get output.  */
-
-void
-dbxout_types (types)
-     register tree types;
-{
-  while (types)
-    {
-      if (TYPE_NAME (types)
-         && TREE_CODE (TYPE_NAME (types)) == TYPE_DECL
-         && ! TREE_ASM_WRITTEN (TYPE_NAME (types)))
-       dbxout_symbol (TYPE_NAME (types), 1);
-      types = TREE_CHAIN (types);
-    }
-}
-\f
 /* Output everything about a symbol block (a BLOCK node
    that represents a scope level),
    including recursive output of contained blocks.
index 988962dc54e41fc252ff77e8011528ba9399cdf5..333687f7e4e5082da82b0d1d0b59d61c679332c8 100644 (file)
@@ -18,9 +18,6 @@ along with GNU CC; see the file COPYING.  If not, write to
 the Free Software Foundation, 59 Temple Place - Suite 330,
 Boston, MA 02111-1307, USA.  */
 
-extern void dbxout_source_file         PARAMS ((FILE *, const char *));
-extern void dbxout_types               PARAMS ((tree));
-extern void dbxout_args                        PARAMS ((tree));
 extern int dbxout_symbol               PARAMS ((tree, int));
 extern void dbxout_parms               PARAMS ((tree));
 extern void dbxout_reg_parms           PARAMS ((tree));
index 4e525d5c4497e0a7c0d27e440e6090c25b4082d0..05811a94ffd18178fcf1d876fa19f598f59d7538 100644 (file)
@@ -28,8 +28,9 @@ struct gcc_debug_hooks do_nothing_debug_hooks =
   debug_nothing_int_charstar,
   debug_nothing_int_charstar,
   debug_nothing_int,
-  debug_nothing_int_int,
-  debug_nothing_int_int,
+  debug_nothing_int_int,       /* begin_block */
+  debug_nothing_int_int,       /* end_block */
+  debug_true_tree,             /* ignore_block */
   debug_nothing_int_charstar,  /* source_line */
   debug_nothing_int_charstar,  /* begin_prologue */
   debug_nothing_int,           /* end_prologue */
@@ -38,7 +39,9 @@ struct gcc_debug_hooks do_nothing_debug_hooks =
   debug_nothing_int,           /* end_function */
   debug_nothing_tree,          /* function_decl */
   debug_nothing_tree,          /* global_decl */
-  debug_nothing_tree           /* deferred_inline_function */
+  debug_nothing_tree,          /* deferred_inline_function */
+  debug_nothing_tree,          /* outlining_inline_function */
+  debug_nothing_rtx            /* label */
 };
 
 /* This file contains implementations of each debug hook that do
@@ -55,6 +58,19 @@ debug_nothing_tree (decl)
 {
 }
 
+bool
+debug_true_tree (block)
+     union tree_node *block ATTRIBUTE_UNUSED;
+{
+  return true;
+}
+
+void
+debug_nothing_rtx (insn)
+     struct rtx_def *insn ATTRIBUTE_UNUSED;
+{
+}
+
 void
 debug_nothing_charstar (main_filename)
      const char *main_filename ATTRIBUTE_UNUSED;
index 4a74bee83be982f667d2979eb6c36bef6962e93d..3626ed554e0b82c37fe2d245d21b0cca37f551ad 100644 (file)
@@ -19,6 +19,7 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 #define GCC_DEBUG_H
 
 union tree_node;
+struct rtx_def;
 
 /* This structure contains hooks for the debug information output
    functions, accessed through the global instance debug_hooks set in
@@ -53,6 +54,13 @@ struct gcc_debug_hooks
   /* Record the end of a block.  Arguments as for begin_block.  */
   void (* end_block) PARAMS ((unsigned int line, unsigned int n));
 
+  /* Returns nonzero if it is appropriate not to emit any debugging
+     information for BLOCK, because it doesn't contain any
+     instructions.  This may not be the case for blocks containing
+     nested functions, since we may actually call such a function even
+     though the BLOCK information is messed up.  Defaults to true.  */
+  bool (* ignore_block) PARAMS ((union tree_node *));
+
   /* Record a source file location at (FILE, LINE).  */
   void (* source_line) PARAMS ((unsigned int line, const char *file));
 
@@ -87,6 +95,15 @@ struct gcc_debug_hooks
   /* DECL is an inline function, whose body is present, but which is
      not being output at this point.  */
   void (* deferred_inline_function) PARAMS ((union tree_node *decl));
+
+  /* DECL is an inline function which is about to be emitted out of
+     line.  The hook is useful to, e.g., emit abstract debug info for
+     the inline before it gets mangled by optimization.  */
+  void (* outlining_inline_function) PARAMS ((union tree_node *decl));
+
+  /* Called from final_scan_insn for any CODE_LABEL insn whose
+     LABEL_NAME is non-null.  */
+  void (* label) PARAMS ((struct rtx_def *insn));
 };
 
 extern struct gcc_debug_hooks *debug_hooks;
@@ -104,6 +121,10 @@ extern void debug_nothing_int_int
   PARAMS ((unsigned int, unsigned int));
 extern void debug_nothing_tree
   PARAMS ((union tree_node *));
+extern bool debug_true_tree
+  PARAMS ((union tree_node *));
+extern void debug_nothing_rtx
+  PARAMS ((struct rtx_def *));
 
 /* Hooks for various debug formats.  */
 extern struct gcc_debug_hooks do_nothing_debug_hooks;
@@ -121,5 +142,13 @@ extern void dwarf2out_begin_prologue
   PARAMS ((unsigned int, const char * file));
 extern void dwarf2out_end_epilogue
   PARAMS ((void));
+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));
 
 #endif /* !GCC_DEBUG_H  */
index 99fa2208f69a83345036b8b3d8aa41046427f98b..13a7e57c81ee6d02c65693f2c2c571634fa7a95b 100644 (file)
@@ -3022,7 +3022,9 @@ static void dwarf2out_start_source_file   PARAMS ((unsigned, const char *));
 static void dwarf2out_end_source_file  PARAMS ((unsigned));
 static void dwarf2out_begin_block      PARAMS ((unsigned, unsigned));
 static void dwarf2out_end_block                PARAMS ((unsigned, unsigned));
+static bool dwarf2out_ignore_block     PARAMS ((tree));
 static void dwarf2out_global_decl      PARAMS ((tree));
+static void dwarf2out_abstract_function PARAMS ((tree));
 
 /* The debug hooks structure.  */
 
@@ -3036,6 +3038,7 @@ struct gcc_debug_hooks dwarf2_debug_hooks =
   dwarf2out_end_source_file,
   dwarf2out_begin_block,
   dwarf2out_end_block,
+  dwarf2out_ignore_block,
   dwarf2out_source_line,
   dwarf2out_begin_prologue,
   debug_nothing_int,           /* end_prologue */
@@ -3044,7 +3047,12 @@ struct gcc_debug_hooks dwarf2_debug_hooks =
   debug_nothing_int,           /* end_function */
   dwarf2out_decl,              /* function_decl */
   dwarf2out_global_decl,
-  debug_nothing_tree           /* deferred_inline_function */
+  debug_nothing_tree,          /* deferred_inline_function */
+  /* The DWARF 2 backend tries to reduce debugging bloat by not
+     emitting the abstract description of inline functions until
+     something tries to reference them.  */
+  dwarf2out_abstract_function, /* outlining_inline_function */
+  debug_nothing_rtx            /* label */
 };
 \f
 /* NOTE: In the comments in this file, many references are made to
@@ -9619,7 +9627,7 @@ gen_type_die_for_member (type, member, context_die)
    of a function which we may later generate inlined and/or
    out-of-line instances of.  */
 
-void
+static void
 dwarf2out_abstract_function (decl)
      tree decl;
 {
@@ -11176,7 +11184,7 @@ dwarf2out_end_block (line, blocknum)
    as we would end up with orphans, and in the presence of scheduling
    we may end up calling them anyway.  */
 
-int
+static bool
 dwarf2out_ignore_block (block)
      tree block;
 {
index 83056e5cece5974638f984c84429f4a9aae0500c..7c5ca308ccf2e3c9ffa0dbebcdce10625d313097 100644 (file)
@@ -18,17 +18,13 @@ along with GNU CC; see the file COPYING.  If not, write to
 the Free Software Foundation, 59 Temple Place - Suite 330,
 Boston, MA 02111-1307, USA.  */
 
-extern int dwarf2out_ignore_block      PARAMS ((tree));
 extern void dwarf2out_decl             PARAMS ((tree));        
-extern void dwarf2out_frame_init       PARAMS ((void));
 extern void dwarf2out_frame_debug      PARAMS ((rtx));
-extern void dwarf2out_frame_finish     PARAMS ((void));
 
 extern void debug_dwarf                        PARAMS ((void));
 struct die_struct;
 extern void debug_dwarf_die            PARAMS ((struct die_struct *));
 extern void dwarf2out_set_demangle_name_func PARAMS ((const char *(*) (const char *)));
-extern void dwarf2out_abstract_function PARAMS ((tree));
 extern void dwarf2out_add_library_unit_info PARAMS ((const char *, const char *));
 
 extern unsigned current_funcdef_number;
index 1d3644d3b1c988cacf56d925819684bfe0d80088..89e162e7ee05fe2cdcae36e5c33ece92293fd255 100644 (file)
@@ -1387,6 +1387,7 @@ struct gcc_debug_hooks dwarf_debug_hooks =
   dwarfout_end_source_file_check,
   dwarfout_begin_block,
   dwarfout_end_block,
+  debug_true_tree,             /* ignore_block */
   dwarfout_source_line,                /* source_line */
   dwarfout_source_line,                /* begin_prologue */
   dwarfout_end_prologue,
@@ -1395,7 +1396,9 @@ struct gcc_debug_hooks dwarf_debug_hooks =
   dwarfout_end_function,
   dwarfout_function_decl,
   dwarfout_global_decl,
-  dwarfout_deferred_inline_function
+  dwarfout_deferred_inline_function,
+  debug_nothing_tree,          /* outlining_inline_function */
+  debug_nothing_rtx            /* label */
 };
 \f
 /************************ general utility functions **************************/
index 7518614c5bbcdf1ad31f4e1dc6b556377f067787..58e264f0ba3aa54f858ce8e30d7278e1f4b05f0c 100644 (file)
@@ -54,6 +54,7 @@ Boston, MA 02111-1307, USA.  */
 #include "bitmap.h"
 #include "basic-block.h"
 #include "ggc.h"
+#include "debug.h"
 
 /* Commonly used modes.  */
 
@@ -3003,9 +3004,13 @@ remove_unnecessary_notes ()
 
              if (NOTE_LINE_NUMBER (tmp) == NOTE_INSN_BLOCK_BEG)
                {
-                 /* We just verified that this BLOCK matches us
-                    with the block_stack check above.  */
-                 if (debug_ignore_block (NOTE_BLOCK (insn)))
+                 /* We just verified that this BLOCK matches us with
+                    the block_stack check above.  Never delete the
+                    BLOCK for the outermost scope of the function; we
+                    can refer to names from that scope even if the
+                    block notes are messed up.  */
+                 if (! is_body_block (NOTE_BLOCK (insn))
+                     && (*debug_hooks->ignore_block) (NOTE_BLOCK (insn)))
                    {
                      remove_insn (tmp);
                      remove_insn (insn);
index b4d25f268c19f0b650df161d5deb3c994747776e..55a7c7dcf221a4efbb44036df304304c79a1a0d7 100644 (file)
@@ -68,22 +68,10 @@ Boston, MA 02111-1307, USA.  */
 #include "target.h"
 #include "debug.h"
 
-#if defined (DBX_DEBUGGING_INFO) || defined (XCOFF_DEBUGGING_INFO)
-#include "dbxout.h"
-#endif /* DBX_DEBUGGING_INFO || XCOFF_DEBUGGING_INFO */
-
-#ifdef XCOFF_DEBUGGING_INFO
-#include "xcoffout.h"
-#endif
-
 #if defined (DWARF2_UNWIND_INFO) || defined (DWARF2_DEBUGGING_INFO)
 #include "dwarf2out.h"
 #endif
 
-#ifdef SDB_DEBUGGING_INFO
-#include "sdbout.h"
-#endif
-
 /* If we aren't using cc0, CC_STATUS_INIT shouldn't exist.  So define a
    null default for it to save conditionalization later.  */
 #ifndef CC_STATUS_INIT
@@ -2218,10 +2206,9 @@ final_scan_insn (insn, file, optimize, prescan, nopeepholes)
       FINAL_PRESCAN_INSN (insn, NULL, 0);
 #endif
 
-#ifdef SDB_DEBUGGING_INFO
-      if (write_symbols == SDB_DEBUG && LABEL_NAME (insn))
-       sdbout_label (insn);
-#endif
+      if (LABEL_NAME (insn))
+       (*debug_hooks->label) (insn);
+
       if (app_on)
        {
          fputs (ASM_APP_OFF, file);
index b0c5ab6f02dbd24ea91e9042f701d3c15709ec4c..cfab58a6f6e40191dcebbfb0e2cbf4d9b03c141a 100644 (file)
@@ -2889,7 +2889,7 @@ output_inline_function (fndecl)
 
   /* Do any preparation, such as emitting abstract debug info for the inline
      before it gets mangled by optimization.  */
-  note_outlining_of_inline_function (fndecl);
+  (*debug_hooks->outlining_inline_function) (fndecl);
 
   /* Compile this function all the way down to assembly code.  */
   rest_of_compilation (fndecl);
index 4dc4a65c08d911e04d39f1fd18bbc1b4c4335d22..accd9edb25976e44d6ee1415198ba10c179981fe 100644 (file)
@@ -106,6 +106,8 @@ static void sdbout_begin_prologue   PARAMS ((unsigned int, const char *));
 static void sdbout_end_prologue                PARAMS ((unsigned int));
 static void sdbout_begin_function      PARAMS ((tree));
 static void sdbout_end_function                PARAMS ((unsigned int));
+static void sdbout_toplevel_data       PARAMS ((tree));
+static void sdbout_label               PARAMS ((rtx));
 static char *gen_fake_label            PARAMS ((void));
 static int plain_type                  PARAMS ((tree));
 static int template_name_p             PARAMS ((tree));
@@ -304,6 +306,7 @@ struct gcc_debug_hooks sdb_debug_hooks =
   sdbout_end_source_file,
   sdbout_begin_block,
   sdbout_end_block,
+  debug_true_tree,             /* ignore_block */
   sdbout_source_line,
 #ifdef MIPS_DEBUGGING_INFO
   /* Defer on MIPS systems so that parameter descriptions follow
@@ -319,7 +322,9 @@ struct gcc_debug_hooks sdb_debug_hooks =
   sdbout_end_function,
   debug_nothing_tree,          /* function_decl */
   sdbout_global_decl,
-  debug_nothing_tree           /* deferred_inline_function */
+  debug_nothing_tree,          /* deferred_inline_function */
+  debug_nothing_tree,          /* outlining_inline_function */
+  sdbout_label
 };
 \f
 #if 0
@@ -947,7 +952,7 @@ sdbout_symbol (decl, local)
 /* Output SDB information for a top-level initialized variable
    that has been delayed.  */
 
-void
+static void
 sdbout_toplevel_data (decl)
      tree decl;
 {
@@ -1657,7 +1662,7 @@ sdbout_end_epilogue ()
 /* Output sdb info for the given label.  Called only if LABEL_NAME (insn)
    is present.  */
 
-void
+static void
 sdbout_label (insn)
      register rtx insn;
 {
index 51317d6cee74e51b13d7fb21c625f570df127a95..28ba6b229bc46402c6ad64b0e0bb0a42715524e2 100644 (file)
@@ -18,7 +18,5 @@ along with GNU CC; see the file COPYING.  If not, write to
 the Free Software Foundation, 59 Temple Place - Suite 330,
 Boston, MA 02111-1307, USA.  */
 
-extern void sdbout_label               PARAMS ((rtx));
 extern void sdbout_symbol              PARAMS ((tree, int));
-extern void sdbout_toplevel_data       PARAMS ((tree));
 extern void sdbout_types               PARAMS ((tree));
index 0e510b94f50371bc5e6cd918b74a6f236b331ac0..d2adc92f246c2247faa78b18a4fb355f752ba37b 100644 (file)
@@ -79,10 +79,6 @@ Boston, MA 02111-1307, USA.  */
 #ifdef SDB_DEBUGGING_INFO
 #include "sdbout.h"
 #endif
-
-#ifdef XCOFF_DEBUGGING_INFO
-#include "xcoffout.h"
-#endif
 \f
 #ifdef VMS
 /* The extra parameters substantially improve the I/O performance.  */
@@ -2590,24 +2586,6 @@ rest_of_type_compilation (type, toplev)
   timevar_pop (TV_SYMOUT);
 }
 
-/* FNDECL is an inline function which is about to be emitted out of line.
-   Do any preparation, such as emitting abstract debug info for the inline
-   before it gets mangled by optimization.  */
-
-void
-note_outlining_of_inline_function (fndecl)
-     tree fndecl ATTRIBUTE_UNUSED;
-{
-#ifdef DWARF2_DEBUGGING_INFO
-  /* The DWARF 2 backend tries to reduce debugging bloat by not emitting
-     the abstract description of inline functions until something tries to
-     reference them.  Force it out now, before optimizations mangle the
-     block tree.  */
-  if (write_symbols == DWARF2_DEBUG)
-    dwarf2out_abstract_function (fndecl);
-#endif
-}
-
 /* This is called from finish_function (within yyparse)
    after each top-level definition is parsed.
    It is supposed to compile that function or variable
@@ -5089,27 +5067,3 @@ print_switch_values (file, pos, max, indent, sep, term)
 
   fprintf (file, "%s", term);
 }
-
-/* Returns nonzero if it is appropriate not to emit any debugging
-   information for BLOCK, because it doesn't contain any instructions.
-   This may not be the case for blocks containing nested functions, since
-   we may actually call such a function even though the BLOCK information
-   is messed up.  */
-
-int
-debug_ignore_block (block)
-     tree block ATTRIBUTE_UNUSED;
-{
-  /* Never delete the BLOCK for the outermost scope
-     of the function; we can refer to names from
-     that scope even if the block notes are messed up.  */
-  if (is_body_block (block))
-    return 0;
-
-#ifdef DWARF2_DEBUGGING_INFO
-  if (write_symbols == DWARF2_DEBUG)
-    return dwarf2out_ignore_block (block);
-#endif
-
-  return 1;
-}
index 99af4b1eac6113f6deb7e860e4ba851ca5b28613..2892dc4cab05c246ec865cae5e1116e8c166e516 100644 (file)
@@ -37,7 +37,6 @@ extern int read_integral_parameter    PARAMS ((const char *, const char *,
 extern int count_error                 PARAMS ((int));
 extern void strip_off_ending           PARAMS ((char *, int));
 extern void print_time                 PARAMS ((const char *, long));
-extern int debug_ignore_block          PARAMS ((union tree_node *));
 extern const char *trim_filename       PARAMS ((const char *));
 extern void internal_error             PARAMS ((const char *, ...))
                                               ATTRIBUTE_PRINTF_1
@@ -123,8 +122,6 @@ extern void fnotice                 PARAMS ((FILE *, const char *, ...))
 
 extern int wrapup_global_declarations   PARAMS ((union tree_node **, int));
 extern void check_global_declarations   PARAMS ((union tree_node **, int));
-extern void note_outlining_of_inline_function
-                                       PARAMS ((union tree_node *));
 
 extern const char *progname;
 extern const char *dump_base_name;
index b1a95512574d76ab089941a0d2352423af1ec66e..c34b7ea0eddff538b9ebcfd978c5ad85a79827bf 100644 (file)
@@ -2885,11 +2885,6 @@ extern tree get_file_function_name PARAMS ((int));
 \f
 /* Interface of the DWARF2 unwind info support.  */
 
-/* Decide whether we want to emit frame unwind information for the current
-   translation unit.  */
-
-extern int dwarf2out_do_frame          PARAMS ((void));
-
 /* Generate a new label for the CFI info to refer to.  */
 
 extern char *dwarf2out_cfi_label       PARAMS ((void));