Makefile.in (final.o): Depend on debug.h.
[platform/upstream/gcc.git] / gcc / debug.h
1 /* Debug hooks for GCC.
2    Copyright (C) 2001 Free Software Foundation, Inc.
3
4 This program is free software; you can redistribute it and/or modify it
5 under the terms of the GNU General Public License as published by the
6 Free Software Foundation; either version 2, or (at your option) any
7 later version.
8
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12 GNU General Public License for more details.
13
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software
16 Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
17
18 #ifndef GCC_DEBUG_H
19 #define GCC_DEBUG_H
20
21 /* This structure contains hooks for the debug information output
22    functions, accessed through the global instance debug_hooks set in
23    toplev.c according to command line options.  */
24 struct gcc_debug_hooks
25 {
26   /* Initialise debug output to FILE.  MAIN_FILENAME is the name of
27      the main input file.  */
28   void (* init) PARAMS ((FILE * file, const char *main_filename));
29
30   /* Output debug symbols to FILE.  */
31   void (* finish) PARAMS ((FILE * file, const char *main_filename));
32
33   /* Macro defined on line LINE with name and expansion TEXT.  */
34   void (* define) PARAMS ((unsigned int line, const char *text));
35
36   /* MACRO undefined on line LINE.  */
37   void (* undef) PARAMS ((unsigned int line, const char *macro));
38
39   /* Record the beginning of a new source file FILE from LINE number
40      in the previous one.  */
41   void (* start_source_file) PARAMS ((unsigned int line, const char *file));
42
43   /* Record the resumption of a source file.  LINE is the line number
44      in the source file we are returning to.  */
45   void (* end_source_file) PARAMS ((unsigned int line));
46
47   /* Record the beginning of block N, counting from 1 and not
48      including the function-scope block, at LINE.  Output to FILE.  */
49   void (* begin_block) PARAMS ((FILE *, unsigned int line, unsigned int n));
50
51   /* Record the end of a block.  Arguments as for begin_block.  */
52   void (* end_block) PARAMS ((FILE *, unsigned int line, unsigned int n));
53 };
54
55 extern struct gcc_debug_hooks *debug_hooks;
56
57 /* The do-nothing hooks.  */
58 extern void debug_nothing_file_charstar
59   PARAMS ((FILE *, const char *));
60 extern void debug_nothing_int_charstar
61   PARAMS ((unsigned int, const char *));
62 extern void debug_nothing_int
63   PARAMS ((unsigned int));
64 extern void debug_nothing_file_int_int
65   PARAMS ((FILE *, unsigned int, unsigned int));
66
67 /* Hooks for various debug formats.  */
68 extern struct gcc_debug_hooks do_nothing_debug_hooks;
69 extern struct gcc_debug_hooks dbx_debug_hooks;
70 extern struct gcc_debug_hooks sdb_debug_hooks;
71 extern struct gcc_debug_hooks xcoff_debug_hooks;
72 extern struct gcc_debug_hooks dwarf_debug_hooks;
73 extern struct gcc_debug_hooks dwarf2_debug_hooks;
74
75 #endif /* !GCC_DEBUG_H  */