* 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
66 lines
2.4 KiB
C
66 lines
2.4 KiB
C
/* Debug hooks for GCC.
|
|
Copyright (C) 2001 Free Software Foundation, Inc.
|
|
|
|
This program is free software; you can redistribute it and/or modify it
|
|
under the terms of the GNU General Public License as published by the
|
|
Free Software Foundation; either version 2, or (at your option) any
|
|
later version.
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
GNU General Public License for more details.
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
along with this program; if not, write to the Free Software
|
|
Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
|
|
|
#ifndef GCC_DEBUG_H
|
|
#define GCC_DEBUG_H
|
|
|
|
/* This structure contains hooks for the debug information output
|
|
functions, accessed through the global instance debug_hooks set in
|
|
toplev.c according to command line options. */
|
|
struct gcc_debug_hooks
|
|
{
|
|
/* Initialise debug output to FILE. MAIN_FILENAME is the name of
|
|
the main input file. */
|
|
void (* init) PARAMS ((FILE * file, const char *main_filename));
|
|
|
|
/* 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_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;
|
|
extern struct gcc_debug_hooks dwarf_debug_hooks;
|
|
extern struct gcc_debug_hooks dwarf2_debug_hooks;
|
|
|
|
#endif /* !GCC_DEBUG_H */
|