1/* Do-nothing debug hooks for GCC.
2 Copyright (C) 2001-2023 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 3, 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; see the file COPYING3. If not see
16 <http://www.gnu.org/licenses/>. */
17
18#include "config.h"
19#include "system.h"
20#include "coretypes.h"
21#include "tree.h"
22#include "debug.h"
23
24/* The do-nothing debug hooks. */
25const struct gcc_debug_hooks do_nothing_debug_hooks =
26{
27 .init: debug_nothing_charstar,
28 .finish: debug_nothing_charstar,
29 .early_finish: debug_nothing_charstar, /* early_finish */
30 .assembly_start: debug_nothing_void,
31 .define: debug_nothing_int_charstar,
32 .undef: debug_nothing_int_charstar,
33 .start_source_file: debug_nothing_int_charstar,
34 .end_source_file: debug_nothing_int,
35 .begin_block: debug_nothing_int_int, /* begin_block */
36 .end_block: debug_nothing_int_int, /* end_block */
37 .ignore_block: debug_true_const_tree, /* ignore_block */
38 .source_line: debug_nothing_int_int_charstar_int_bool, /* source_line */
39 .set_ignored_loc: debug_nothing_int_int_charstar, /* set_ignored_loc */
40 .begin_prologue: debug_nothing_int_int_charstar, /* begin_prologue */
41 .end_prologue: debug_nothing_int_charstar, /* end_prologue */
42 .begin_epilogue: debug_nothing_int_charstar, /* begin_epilogue */
43 .end_epilogue: debug_nothing_int_charstar, /* end_epilogue */
44 .begin_function: debug_nothing_tree, /* begin_function */
45 .end_function: debug_nothing_int, /* end_function */
46 .register_main_translation_unit: debug_nothing_tree, /* register_main_translation_unit */
47 .function_decl: debug_nothing_tree, /* function_decl */
48 .early_global_decl: debug_nothing_tree, /* early_global_decl */
49 .late_global_decl: debug_nothing_tree, /* late_global_decl */
50 .type_decl: debug_nothing_tree_int, /* type_decl */
51 .imported_module_or_decl: debug_nothing_tree_tree_tree_bool_bool,/* imported_module_or_decl */
52 .die_ref_for_decl: debug_false_tree_charstarstar_uhwistar,/* die_ref_for_decl */
53 .register_external_die: debug_nothing_tree_charstar_uhwi, /* register_external_die */
54 .deferred_inline_function: debug_nothing_tree, /* deferred_inline_function */
55 .outlining_inline_function: debug_nothing_tree, /* outlining_inline_function */
56 .label: debug_nothing_rtx_code_label, /* label */
57 .handle_pch: debug_nothing_int, /* handle_pch */
58 .var_location: debug_nothing_rtx_insn, /* var_location */
59 .inline_entry: debug_nothing_tree, /* inline_entry */
60 .size_function: debug_nothing_tree, /* size_function */
61 .switch_text_section: debug_nothing_void, /* switch_text_section */
62 .set_name: debug_nothing_tree_tree, /* set_name */
63 .start_end_main_source_file: 0, /* start_end_main_source_file */
64 TYPE_SYMTAB_IS_ADDRESS /* tree_type_symtab_field */
65};
66
67/* This file contains implementations of each debug hook that do
68 nothing. */
69
70void
71debug_nothing_void (void)
72{
73}
74
75void
76debug_nothing_tree (tree decl ATTRIBUTE_UNUSED)
77{
78}
79
80void
81debug_nothing_tree_tree (tree t1 ATTRIBUTE_UNUSED,
82 tree t2 ATTRIBUTE_UNUSED)
83{
84}
85
86void
87debug_nothing_tree_tree_tree_bool_bool (tree t1 ATTRIBUTE_UNUSED,
88 tree t2 ATTRIBUTE_UNUSED,
89 tree t3 ATTRIBUTE_UNUSED,
90 bool b1 ATTRIBUTE_UNUSED,
91 bool b2 ATTRIBUTE_UNUSED)
92{
93}
94
95bool
96debug_true_const_tree (const_tree block ATTRIBUTE_UNUSED)
97{
98 return true;
99}
100
101void
102debug_nothing_rtx_insn (rtx_insn *insn ATTRIBUTE_UNUSED)
103{
104}
105
106void
107debug_nothing_rtx_code_label (rtx_code_label *label ATTRIBUTE_UNUSED)
108{
109}
110
111void
112debug_nothing_charstar (const char *main_filename ATTRIBUTE_UNUSED)
113{
114}
115
116void
117debug_nothing_int_charstar (unsigned int line ATTRIBUTE_UNUSED,
118 const char *text ATTRIBUTE_UNUSED)
119{
120}
121
122void
123debug_nothing_int_int_charstar (unsigned int line ATTRIBUTE_UNUSED,
124 unsigned int column ATTRIBUTE_UNUSED,
125 const char *text ATTRIBUTE_UNUSED)
126{
127}
128
129void
130debug_nothing_int_int_charstar_int_bool (unsigned int line ATTRIBUTE_UNUSED,
131 unsigned int column ATTRIBUTE_UNUSED,
132 const char *text ATTRIBUTE_UNUSED,
133 int discriminator ATTRIBUTE_UNUSED,
134 bool is_stmt ATTRIBUTE_UNUSED)
135{
136}
137
138void
139debug_nothing_int (unsigned int line ATTRIBUTE_UNUSED)
140{
141}
142
143void
144debug_nothing_int_int (unsigned int line ATTRIBUTE_UNUSED,
145 unsigned int n ATTRIBUTE_UNUSED)
146{
147}
148
149void
150debug_nothing_tree_int (tree decl ATTRIBUTE_UNUSED,
151 int local ATTRIBUTE_UNUSED)
152{
153}
154
155bool
156debug_false_tree_charstarstar_uhwistar (tree, const char **,
157 unsigned HOST_WIDE_INT *)
158{
159 return false;
160}
161
162void
163debug_nothing_tree_charstar_uhwi (tree, const char *,
164 unsigned HOST_WIDE_INT)
165{
166}
167

source code of gcc/debug.cc