]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/gdbinit.in
fix PR68343: disable fuse-*.c tests for isl 0.14 or earlier
[thirdparty/gcc.git] / gcc / gdbinit.in
CommitLineData
818ab71a 1# Copyright (C) 2001-2016 Free Software Foundation, Inc.
ad41bd84
JM
2#
3# This file is part of GCC.
4#
5# GCC is free software; you can redistribute it and/or modify
6# it under the terms of the GNU General Public License as published by
7# the Free Software Foundation; either version 3, or (at your option)
8# any later version.
9#
10# GCC is distributed in the hope that it will be useful,
11# but WITHOUT ANY WARRANTY; without even the implied warranty of
12# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13# GNU General Public License for more details.
14#
15# You should have received a copy of the GNU General Public License
16# along with GCC; see the file COPYING3. If not see
17# <http://www.gnu.org/licenses/>.
18
861bb6c1
JL
19define pr
20set debug_rtx ($)
21end
22
23document pr
24Print the full structure of the rtx that is $.
25Works only when an inferior is executing.
26end
27
28define prl
29set debug_rtx_list ($, debug_rtx_count)
30end
31
32document prl
33Print the full structure of all rtx insns beginning at $.
34Works only when an inferior is executing.
35Uses variable debug_rtx_count to control number of insns printed:
36 debug_rtx_count > 0: print from $ on.
37 debug_rtx_count < 0: print a window around $.
38
39There is also debug_rtx_find (rtx, uid) that will scan a list for UID and print
40it using debug_rtx_list. Usage example: set $foo=debug_rtx_find(first, 42)
41end
42
43define pt
44set debug_tree ($)
45end
46
47document pt
48Print the full structure of the tree that is $.
49Works only when an inferior is executing.
50end
51
b9d8832d
JM
52define pct
53set debug_c_tree ($)
54end
55
56document pct
57Print the tree that is $ in C syntax.
58Works only when an inferior is executing.
59end
60
f8bf9252
SP
61define pgg
62set debug_gimple_stmt ($)
63end
64
65document pgg
66Print the Gimple statement that is $ in C syntax.
67Works only when an inferior is executing.
68end
69
6e7e763e
JM
70define pgq
71set debug_gimple_seq ($)
72end
73
74document pgq
75Print the Gimple sequence that is $ in C syntax.
76Works only when an inferior is executing.
77end
78
6de9cd9a
DN
79define pgs
80set debug_generic_stmt ($)
81end
82
83document pgs
84Print the statement that is $ in C syntax.
85Works only when an inferior is executing.
86end
87
88define pge
89set debug_generic_expr ($)
90end
91
92document pge
93Print the expression that is $ in C syntax.
94Works only when an inferior is executing.
95end
96
605be31e
MS
97define pmz
98set mpz_out_str(stderr, 10, $)
99end
100
101document pmz
102Print the mpz value that is $
103Works only when an inferior is executing.
104end
105
861bb6c1
JL
106define ptc
107output (enum tree_code) $.common.code
108echo \n
109end
110
111document ptc
112Print the tree-code of the tree node that is $.
113end
114
115define pdn
9391bc0d 116output $.decl_minimal.name->identifier.id.str
861bb6c1
JL
117echo \n
118end
119
120document pdn
121Print the name of the decl-node that is $.
122end
123
124define ptn
9391bc0d 125output $.type.name->decl_minimal.name->identifier.id.str
861bb6c1
JL
126echo \n
127end
128
129document ptn
130Print the name of the type-node that is $.
131end
132
b042534c
JM
133define pvt
134set debug_vec_tree ($)
135end
136
137document pvt
138Print the VEC(tree) that is in $.
139end
140
141define pdd
142set debug_dwarf_die ($)
143end
144
145document pdd
146Print the dw_die_ref that is in $.
147end
148
861bb6c1
JL
149define prc
150output (enum rtx_code) $.code
151echo \ (
152output $.mode
153echo )\n
154end
155
156document prc
157Print the rtx-code and machine mode of the rtx that is $.
158end
159
160define pi
e0d9dfa2 161print $.u.fld[0].rt_rtx@7
861bb6c1
JL
162end
163
164document pi
165Print the fields of an instruction that is $.
166end
167
168define pbs
169set print_binding_stack ()
170end
171
172document pbs
173In cc1plus, print the current binding stack, frame by frame, up to and
174including the global binding level.
175end
176
55a9c4b2 177define pbb
984d07dd 178set debug ($)
55a9c4b2
HPN
179end
180
181document pbb
182Dump the basic block that is in $, including rtx.
183end
184
185define pbm
186set bitmap_print (stderr, $, "", "\n")
187end
188
189document pbm
190Dump the bitmap that is in $ as a comma-separated list of numbers.
191end
192
71e55f04
MP
193define pel
194output expand_location ($)
195echo \n
196end
197
198document pel
199Print expanded location of $.
200end
201
2e1a9cdb
MP
202define pcfun
203output debug_function (cfun ? cfun->decl : current_function_decl, 0)
204echo \n
205end
206
207document pcfun
208Print current function.
209end
210
0823efed
DN
211# Define some macros helpful to gdb when it is expanding macros.
212macro define __FILE__ "gdb"
213macro define __LINE__ 1
b57ca59b 214macro define __FUNCTION__ "gdb"
0bfdb81e 215macro define __null 0
2a0da5ad
JM
216macro define input_line expand_location(input_location).line
217macro define input_filename expand_location(input_location).file
0823efed
DN
218
219# Gracefully handle aborts in functions used from gdb.
220set unwindonsignal on
221
22c4957e
MM
222# Put breakpoints at exit and fancy_abort in case abort is mapped
223# to either fprintf/exit or fancy_abort.
22c4957e
MM
224b fancy_abort
225
c9092111
BE
226# Put a breakpoint on internal_error to help with debugging ICEs.
227b internal_error
228
3a7f50dc 229set complaints 0
b14a4f5a
AS
230# Don't let abort actually run, as it will make
231# stdio stop working and therefore the `pr' command above as well.
232# Put this last because gcc does not reference it any more unless
233# USE_SYSTEM_ABORT is defined, so gdb may complain and bail out.
3aed1981 234b exit
b14a4f5a 235b abort
0823efed 236
2a936959
JL
237# Disable strict type checking. This allows developers to (for example)
238# make inferior calls without casting absolute address to a suitable
239# pointer type.
240set check type off
241
0823efed
DN
242# Skip all inline functions in tree.h.
243# These are used in accessor macros.
244# Note that this is added at the end because older gdb versions
245# do not understand the 'skip' command.
08216dfb 246# See https://sourceware.org/gdb/current/onlinedocs/gdb/Skipping-Over-Functions-and-Files.html
865ea646 247skip file tree.h
08216dfb
DM
248
249# Likewise, skip various inline functions in rtl.h.
250skip rtx_expr_list::next
251skip rtx_expr_list::element
252skip rtx_insn_list::next
253skip rtx_insn_list::insn
254skip rtx_sequence::len
255skip rtx_sequence::element
256skip rtx_sequence::insn
257skip INSN_UID
258skip PREV_INSN
259skip SET_PREV_INSN
260skip NEXT_INSN
261skip SET_NEXT_INSN
262skip BLOCK_FOR_INSN
263skip PATTERN
264skip INSN_LOCATION
265skip INSN_HAS_LOCATION
266skip JUMP_LABEL_AS_INSN