aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNeil Booth <neil@daikokuya.demon.co.uk>2001-07-19 21:17:09 +0000
committerNeil Booth <neil@gcc.gnu.org>2001-07-19 21:17:09 +0000
commite1772ac0583495ca8fbc949988dd51dbfc83b8fa (patch)
tree434ba7ff40dd5b0508e6609dc0b744e6680e3656
parent77f43519e73eaac473819ed22dd95e643f500907 (diff)
downloadgcc-e1772ac0583495ca8fbc949988dd51dbfc83b8fa.zip
gcc-e1772ac0583495ca8fbc949988dd51dbfc83b8fa.tar.gz
gcc-e1772ac0583495ca8fbc949988dd51dbfc83b8fa.tar.bz2
Makefile.in (emit-rtl.o, c-decl.o): Depend on debug.h.
* 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
-rw-r--r--gcc/ChangeLog38
-rw-r--r--gcc/Makefile.in9
-rw-r--r--gcc/c-decl.c3
-rw-r--r--gcc/dbxout.c34
-rw-r--r--gcc/dbxout.h3
-rw-r--r--gcc/debug.c22
-rw-r--r--gcc/debug.h29
-rw-r--r--gcc/dwarf2out.c14
-rw-r--r--gcc/dwarf2out.h4
-rw-r--r--gcc/dwarfout.c5
-rw-r--r--gcc/emit-rtl.c11
-rw-r--r--gcc/final.c19
-rw-r--r--gcc/integrate.c2
-rw-r--r--gcc/sdbout.c11
-rw-r--r--gcc/sdbout.h2
-rw-r--r--gcc/toplev.c46
-rw-r--r--gcc/toplev.h3
-rw-r--r--gcc/tree.h5
18 files changed, 139 insertions, 121 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 63a5777..9d7ab64 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -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.
diff --git a/gcc/Makefile.in b/gcc/Makefile.in
index 5b90382..b6bb7c4 100644
--- a/gcc/Makefile.in
+++ b/gcc/Makefile.in
@@ -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)
diff --git a/gcc/c-decl.c b/gcc/c-decl.c
index a9f6968..25149f3e4 100644
--- a/gcc/c-decl.c
+++ b/gcc/c-decl.c
@@ -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;
diff --git a/gcc/dbxout.c b/gcc/dbxout.c
index ea05106..e7c2c54 100644
--- a/gcc/dbxout.c
+++ b/gcc/dbxout.c
@@ -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 */
@@ -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)
}
}
-/* 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);
- }
-}
-
/* Output everything about a symbol block (a BLOCK node
that represents a scope level),
including recursive output of contained blocks.
diff --git a/gcc/dbxout.h b/gcc/dbxout.h
index 988962d..333687f 100644
--- a/gcc/dbxout.h
+++ b/gcc/dbxout.h
@@ -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));
diff --git a/gcc/debug.c b/gcc/debug.c
index 4e525d5..05811a9 100644
--- a/gcc/debug.c
+++ b/gcc/debug.c
@@ -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;
diff --git a/gcc/debug.h b/gcc/debug.h
index 4a74bee..3626ed5 100644
--- a/gcc/debug.h
+++ b/gcc/debug.h
@@ -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 */
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c
index 99fa220..13a7e57 100644
--- a/gcc/dwarf2out.c
+++ b/gcc/dwarf2out.c
@@ -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 */
};
/* 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;
{
diff --git a/gcc/dwarf2out.h b/gcc/dwarf2out.h
index 83056e5..7c5ca30 100644
--- a/gcc/dwarf2out.h
+++ b/gcc/dwarf2out.h
@@ -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;
diff --git a/gcc/dwarfout.c b/gcc/dwarfout.c
index 1d3644d..89e162e 100644
--- a/gcc/dwarfout.c
+++ b/gcc/dwarfout.c
@@ -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 */
};
/************************ general utility functions **************************/
diff --git a/gcc/emit-rtl.c b/gcc/emit-rtl.c
index 7518614..58e264f 100644
--- a/gcc/emit-rtl.c
+++ b/gcc/emit-rtl.c
@@ -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);
diff --git a/gcc/final.c b/gcc/final.c
index b4d25f2..55a7c7d 100644
--- a/gcc/final.c
+++ b/gcc/final.c
@@ -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);
diff --git a/gcc/integrate.c b/gcc/integrate.c
index b0c5ab6..cfab58a 100644
--- a/gcc/integrate.c
+++ b/gcc/integrate.c
@@ -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);
diff --git a/gcc/sdbout.c b/gcc/sdbout.c
index 4dc4a65..accd9ed 100644
--- a/gcc/sdbout.c
+++ b/gcc/sdbout.c
@@ -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
};
#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;
{
diff --git a/gcc/sdbout.h b/gcc/sdbout.h
index 51317d6..28ba6b2 100644
--- a/gcc/sdbout.h
+++ b/gcc/sdbout.h
@@ -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));
diff --git a/gcc/toplev.c b/gcc/toplev.c
index 0e510b9..d2adc92 100644
--- a/gcc/toplev.c
+++ b/gcc/toplev.c
@@ -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
#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;
-}
diff --git a/gcc/toplev.h b/gcc/toplev.h
index 99af4b1..2892dc4 100644
--- a/gcc/toplev.h
+++ b/gcc/toplev.h
@@ -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;
diff --git a/gcc/tree.h b/gcc/tree.h
index b1a9551..c34b7ea 100644
--- a/gcc/tree.h
+++ b/gcc/tree.h
@@ -2885,11 +2885,6 @@ extern tree get_file_function_name PARAMS ((int));
/* 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));