Mercurial > hg > CbC > CbC_gcc
annotate gcc/gdbinit.in @ 111:04ced10e8804
gcc 7
author | kono |
---|---|
date | Fri, 27 Oct 2017 22:46:09 +0900 |
parents | f6334be47118 |
children | 84e7813d76e9 |
rev | line source |
---|---|
111 | 1 # Copyright (C) 2001-2017 Free Software Foundation, Inc. |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
2 # |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
3 # This file is part of GCC. |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
4 # |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
5 # GCC is free software; you can redistribute it and/or modify |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
6 # it under the terms of the GNU General Public License as published by |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
7 # the Free Software Foundation; either version 3, or (at your option) |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
8 # any later version. |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
9 # |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
10 # GCC is distributed in the hope that it will be useful, |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
13 # GNU General Public License for more details. |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
14 # |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
15 # You should have received a copy of the GNU General Public License |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
16 # along with GCC; see the file COPYING3. If not see |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
17 # <http://www.gnu.org/licenses/>. |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
18 |
0 | 19 define pr |
20 set debug_rtx ($) | |
21 end | |
22 | |
23 document pr | |
24 Print the full structure of the rtx that is $. | |
25 Works only when an inferior is executing. | |
26 end | |
27 | |
28 define prl | |
29 set debug_rtx_list ($, debug_rtx_count) | |
30 end | |
31 | |
32 document prl | |
33 Print the full structure of all rtx insns beginning at $. | |
34 Works only when an inferior is executing. | |
35 Uses 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 | |
39 There is also debug_rtx_find (rtx, uid) that will scan a list for UID and print | |
40 it using debug_rtx_list. Usage example: set $foo=debug_rtx_find(first, 42) | |
41 end | |
42 | |
43 define pt | |
44 set debug_tree ($) | |
45 end | |
46 | |
47 document pt | |
48 Print the full structure of the tree that is $. | |
49 Works only when an inferior is executing. | |
50 end | |
51 | |
52 define pct | |
53 set debug_c_tree ($) | |
54 end | |
55 | |
56 document pct | |
57 Print the tree that is $ in C syntax. | |
58 Works only when an inferior is executing. | |
59 end | |
60 | |
61 define pgg | |
62 set debug_gimple_stmt ($) | |
63 end | |
64 | |
65 document pgg | |
66 Print the Gimple statement that is $ in C syntax. | |
67 Works only when an inferior is executing. | |
68 end | |
69 | |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
70 define pgq |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
71 set debug_gimple_seq ($) |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
72 end |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
73 |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
74 document pgq |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
75 Print the Gimple sequence that is $ in C syntax. |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
76 Works only when an inferior is executing. |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
77 end |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
78 |
0 | 79 define pgs |
80 set debug_generic_stmt ($) | |
81 end | |
82 | |
83 document pgs | |
84 Print the statement that is $ in C syntax. | |
85 Works only when an inferior is executing. | |
86 end | |
87 | |
88 define pge | |
89 set debug_generic_expr ($) | |
90 end | |
91 | |
92 document pge | |
93 Print the expression that is $ in C syntax. | |
94 Works only when an inferior is executing. | |
95 end | |
96 | |
111 | 97 define pmz |
98 set mpz_out_str(stderr, 10, $) | |
99 end | |
100 | |
101 document pmz | |
102 Print the mpz value that is $ | |
103 Works only when an inferior is executing. | |
104 end | |
105 | |
0 | 106 define ptc |
107 output (enum tree_code) $.common.code | |
108 echo \n | |
109 end | |
110 | |
111 document ptc | |
112 Print the tree-code of the tree node that is $. | |
113 end | |
114 | |
115 define pdn | |
116 output $.decl_minimal.name->identifier.id.str | |
117 echo \n | |
118 end | |
119 | |
120 document pdn | |
121 Print the name of the decl-node that is $. | |
122 end | |
123 | |
124 define ptn | |
125 output $.type.name->decl_minimal.name->identifier.id.str | |
126 echo \n | |
127 end | |
128 | |
129 document ptn | |
130 Print the name of the type-node that is $. | |
131 end | |
132 | |
67
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
55
diff
changeset
|
133 define pvt |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
55
diff
changeset
|
134 set debug_vec_tree ($) |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
55
diff
changeset
|
135 end |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
55
diff
changeset
|
136 |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
55
diff
changeset
|
137 document pvt |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
55
diff
changeset
|
138 Print the VEC(tree) that is in $. |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
55
diff
changeset
|
139 end |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
55
diff
changeset
|
140 |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
55
diff
changeset
|
141 define pdd |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
55
diff
changeset
|
142 set debug_dwarf_die ($) |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
55
diff
changeset
|
143 end |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
55
diff
changeset
|
144 |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
55
diff
changeset
|
145 document pdd |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
55
diff
changeset
|
146 Print the dw_die_ref that is in $. |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
55
diff
changeset
|
147 end |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
55
diff
changeset
|
148 |
0 | 149 define prc |
150 output (enum rtx_code) $.code | |
151 echo \ ( | |
152 output $.mode | |
153 echo )\n | |
154 end | |
155 | |
156 document prc | |
157 Print the rtx-code and machine mode of the rtx that is $. | |
158 end | |
159 | |
160 define pi | |
161 print $.u.fld[0].rt_rtx@7 | |
162 end | |
163 | |
164 document pi | |
165 Print the fields of an instruction that is $. | |
166 end | |
167 | |
168 define pbs | |
169 set print_binding_stack () | |
170 end | |
171 | |
172 document pbs | |
173 In cc1plus, print the current binding stack, frame by frame, up to and | |
174 including the global binding level. | |
175 end | |
176 | |
177 define pbb | |
111 | 178 set debug ($) |
0 | 179 end |
180 | |
181 document pbb | |
182 Dump the basic block that is in $, including rtx. | |
183 end | |
184 | |
185 define pbm | |
186 set bitmap_print (stderr, $, "", "\n") | |
187 end | |
188 | |
189 document pbm | |
190 Dump the bitmap that is in $ as a comma-separated list of numbers. | |
191 end | |
192 | |
111 | 193 define pel |
194 output expand_location ($) | |
195 echo \n | |
196 end | |
197 | |
198 document pel | |
199 Print expanded location of $. | |
200 end | |
201 | |
202 define pcfun | |
203 output debug_function (cfun ? cfun->decl : current_function_decl, 0) | |
204 echo \n | |
205 end | |
206 | |
207 document pcfun | |
208 Print current function. | |
209 end | |
210 | |
211 # Define some macros helpful to gdb when it is expanding macros. | |
212 macro define __FILE__ "gdb" | |
213 macro define __LINE__ 1 | |
214 macro define __FUNCTION__ "gdb" | |
215 macro define __null 0 | |
216 macro define input_line expand_location(input_location).line | |
217 macro define input_filename expand_location(input_location).file | |
218 | |
219 # Gracefully handle aborts in functions used from gdb. | |
220 set unwindonsignal on | |
221 | |
0 | 222 # Put breakpoints at exit and fancy_abort in case abort is mapped |
223 # to either fprintf/exit or fancy_abort. | |
224 b fancy_abort | |
225 | |
226 # Put a breakpoint on internal_error to help with debugging ICEs. | |
227 b internal_error | |
228 | |
229 set complaints 0 | |
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. | |
234 b exit | |
235 b abort | |
111 | 236 |
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. | |
240 set check type off | |
241 | |
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. | |
246 # See https://sourceware.org/gdb/current/onlinedocs/gdb/Skipping-Over-Functions-and-Files.html | |
247 skip file tree.h | |
248 | |
249 # Also skip inline functions in is-a.h. | |
250 skip file is-a.h | |
251 | |
252 # And line-map.h. | |
253 skip file line-map.h | |
254 | |
255 # Likewise, skip various inline functions in rtl.h. | |
256 skip rtx_expr_list::next | |
257 skip rtx_expr_list::element | |
258 skip rtx_insn_list::next | |
259 skip rtx_insn_list::insn | |
260 skip rtx_sequence::len | |
261 skip rtx_sequence::element | |
262 skip rtx_sequence::insn | |
263 skip INSN_UID | |
264 skip PREV_INSN | |
265 skip SET_PREV_INSN | |
266 skip NEXT_INSN | |
267 skip SET_NEXT_INSN | |
268 skip BLOCK_FOR_INSN | |
269 skip PATTERN | |
270 skip INSN_LOCATION | |
271 skip INSN_HAS_LOCATION | |
272 skip JUMP_LABEL_AS_INSN |