From a51d908e98573a9569a8cc2d14767ca4fb9e9777 Mon Sep 17 00:00:00 2001 From: Neil Booth Date: Tue, 10 Jul 2001 18:44:34 +0000 Subject: Makefile.in (toplev.o, [...]): Depend on debug.h, wrap long lines. * Makefile.in (toplev.o, sdbout.o, dbxout.o, dwarfout.o, dwarf2out.o): Depend on debug.h, wrap long lines. * dbxout.c: Include debug.h. (dbx_debug_hooks): New. (dbxout_init): Make static, take just 2 args. (dbxout_finish): Make static. * dbxout.h (dbxout_init, dbxout_finish): Delete. * debug.c: New file. * debug.h: New file. * dwarf2out.c: Include debug.h. (dwarf2_debug_hooks): New. (dwarf2out_init): Make static. (dwarf2out_finish): Make static, take 2 args. * dwarf2out.h (dwarf2out_init, dwarf2out_finish): Delete. * dwarfout.c: Include debug.h. (dwarf_debug_hooks): New. (dwarfout_init): Make static. (dwarfout_finish): Make static, take 2 args. * dwarfout.h (dwarfout_init, dwarfout_finish): Delete. * sdbout.c: Include debug.h. (sdb_debug_hooks): New. (sdbout_init): Make static, take 2 args. * sdbout.h (sdbout_init): Delete. * toplev.c: Include debug.h. (debug_hooks): New. (compile_file): Set deubg_hooks based on command line options. Use the hooks unconditionally rather than conditional compilation. From-SVN: r43908 --- gcc/dwarf2out.c | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) (limited to 'gcc/dwarf2out.c') diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index a20e5cb..cbae8a9 100644 --- a/gcc/dwarf2out.c +++ b/gcc/dwarf2out.c @@ -57,6 +57,7 @@ Boston, MA 02111-1307, USA. */ #include "md5.h" #include "tm_p.h" #include "diagnostic.h" +#include "debug.h" /* DWARF2 Abbreviation Glossary: CFA = Canonical Frame Address @@ -231,6 +232,8 @@ static unsigned current_funcdef_fde; /* Forward declarations for functions defined in this file. */ +static void dwarf2out_init PARAMS ((FILE *, const char *)); +static void dwarf2out_finish PARAMS ((FILE *, const char *)); static char *stripattributes PARAMS ((const char *)); static const char *dwarf_cfi_name PARAMS ((unsigned)); static dw_cfi_ref new_cfi PARAMS ((void)); @@ -360,7 +363,15 @@ expand_builtin_dwarf_fp_regnum () #ifndef INCOMING_FRAME_SP_OFFSET #define INCOMING_FRAME_SP_OFFSET 0 #endif + +/* The target debug structure. */ +struct gcc_debug_hooks dwarf2_debug_hooks = +{ + dwarf2out_init, + dwarf2out_finish +}; + /* Return a pointer to a copy of the section string name S with all attributes stripped off, and an asterisk prepended (for assemble_name). */ @@ -11355,7 +11366,7 @@ dwarf2out_undef (lineno, buffer) /* Set up for Dwarf output at the start of compilation. */ -void +static void dwarf2out_init (asm_out_file, main_input_filename) register FILE *asm_out_file; register const char *main_input_filename; @@ -11445,8 +11456,10 @@ dwarf2out_init (asm_out_file, main_input_filename) /* Output stuff that dwarf requires at the end of every file, and generate the DWARF-2 debugging info. */ -void -dwarf2out_finish () +static void +dwarf2out_finish (asm_out_file, input_filename) + register FILE *asm_out_file; + register const char *input_filename ATTRIBUTE_UNUSED; { limbo_die_node *node, *next_node; dw_die_ref die = 0; -- cgit v1.1