* Makefile.in (c-lex.o): Wrap long lines. Depend on debug.h.
* c-lex.c (cb_file_change, cb_define, cb_undef): Use debug
hooks directly.
* dbxout.c (dbx_debug_hooks): Add new hooks.
(dbxout_start_new_source_file): Rename dbxout_start_source_file,
make static.
(dbxout_resume_previous_source_file): Rename dbxout_end_source_file,
make static.
* dbxout.h (dbxout_start_new_source_file,
dbxout_resume_previous_source_file): Delete.
* debug.c (do_nothing_debug_hooks): Add new hooks.
(debug_nothing_init_finish): Rename debug_nothing_file_charstar.
(debug_nothing_int_charstar, debug_nothing_int): New.
* debug.h (gcc_debug_hooks): New hooks define, undef,
start_source_file and end_source_file.
(debug_nothing_init_finish): Rename debug_nothing_file_charstar.
(debug_nothing_int_charstar, debug_nothing_int): New.
* dwarf2out.c (dwarf2_debug_hooks): Add new hooks.
(dwarf2out_start_source_file, dwarf2out_end_source_file,
dwarf2out_define, dwarf2out_undef): Make static.
* dwarf2out.h (dwarf2out_start_source_file, dwarf2out_end_source_file,
dwarf2out_define, dwarf2out_undef): Remove.
* dwarfout.c (dwarf_debug_hooks): Add new hooks.
(dwarfout_start_source_file, dwarfout_end_source_file,
dwarfout_define, dwarfout_undef): Make static.
(dwarfout_start_source_file_check,
dwarfout_end_source_file_check): New.
(dwarfout_define, dwarfout_finish): Update.
* dwarfout.h (dwarfout_start_new_source_file,
dwarfout_resume_previous_source_file, dwarfout_define,
dwarfout_undef): Remove.
* sdbout.c (sdb_debug_hooks): Add new hooks.
(sdbout_start_new_source_file): Rename sdbout_start_source_file,
make static.
(sdbout_resume_previous_source_file): Rename sdbout_end_source_file,
make static, take an arg.
* sdbout.h (sdbout_start_new_source_file,
sdbout_resume_previous_source_file): Delete.
* toplev.c (debug_start_source_file, debug_end_source_file,
debug_define, debug_undef): Delete.
* toplev.h (debug_start_source_file, debug_end_source_file,
debug_define, debug_undef): Delete.
* java/jcf-parse.c: Include debug.h.
(parse_class_file): Update to use debug hooks directly.
* java/Make-lang.in (jcf-parse.o): Depend on debug.h.
From-SVN: r43952
+2001-07-11 Neil Booth <neil@daikokuya.demon.co.uk>
+
+ * Makefile.in (c-lex.o): Wrap long lines. Depend on debug.h.
+ * c-lex.c (cb_file_change, cb_define, cb_undef): Use debug
+ hooks directly.
+ * dbxout.c (dbx_debug_hooks): Add new hooks.
+ (dbxout_start_new_source_file): Rename dbxout_start_source_file,
+ make static.
+ (dbxout_resume_previous_source_file): Rename dbxout_end_source_file,
+ make static.
+ * dbxout.h (dbxout_start_new_source_file,
+ dbxout_resume_previous_source_file): Delete.
+ * debug.c (do_nothing_debug_hooks): Add new hooks.
+ (debug_nothing_init_finish): Rename debug_nothing_file_charstar.
+ (debug_nothing_int_charstar, debug_nothing_int): New.
+ * debug.h (gcc_debug_hooks): New hooks define, undef,
+ start_source_file and end_source_file.
+ (debug_nothing_init_finish): Rename debug_nothing_file_charstar.
+ (debug_nothing_int_charstar, debug_nothing_int): New.
+ * dwarf2out.c (dwarf2_debug_hooks): Add new hooks. Move into
+ the conditionally compiled section.
+ (dwarf2out_start_source_file, dwarf2out_end_source_file,
+ dwarf2out_define, dwarf2out_undef): Make static.
+ * dwarf2out.h (dwarf2out_start_source_file, dwarf2out_end_source_file,
+ dwarf2out_define, dwarf2out_undef): Remove.
+ * dwarfout.c (dwarf_debug_hooks): Add new hooks.
+ (dwarfout_start_source_file, dwarfout_end_source_file,
+ dwarfout_define, dwarfout_undef): Make static.
+ (dwarfout_start_source_file_check,
+ dwarfout_end_source_file_check): New.
+ (dwarfout_define, dwarfout_finish): Update.
+ * dwarfout.h (dwarfout_start_new_source_file,
+ dwarfout_resume_previous_source_file, dwarfout_define,
+ dwarfout_undef): Remove.
+ * sdbout.c (sdb_debug_hooks): Add new hooks.
+ (sdbout_start_new_source_file): Rename sdbout_start_source_file,
+ make static.
+ (sdbout_resume_previous_source_file): Rename sdbout_end_source_file,
+ make static, take an arg.
+ * sdbout.h (sdbout_start_new_source_file,
+ sdbout_resume_previous_source_file): Delete.
+ * toplev.c (debug_start_source_file, debug_end_source_file,
+ debug_define, debug_undef): Delete.
+ * toplev.h (debug_start_source_file, debug_end_source_file,
+ debug_define, debug_undef): Delete.
+
+ * java/jcf-parse.c: Include debug.h.
+ (parse_class_file): Update to use debug hooks directly.
+ * java/Make-lang.in (jcf-parse.o): Depend on debug.h.
+
Wed Jul 11 10:07:18 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
* alias.c (set_mem_alias_set): New function.
c-lang.o : c-lang.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) $(C_TREE_H) \
$(GGC_H) c-lex.h toplev.h diagnostic.h output.h function.h \
$(RTL_H) $(EXPR_H)
-c-lex.o : c-lex.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) $(RTL_H) c-lex.h $(C_TREE_H) \
+c-lex.o : c-lex.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) $(RTL_H) c-lex.h \
+ debug.h $(C_TREE_H) \
c-pragma.h input.h intl.h flags.h toplev.h output.h \
mbchar.h cpplib.h $(EXPR_H) $(TM_P_H)
c-aux-info.o : c-aux-info.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) $(C_TREE_H) \
#include "intl.h"
#include "tm_p.h"
#include "splay-tree.h"
+#include "debug.h"
/* MULTIBYTE_CHARS support only works for native compilers.
??? Ideally what we want is to model widechar support after
lineno = fc->from.lineno;
push_srcloc (fc->to.filename, 1);
input_file_stack->indent_level = indent_level;
- debug_start_source_file (fc->from.lineno, fc->to.filename);
+ (*debug_hooks->start_source_file) (fc->from.lineno, fc->to.filename);
#ifndef NO_IMPLICIT_EXTERN_C
if (c_header_level)
++c_header_level;
}
#endif
pop_srcloc ();
- debug_end_source_file (input_file_stack->line);
+ (*debug_hooks->end_source_file) (input_file_stack->line);
}
else
error ("leaving more files than we entered");
cpp_reader *pfile;
cpp_hashnode *node;
{
- debug_define (cpp_get_line (parse_in)->line, (const char *) cpp_macro_definition (pfile, node));
+ (*debug_hooks->define) (cpp_get_line (pfile)->line,
+ (const char *) cpp_macro_definition (pfile, node));
}
/* #undef callback for DWARF and DWARF2 debug info. */
static void
cb_undef (pfile, node)
- cpp_reader *pfile ATTRIBUTE_UNUSED;
+ cpp_reader *pfile;
cpp_hashnode *node;
{
- debug_undef (cpp_get_line (parse_in)->line, (const char *) NODE_NAME (node));
+ (*debug_hooks->undef) (cpp_get_line (pfile)->line,
+ (const char *) NODE_NAME (node));
}
#if 0 /* not yet */
static void dbxout_init PARAMS ((FILE *, const char *));
static void dbxout_finish PARAMS ((FILE *, const char *));
+static void dbxout_start_source_file PARAMS ((unsigned, const char *));
+static void dbxout_end_source_file PARAMS ((unsigned));
#if defined(ASM_OUTPUT_SECTION_NAME)
static void dbxout_function_end PARAMS ((void));
#endif
static void dbxout_block PARAMS ((tree, int, tree));
static void dbxout_really_begin_function PARAMS ((tree));
\f
-/* The target debug structure. */
+/* The debug hooks structure. */
struct gcc_debug_hooks dbx_debug_hooks =
{
dbxout_init,
- dbxout_finish
+ dbxout_finish,
+ debug_nothing_int_charstar,
+ debug_nothing_int_charstar,
+ dbxout_start_source_file,
+ dbxout_end_source_file
};
\f
#if defined(ASM_OUTPUT_SECTION_NAME)
/* Change to reading from a new source file. Generate a N_BINCL stab. */
-void
-dbxout_start_new_source_file (filename)
+static void
+dbxout_start_source_file (line, filename)
+ unsigned int line ATTRIBUTE_UNUSED;
const char *filename ATTRIBUTE_UNUSED;
{
#ifdef DBX_USE_BINCL
/* Revert to reading a previous source file. Generate a N_EINCL stab. */
-void
-dbxout_resume_previous_source_file ()
+static void
+dbxout_end_source_file (line)
+ unsigned int line ATTRIBUTE_UNUSED;
{
#ifdef DBX_USE_BINCL
struct dbx_file *next;
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-extern void dbxout_start_new_source_file PARAMS ((const char *));
-extern void dbxout_resume_previous_source_file PARAMS ((void));
-
extern void dbxout_source_file PARAMS ((FILE *, const char *));
extern void dbxout_types PARAMS ((tree));
extern void dbxout_args PARAMS ((tree));
/* The do-nothing debug hooks. */
struct gcc_debug_hooks do_nothing_debug_hooks =
{
- debug_nothing_init_finish,
- debug_nothing_init_finish
+ debug_nothing_file_charstar,
+ debug_nothing_file_charstar,
+ debug_nothing_int_charstar,
+ debug_nothing_int_charstar,
+ debug_nothing_int_charstar,
+ debug_nothing_int
};
/* This file contains implementations of each debug hook that do
nothing. */
void
-debug_nothing_init_finish (file, main_filename)
+debug_nothing_file_charstar (file, main_filename)
FILE *file ATTRIBUTE_UNUSED;
const char *main_filename ATTRIBUTE_UNUSED;
{
}
+
+void
+debug_nothing_int_charstar (line, text)
+ unsigned int line ATTRIBUTE_UNUSED;
+ const char *text ATTRIBUTE_UNUSED;
+{
+}
+
+void
+debug_nothing_int (line)
+ unsigned int line ATTRIBUTE_UNUSED;
+{
+}
/* Output debug symbols to FILE. */
void (* finish) PARAMS ((FILE * file, const char *main_filename));
+
+ /* Macro defined on line LINE with name and expansion TEXT. */
+ void (* define) PARAMS ((unsigned int line, const char *text));
+
+ /* MACRO undefined on line LINE. */
+ void (* undef) PARAMS ((unsigned int line, const char *macro));
+
+ /* Record the beginning of a new source file FILE from LINE number
+ in the previous one. */
+ void (* start_source_file) PARAMS ((unsigned int line, const char *file));
+
+ /* Record the resumption of a source file. LINE is the line number
+ in the source file we are returning to. */
+ void (* end_source_file) PARAMS ((unsigned int line));
};
extern struct gcc_debug_hooks *debug_hooks;
/* The do-nothing hooks. */
-extern void debug_nothing_init_finish
+extern void debug_nothing_file_charstar
PARAMS ((FILE *, const char *));
+extern void debug_nothing_int_charstar
+ PARAMS ((unsigned int, const char *));
+extern void debug_nothing_int
+ PARAMS ((unsigned int));
+/* Hooks for various debug formats. */
extern struct gcc_debug_hooks do_nothing_debug_hooks;
extern struct gcc_debug_hooks dbx_debug_hooks;
extern struct gcc_debug_hooks sdb_debug_hooks;
/* 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));
#define INCOMING_FRAME_SP_OFFSET 0
#endif
\f
-/* The target debug structure. */
-
-struct gcc_debug_hooks dwarf2_debug_hooks
- = {dwarf2out_init, dwarf2out_finish
-};
-\f
/* Return a pointer to a copy of the section string name S with all
attributes stripped off, and an asterisk prepended (for assemble_name). */
/* And now, the support for symbolic debugging information. */
#ifdef DWARF2_DEBUGGING_INFO
+static void dwarf2out_init PARAMS ((FILE *, const char *));
+static void dwarf2out_finish PARAMS ((FILE *, const char *));
+static void dwarf2out_define PARAMS ((unsigned int, const char *));
+static void dwarf2out_undef PARAMS ((unsigned int, const char *));
+static void dwarf2out_start_source_file PARAMS ((unsigned, const char *));
+static void dwarf2out_end_source_file PARAMS ((unsigned));
+
+/* The debug hooks structure. */
+
+struct gcc_debug_hooks dwarf2_debug_hooks =
+{
+ dwarf2out_init,
+ dwarf2out_finish,
+ dwarf2out_define,
+ dwarf2out_undef,
+ dwarf2out_start_source_file,
+ dwarf2out_end_source_file
+};
+\f
/* NOTE: In the comments in this file, many references are made to
"Debugging Information Entries". This term is abbreviated as `DIE'
throughout the remainder of this file. */
/* Record the beginning of a new source file. */
-void
+static void
dwarf2out_start_source_file (lineno, filename)
- register unsigned int lineno ATTRIBUTE_UNUSED;
- register const char *filename ATTRIBUTE_UNUSED;
+ register unsigned int lineno;
+ register const char *filename;
{
if (flag_eliminate_dwarf2_dups)
{
/* Record the end of a source file. */
-void
-dwarf2out_end_source_file ()
+static void
+dwarf2out_end_source_file (lineno)
+ unsigned int lineno ATTRIBUTE_UNUSED;
{
if (flag_eliminate_dwarf2_dups)
{
the tail part of the directive line, i.e. the part which is past the
initial whitespace, #, whitespace, directive-name, whitespace part. */
-void
+static void
dwarf2out_define (lineno, buffer)
register unsigned lineno ATTRIBUTE_UNUSED;
register const char *buffer ATTRIBUTE_UNUSED;
the tail part of the directive line, i.e. the part which is past the
initial whitespace, #, whitespace, directive-name, whitespace part. */
-void
+static void
dwarf2out_undef (lineno, buffer)
register unsigned lineno ATTRIBUTE_UNUSED;
register const char *buffer ATTRIBUTE_UNUSED;
}
}
-#else /* DWARF2_DEBUGGING_INFO
-
-/* Use dummy versions of init and finish routines. */
-
-static void
-dwarf2out_init (asm_out_file, main_input_filename)
- register FILE *asm_out_file ATTRIBUTE_UNUSED;
- register const char *main_input_filename ATTRIBUTE_UNUSED;
-{
-}
-
-static void
-dwarf2out_finish (asm_out_file, input_filename)
- register FILE *asm_out_file ATTRIBUTE_UNUSED;
- register const char *input_filename ATTRIBUTE_UNUSED;
-{
-}
-
#endif /* DWARF2_DEBUGGING_INFO */
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-extern void dwarf2out_define PARAMS ((unsigned, const char *));
-extern void dwarf2out_undef PARAMS ((unsigned, const char *));
-extern void dwarf2out_start_source_file PARAMS ((unsigned, const char *));
-extern void dwarf2out_end_source_file PARAMS ((void));
-
extern void dwarf2out_begin_block PARAMS ((unsigned));
extern void dwarf2out_end_block PARAMS ((unsigned));
extern int dwarf2out_ignore_block PARAMS ((tree));
static void dwarfout_init PARAMS ((FILE *, const char *));
static void dwarfout_finish PARAMS ((FILE *, const char *));
+static void dwarfout_define PARAMS ((unsigned int, const char *));
+static void dwarfout_undef PARAMS ((unsigned int, const char *));
+static void dwarfout_start_source_file PARAMS ((unsigned, const char *));
+static void dwarfout_start_source_file_check PARAMS ((unsigned, const char *));
+static void dwarfout_end_source_file PARAMS ((unsigned));
+static void dwarfout_end_source_file_check PARAMS ((unsigned));
static const char *dwarf_tag_name PARAMS ((unsigned));
static const char *dwarf_attr_name PARAMS ((unsigned));
static const char *dwarf_stack_op_name PARAMS ((unsigned));
#endif
\f
-/* The target debug structure. */
+/* The debug hooks structure. */
struct gcc_debug_hooks dwarf_debug_hooks =
{
dwarfout_init,
- dwarfout_finish
+ dwarfout_finish,
+ dwarfout_define,
+ dwarfout_undef,
+ dwarfout_start_source_file_check,
+ dwarfout_end_source_file_check
};
\f
/************************ general utility functions **************************/
ASM_OUTPUT_POP_SECTION (asm_out_file);
}
-void
-dwarfout_start_new_source_file (filename)
+/* Wrapper for toplev.c callback to check debug info level. */
+static void
+dwarfout_start_source_file_check (line, filename)
+ unsigned int line;
+ register const char *filename;
+{
+ if (debug_info_level == DINFO_LEVEL_VERBOSE)
+ dwarfout_start_source_file (line, filename);
+}
+
+static void
+dwarfout_start_source_file (line, filename)
+ unsigned int line ATTRIBUTE_UNUSED;
register const char *filename;
{
char label[MAX_ARTIFICIAL_LABEL_BYTES];
generate_macinfo_entry (type_and_offset, "");
}
-void
-dwarfout_resume_previous_source_file (lineno)
+/* Wrapper for toplev.c callback to check debug info level. */
+static void
+dwarfout_end_source_file_check (lineno)
+ register unsigned lineno;
+{
+ if (debug_info_level == DINFO_LEVEL_VERBOSE)
+ dwarfout_end_source_file (lineno);
+}
+
+static void
+dwarfout_end_source_file (lineno)
register unsigned lineno;
{
char type_and_offset[MAX_ARTIFICIAL_LABEL_BYTES*2];
is past the initial whitespace, #, whitespace, directive-name,
whitespace part. */
-void
+static void
dwarfout_define (lineno, buffer)
register unsigned lineno;
register const char *buffer;
if (!initialized)
{
- dwarfout_start_new_source_file (primary_filename);
+ dwarfout_start_source_file (0, primary_filename);
initialized = 1;
}
sprintf (type_and_offset, "0x%08x+%u",
is past the initial whitespace, #, whitespace, directive-name,
whitespace part. */
-void
+static void
dwarfout_undef (lineno, buffer)
register unsigned lineno;
register const char *buffer;
{
/* Output terminating entries for the .debug_macinfo section. */
- dwarfout_resume_previous_source_file (0);
+ dwarfout_end_source_file (0);
fputc ('\n', asm_out_file);
ASM_OUTPUT_PUSH_SECTION (asm_out_file, DEBUG_MACINFO_SECTION);
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-extern void dwarfout_define PARAMS ((unsigned, const char *));
-extern void dwarfout_undef PARAMS ((unsigned, const char *));
extern void dwarfout_file_scope_decl PARAMS ((tree , int));
-extern void dwarfout_start_new_source_file PARAMS ((const char *));
-extern void dwarfout_resume_previous_source_file PARAMS ((unsigned));
extern void dwarfout_begin_function PARAMS ((void));
extern void dwarfout_end_function PARAMS ((void));
f/bld-op.def f/bit.h f/info.h f/info-b.def f/info-k.def f/info-w.def \
f/target.h f/lex.h f/type.h f/intrin.h f/intrin.def f/lab.h f/symbol.h \
f/symbol.def f/equiv.h f/storag.h f/global.h f/name.h f/src.h flags.h \
- input.h toplev.h output.h $(GGC_H)
+ debug.h input.h toplev.h output.h $(GGC_H)
f/malloc.o: f/malloc.c f/proj.h $(CONFIG_H) $(SYSTEM_H) f/malloc.h
f/name.o: f/name.c f/proj.h $(CONFIG_H) $(SYSTEM_H) f/bad.h f/bad.def f/where.h \
glimits.h f/top.h f/malloc.h f/name.h f/global.h f/info.h f/info-b.def \
#include "lex.h"
#include "malloc.h"
#include "src.h"
+#include "debug.h"
#if FFECOM_targetCURRENT == FFECOM_targetGCC
#include "flags.h"
#include "input.h"
#include "ggc.h"
#endif
-#ifdef DWARF_DEBUGGING_INFO
-#include "dwarfout.h"
-#endif
-
static void ffelex_append_to_token_ (char c);
static int ffelex_backslash_ (int c, ffewhereColumnNumber col);
static void ffelex_bad_1_ (ffebad errnum, ffewhereLineNumber ln0,
input_file_stack = p->next;
free (p);
input_file_stack_tick++;
-#ifdef DWARF_DEBUGGING_INFO
- if (debug_info_level == DINFO_LEVEL_VERBOSE
- && write_symbols == DWARF_DEBUG)
- dwarfout_resume_previous_source_file (input_file_stack->line);
-#endif /* DWARF_DEBUGGING_INFO */
+ if (write_symbols == DWARF_DEBUG)
+ (*debug_hooks->end_source_file) (input_file_stack->line);
}
else
error ("#-lines for entering and leaving files don't match");
p->name = input_filename;
input_file_stack = p;
input_file_stack_tick++;
-#ifdef DWARF_DEBUGGING_INFO
- if (debug_info_level == DINFO_LEVEL_VERBOSE
- && write_symbols == DWARF_DEBUG)
- dwarfout_start_new_source_file (input_filename);
-#endif /* DWARF_DEBUGGING_INFO */
+
+ if (write_symbols == DWARF_DEBUG)
+ (*debug_hooks->start_source_file) (0, input_filename);
/* Now that we've pushed or popped the input stack,
update the name in the top element. */
c = ffelex_get_directive_line_ (&text, finput);
-#ifdef DWARF_DEBUGGING_INFO
if ((debug_info_level == DINFO_LEVEL_VERBOSE)
&& (write_symbols == DWARF_DEBUG))
- dwarfout_define (lineno, text);
-#endif /* DWARF_DEBUGGING_INFO */
+ (*debug_hooks->define) (lineno, text);
goto skipline;
}
c = ffelex_get_directive_line_ (&text, finput);
-#ifdef DWARF_DEBUGGING_INFO
if ((debug_info_level == DINFO_LEVEL_VERBOSE)
&& (write_symbols == DWARF_DEBUG))
- dwarfout_undef (lineno, text);
-#endif /* DWARF_DEBUGGING_INFO */
+ (*debug_hooks->undef) (lineno, text);
goto skipline;
}
$(SYSTEM_H) $(GGC_H)
java/jcf-depend.o: java/jcf-depend.c $(CONFIG_H) $(SYSTEM_H) java/jcf.h
java/jcf-parse.o: java/jcf-parse.c $(CONFIG_H) $(JAVA_TREE_H) flags.h \
- input.h java/java-except.h $(SYSTEM_H) toplev.h java/parse.h $(GGC_H)
+ input.h java/java-except.h $(SYSTEM_H) toplev.h java/parse.h $(GGC_H) \
+ debug.h
java/jcf-write.o: java/jcf-write.c $(CONFIG_H) $(JAVA_TREE_H) java/jcf.h \
$(RTL_H) java/java-opcodes.h java/parse.h java/buffer.h $(SYSTEM_H) \
toplev.h $(GGC_H)
#include "toplev.h"
#include "parse.h"
#include "ggc.h"
+#include "debug.h"
#ifdef HAVE_LOCALE_H
#include <locale.h>
input_filename = DECL_SOURCE_FILE (TYPE_NAME (current_class));
lineno = 0;
- debug_start_source_file (lineno, input_filename);
+ (*debug_hooks->start_source_file) (lineno, input_filename);
init_outgoing_cpool ();
/* Currently we always have to emit calls to _Jv_InitClass when
finish_class ();
- debug_end_source_file (save_lineno);
+ (*debug_hooks->end_source_file) (save_lineno);
input_filename = save_input_filename;
lineno = save_lineno;
}
#include "sdbout.h"
static void sdbout_init PARAMS ((FILE *, const char *));
+static void sdbout_start_source_file PARAMS ((unsigned, const char *));
+static void sdbout_end_source_file PARAMS ((unsigned));
static char *gen_fake_label PARAMS ((void));
static int plain_type PARAMS ((tree));
static int template_name_p PARAMS ((tree));
#endif /* MIPS_DEBUGGING_INFO */
\f
-/* The target debug structure. */
+/* The debug hooks structure. */
struct gcc_debug_hooks sdb_debug_hooks =
{
sdbout_init,
- debug_nothing_init_finish
+ debug_nothing_file_charstar,
+ debug_nothing_int_charstar,
+ debug_nothing_int_charstar,
+ sdbout_start_source_file,
+ sdbout_end_source_file
};
\f
#if 0
/* Change to reading from a new source file. */
-void
-sdbout_start_new_source_file (filename)
+static void
+sdbout_start_source_file (line, filename)
+ unsigned int line ATTRIBUTE_UNUSED;
const char *filename ATTRIBUTE_UNUSED;
{
#ifdef MIPS_DEBUGGING_INFO
/* Revert to reading a previous source file. */
-void
-sdbout_resume_previous_source_file ()
+static void
+sdbout_end_source_file (line)
+ unsigned int line ATTRIBUTE_UNUSED;
{
#ifdef MIPS_DEBUGGING_INFO
struct sdb_file *next;
extern void sdbout_end_epilogue PARAMS ((void));
-extern void sdbout_start_new_source_file PARAMS ((const char *));
-extern void sdbout_resume_previous_source_file PARAMS ((void));
extern void sdbout_mark_begin_function PARAMS ((void));
/* Do dbx symbols. */
timevar_push (TV_SYMOUT);
+
#ifdef DWARF2_UNWIND_INFO
if (dwarf2out_do_frame ())
dwarf2out_frame_finish ();
fprintf (file, "%s", term);
}
-/* Record the beginning of a new source file, named FILENAME. */
-
-void
-debug_start_source_file (lineno, filename)
- register unsigned int lineno ATTRIBUTE_UNUSED;
- register const char *filename ATTRIBUTE_UNUSED;
-{
-#ifdef DBX_DEBUGGING_INFO
- if (write_symbols == DBX_DEBUG)
- dbxout_start_new_source_file (filename);
-#endif
-#ifdef DWARF_DEBUGGING_INFO
- if (debug_info_level == DINFO_LEVEL_VERBOSE
- && write_symbols == DWARF_DEBUG)
- dwarfout_start_new_source_file (filename);
-#endif /* DWARF_DEBUGGING_INFO */
-#ifdef DWARF2_DEBUGGING_INFO
- if (write_symbols == DWARF2_DEBUG)
- dwarf2out_start_source_file (lineno, filename);
-#endif /* DWARF2_DEBUGGING_INFO */
-#ifdef SDB_DEBUGGING_INFO
- if (write_symbols == SDB_DEBUG)
- sdbout_start_new_source_file (filename);
-#endif
-}
-
-/* Record the resumption of a source file. LINENO is the line number in
- the source file we are returning to. */
-
-void
-debug_end_source_file (lineno)
- register unsigned lineno ATTRIBUTE_UNUSED;
-{
-#ifdef DBX_DEBUGGING_INFO
- if (write_symbols == DBX_DEBUG)
- dbxout_resume_previous_source_file ();
-#endif
-#ifdef DWARF_DEBUGGING_INFO
- if (debug_info_level == DINFO_LEVEL_VERBOSE
- && write_symbols == DWARF_DEBUG)
- dwarfout_resume_previous_source_file (lineno);
-#endif /* DWARF_DEBUGGING_INFO */
-#ifdef DWARF2_DEBUGGING_INFO
- if (write_symbols == DWARF2_DEBUG)
- dwarf2out_end_source_file ();
-#endif /* DWARF2_DEBUGGING_INFO */
-#ifdef SDB_DEBUGGING_INFO
- if (write_symbols == SDB_DEBUG)
- sdbout_resume_previous_source_file ();
-#endif
-}
-
-/* Called from cb_define in c-lex.c. The `buffer' parameter contains
- the tail part of the directive line, i.e. the part which is past the
- initial whitespace, #, whitespace, directive-name, whitespace part. */
-
-void
-debug_define (lineno, buffer)
- register unsigned lineno ATTRIBUTE_UNUSED;
- register const char *buffer ATTRIBUTE_UNUSED;
-{
-#ifdef DWARF_DEBUGGING_INFO
- if (write_symbols == DWARF_DEBUG)
- dwarfout_define (lineno, buffer);
-#endif /* DWARF_DEBUGGING_INFO */
-#ifdef DWARF2_DEBUGGING_INFO
- if (write_symbols == DWARF2_DEBUG)
- dwarf2out_define (lineno, buffer);
-#endif /* DWARF2_DEBUGGING_INFO */
-}
-
-/* Called from cb_undef in c-lex.c. The `buffer' parameter contains
- the tail part of the directive line, i.e. the part which is past the
- initial whitespace, #, whitespace, directive-name, whitespace part. */
-
-void
-debug_undef (lineno, buffer)
- register unsigned lineno ATTRIBUTE_UNUSED;
- register const char *buffer ATTRIBUTE_UNUSED;
-{
-#ifdef DWARF_DEBUGGING_INFO
- if (write_symbols == DWARF_DEBUG)
- dwarfout_undef (lineno, buffer);
-#endif /* DWARF_DEBUGGING_INFO */
-#ifdef DWARF2_DEBUGGING_INFO
- if (write_symbols == DWARF2_DEBUG)
- dwarf2out_undef (lineno, buffer);
-#endif /* DWARF2_DEBUGGING_INFO */
-}
-
/* 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
extern int count_error PARAMS ((int));
extern void strip_off_ending PARAMS ((char *, int));
extern void print_time PARAMS ((const char *, long));
-extern void debug_start_source_file PARAMS ((unsigned, const char *));
-extern void debug_end_source_file PARAMS ((unsigned));
-extern void debug_define PARAMS ((unsigned, const char *));
-extern void debug_undef PARAMS ((unsigned, const char *));
extern int debug_ignore_block PARAMS ((union tree_node *));
extern const char *trim_filename PARAMS ((const char *));
extern void internal_error PARAMS ((const char *, ...))