xref: /dflybsd-src/contrib/gcc-4.7/gcc/gdbinit.in (revision 04febcfb30580676d3e95f58a16c5137ee478b32)
1*e4b17023SJohn Marino# Copyright (C) 2001, 2002, 2003, 2004, 2006,
2*e4b17023SJohn Marino# 2008, 2010 Free Software Foundation, Inc.
3*e4b17023SJohn Marino#
4*e4b17023SJohn Marino# This file is part of GCC.
5*e4b17023SJohn Marino#
6*e4b17023SJohn Marino# GCC is free software; you can redistribute it and/or modify
7*e4b17023SJohn Marino# it under the terms of the GNU General Public License as published by
8*e4b17023SJohn Marino# the Free Software Foundation; either version 3, or (at your option)
9*e4b17023SJohn Marino# any later version.
10*e4b17023SJohn Marino#
11*e4b17023SJohn Marino# GCC is distributed in the hope that it will be useful,
12*e4b17023SJohn Marino# but WITHOUT ANY WARRANTY; without even the implied warranty of
13*e4b17023SJohn Marino# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14*e4b17023SJohn Marino# GNU General Public License for more details.
15*e4b17023SJohn Marino#
16*e4b17023SJohn Marino# You should have received a copy of the GNU General Public License
17*e4b17023SJohn Marino# along with GCC; see the file COPYING3.  If not see
18*e4b17023SJohn Marino# <http://www.gnu.org/licenses/>.
19*e4b17023SJohn Marino
20*e4b17023SJohn Marinodefine pr
21*e4b17023SJohn Marinoset debug_rtx ($)
22*e4b17023SJohn Marinoend
23*e4b17023SJohn Marino
24*e4b17023SJohn Marinodocument pr
25*e4b17023SJohn MarinoPrint the full structure of the rtx that is $.
26*e4b17023SJohn MarinoWorks only when an inferior is executing.
27*e4b17023SJohn Marinoend
28*e4b17023SJohn Marino
29*e4b17023SJohn Marinodefine prl
30*e4b17023SJohn Marinoset debug_rtx_list ($, debug_rtx_count)
31*e4b17023SJohn Marinoend
32*e4b17023SJohn Marino
33*e4b17023SJohn Marinodocument prl
34*e4b17023SJohn MarinoPrint the full structure of all rtx insns beginning at $.
35*e4b17023SJohn MarinoWorks only when an inferior is executing.
36*e4b17023SJohn MarinoUses variable debug_rtx_count to control number of insns printed:
37*e4b17023SJohn Marino  debug_rtx_count > 0: print from $ on.
38*e4b17023SJohn Marino  debug_rtx_count < 0: print a window around $.
39*e4b17023SJohn Marino
40*e4b17023SJohn MarinoThere is also debug_rtx_find (rtx, uid) that will scan a list for UID and print
41*e4b17023SJohn Marinoit using debug_rtx_list. Usage example: set $foo=debug_rtx_find(first, 42)
42*e4b17023SJohn Marinoend
43*e4b17023SJohn Marino
44*e4b17023SJohn Marinodefine pt
45*e4b17023SJohn Marinoset debug_tree ($)
46*e4b17023SJohn Marinoend
47*e4b17023SJohn Marino
48*e4b17023SJohn Marinodocument pt
49*e4b17023SJohn MarinoPrint the full structure of the tree that is $.
50*e4b17023SJohn MarinoWorks only when an inferior is executing.
51*e4b17023SJohn Marinoend
52*e4b17023SJohn Marino
53*e4b17023SJohn Marinodefine pct
54*e4b17023SJohn Marinoset debug_c_tree ($)
55*e4b17023SJohn Marinoend
56*e4b17023SJohn Marino
57*e4b17023SJohn Marinodocument pct
58*e4b17023SJohn MarinoPrint the tree that is $ in C syntax.
59*e4b17023SJohn MarinoWorks only when an inferior is executing.
60*e4b17023SJohn Marinoend
61*e4b17023SJohn Marino
62*e4b17023SJohn Marinodefine pgg
63*e4b17023SJohn Marinoset debug_gimple_stmt ($)
64*e4b17023SJohn Marinoend
65*e4b17023SJohn Marino
66*e4b17023SJohn Marinodocument pgg
67*e4b17023SJohn MarinoPrint the Gimple statement that is $ in C syntax.
68*e4b17023SJohn MarinoWorks only when an inferior is executing.
69*e4b17023SJohn Marinoend
70*e4b17023SJohn Marino
71*e4b17023SJohn Marinodefine pgq
72*e4b17023SJohn Marinoset debug_gimple_seq ($)
73*e4b17023SJohn Marinoend
74*e4b17023SJohn Marino
75*e4b17023SJohn Marinodocument pgq
76*e4b17023SJohn MarinoPrint the Gimple sequence that is $ in C syntax.
77*e4b17023SJohn MarinoWorks only when an inferior is executing.
78*e4b17023SJohn Marinoend
79*e4b17023SJohn Marino
80*e4b17023SJohn Marinodefine pgs
81*e4b17023SJohn Marinoset debug_generic_stmt ($)
82*e4b17023SJohn Marinoend
83*e4b17023SJohn Marino
84*e4b17023SJohn Marinodocument pgs
85*e4b17023SJohn MarinoPrint the statement that is $ in C syntax.
86*e4b17023SJohn MarinoWorks only when an inferior is executing.
87*e4b17023SJohn Marinoend
88*e4b17023SJohn Marino
89*e4b17023SJohn Marinodefine pge
90*e4b17023SJohn Marinoset debug_generic_expr ($)
91*e4b17023SJohn Marinoend
92*e4b17023SJohn Marino
93*e4b17023SJohn Marinodocument pge
94*e4b17023SJohn MarinoPrint the expression that is $ in C syntax.
95*e4b17023SJohn MarinoWorks only when an inferior is executing.
96*e4b17023SJohn Marinoend
97*e4b17023SJohn Marino
98*e4b17023SJohn Marinodefine ptc
99*e4b17023SJohn Marinooutput (enum tree_code) $.common.code
100*e4b17023SJohn Marinoecho \n
101*e4b17023SJohn Marinoend
102*e4b17023SJohn Marino
103*e4b17023SJohn Marinodocument ptc
104*e4b17023SJohn MarinoPrint the tree-code of the tree node that is $.
105*e4b17023SJohn Marinoend
106*e4b17023SJohn Marino
107*e4b17023SJohn Marinodefine pdn
108*e4b17023SJohn Marinooutput $.decl_minimal.name->identifier.id.str
109*e4b17023SJohn Marinoecho \n
110*e4b17023SJohn Marinoend
111*e4b17023SJohn Marino
112*e4b17023SJohn Marinodocument pdn
113*e4b17023SJohn MarinoPrint the name of the decl-node that is $.
114*e4b17023SJohn Marinoend
115*e4b17023SJohn Marino
116*e4b17023SJohn Marinodefine ptn
117*e4b17023SJohn Marinooutput $.type.name->decl_minimal.name->identifier.id.str
118*e4b17023SJohn Marinoecho \n
119*e4b17023SJohn Marinoend
120*e4b17023SJohn Marino
121*e4b17023SJohn Marinodocument ptn
122*e4b17023SJohn MarinoPrint the name of the type-node that is $.
123*e4b17023SJohn Marinoend
124*e4b17023SJohn Marino
125*e4b17023SJohn Marinodefine pvt
126*e4b17023SJohn Marinoset debug_vec_tree ($)
127*e4b17023SJohn Marinoend
128*e4b17023SJohn Marino
129*e4b17023SJohn Marinodocument pvt
130*e4b17023SJohn MarinoPrint the VEC(tree) that is in $.
131*e4b17023SJohn Marinoend
132*e4b17023SJohn Marino
133*e4b17023SJohn Marinodefine pdd
134*e4b17023SJohn Marinoset debug_dwarf_die ($)
135*e4b17023SJohn Marinoend
136*e4b17023SJohn Marino
137*e4b17023SJohn Marinodocument pdd
138*e4b17023SJohn MarinoPrint the dw_die_ref that is in $.
139*e4b17023SJohn Marinoend
140*e4b17023SJohn Marino
141*e4b17023SJohn Marinodefine prc
142*e4b17023SJohn Marinooutput (enum rtx_code) $.code
143*e4b17023SJohn Marinoecho \ (
144*e4b17023SJohn Marinooutput $.mode
145*e4b17023SJohn Marinoecho )\n
146*e4b17023SJohn Marinoend
147*e4b17023SJohn Marino
148*e4b17023SJohn Marinodocument prc
149*e4b17023SJohn MarinoPrint the rtx-code and machine mode of the rtx that is $.
150*e4b17023SJohn Marinoend
151*e4b17023SJohn Marino
152*e4b17023SJohn Marinodefine pi
153*e4b17023SJohn Marinoprint $.u.fld[0].rt_rtx@7
154*e4b17023SJohn Marinoend
155*e4b17023SJohn Marino
156*e4b17023SJohn Marinodocument pi
157*e4b17023SJohn MarinoPrint the fields of an instruction that is $.
158*e4b17023SJohn Marinoend
159*e4b17023SJohn Marino
160*e4b17023SJohn Marinodefine pbs
161*e4b17023SJohn Marinoset print_binding_stack ()
162*e4b17023SJohn Marinoend
163*e4b17023SJohn Marino
164*e4b17023SJohn Marinodocument pbs
165*e4b17023SJohn MarinoIn cc1plus, print the current binding stack, frame by frame, up to and
166*e4b17023SJohn Marinoincluding the global binding level.
167*e4b17023SJohn Marinoend
168*e4b17023SJohn Marino
169*e4b17023SJohn Marinodefine pbb
170*e4b17023SJohn Marinoset dump_bb ($, stderr, 0)
171*e4b17023SJohn Marinoend
172*e4b17023SJohn Marino
173*e4b17023SJohn Marinodocument pbb
174*e4b17023SJohn MarinoDump the basic block that is in $, including rtx.
175*e4b17023SJohn Marinoend
176*e4b17023SJohn Marino
177*e4b17023SJohn Marinodefine pbm
178*e4b17023SJohn Marinoset bitmap_print (stderr, $, "", "\n")
179*e4b17023SJohn Marinoend
180*e4b17023SJohn Marino
181*e4b17023SJohn Marinodocument pbm
182*e4b17023SJohn MarinoDump the bitmap that is in $ as a comma-separated list of numbers.
183*e4b17023SJohn Marinoend
184*e4b17023SJohn Marino
185*e4b17023SJohn Marino# Put breakpoints at exit and fancy_abort in case abort is mapped
186*e4b17023SJohn Marino# to either fprintf/exit or fancy_abort.
187*e4b17023SJohn Marinob fancy_abort
188*e4b17023SJohn Marino
189*e4b17023SJohn Marino# Put a breakpoint on internal_error to help with debugging ICEs.
190*e4b17023SJohn Marinob internal_error
191*e4b17023SJohn Marino
192*e4b17023SJohn Marinoset complaints 0
193*e4b17023SJohn Marino# Don't let abort actually run, as it will make
194*e4b17023SJohn Marino# stdio stop working and therefore the `pr' command above as well.
195*e4b17023SJohn Marino# Put this last because gcc does not reference it any more unless
196*e4b17023SJohn Marino# USE_SYSTEM_ABORT is defined, so gdb may complain and bail out.
197*e4b17023SJohn Marinob exit
198*e4b17023SJohn Marinob abort
199