OSDN Git Service

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