1 /* Debug hooks for GCC.
2 Copyright (C) 2001 Free Software Foundation, Inc.
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
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.
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. */
23 /* This structure contains hooks for the debug information output
24 functions, accessed through the global instance debug_hooks set in
25 toplev.c according to command line options. */
26 struct gcc_debug_hooks
28 /* Initialise debug output. MAIN_FILENAME is the name of the main
30 void (* init) PARAMS ((const char *main_filename));
32 /* Output debug symbols. */
33 void (* finish) PARAMS ((const char *main_filename));
35 /* Macro defined on line LINE with name and expansion TEXT. */
36 void (* define) PARAMS ((unsigned int line, const char *text));
38 /* MACRO undefined on line LINE. */
39 void (* undef) PARAMS ((unsigned int line, const char *macro));
41 /* Record the beginning of a new source file FILE from LINE number
42 in the previous one. */
43 void (* start_source_file) PARAMS ((unsigned int line, const char *file));
45 /* Record the resumption of a source file. LINE is the line number
46 in the source file we are returning to. */
47 void (* end_source_file) PARAMS ((unsigned int line));
49 /* Record the beginning of block N, counting from 1 and not
50 including the function-scope block, at LINE. */
51 void (* begin_block) PARAMS ((unsigned int line, unsigned int n));
53 /* Record the end of a block. Arguments as for begin_block. */
54 void (* end_block) PARAMS ((unsigned int line, unsigned int n));
56 /* Record a line based on NOTE. Obtain the line number with
57 NOTE_LINE_NUMBER (note). */
58 void (* source_line) PARAMS ((const char *filename, struct rtx_def *note));
60 /* Record end of epilogue code. */
61 void (* end_epilogue) PARAMS ((void));
63 /* Record end of function. LINE is highest line number in function. */
64 void (* end_function) PARAMS ((unsigned int line));
67 extern struct gcc_debug_hooks *debug_hooks;
69 /* The do-nothing hooks. */
70 extern void debug_nothing_void
72 extern void debug_nothing_charstar
73 PARAMS ((const char *));
74 extern void debug_nothing_int_charstar
75 PARAMS ((unsigned int, const char *));
76 extern void debug_nothing_int
77 PARAMS ((unsigned int));
78 extern void debug_nothing_int_int
79 PARAMS ((unsigned int, unsigned int));
80 extern void debug_nothing_charstar_rtx
81 PARAMS ((const char *, struct rtx_def *));
83 /* Hooks for various debug formats. */
84 extern struct gcc_debug_hooks do_nothing_debug_hooks;
85 extern struct gcc_debug_hooks dbx_debug_hooks;
86 extern struct gcc_debug_hooks sdb_debug_hooks;
87 extern struct gcc_debug_hooks xcoff_debug_hooks;
88 extern struct gcc_debug_hooks dwarf_debug_hooks;
89 extern struct gcc_debug_hooks dwarf2_debug_hooks;
91 /* Dwarf2 frame information. */
93 extern void dwarf2out_end_epilogue
96 #endif /* !GCC_DEBUG_H */