comparison gcc/gdbinit.in @ 111:04ced10e8804

gcc 7
author kono
date Fri, 27 Oct 2017 22:46:09 +0900
parents f6334be47118
children 84e7813d76e9
comparison
equal deleted inserted replaced
68:561a7518be6b 111:04ced10e8804
1 # Copyright (C) 2001, 2002, 2003, 2004, 2006, 1 # Copyright (C) 2001-2017 Free Software Foundation, Inc.
2 # 2008, 2010 Free Software Foundation, Inc.
3 # 2 #
4 # This file is part of GCC. 3 # This file is part of GCC.
5 # 4 #
6 # GCC is free software; you can redistribute it and/or modify 5 # 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 6 # it under the terms of the GNU General Public License as published by
90 set debug_generic_expr ($) 89 set debug_generic_expr ($)
91 end 90 end
92 91
93 document pge 92 document pge
94 Print the expression that is $ in C syntax. 93 Print the expression that is $ in C syntax.
94 Works only when an inferior is executing.
95 end
96
97 define pmz
98 set mpz_out_str(stderr, 10, $)
99 end
100
101 document pmz
102 Print the mpz value that is $
95 Works only when an inferior is executing. 103 Works only when an inferior is executing.
96 end 104 end
97 105
98 define ptc 106 define ptc
99 output (enum tree_code) $.common.code 107 output (enum tree_code) $.common.code
165 In cc1plus, print the current binding stack, frame by frame, up to and 173 In cc1plus, print the current binding stack, frame by frame, up to and
166 including the global binding level. 174 including the global binding level.
167 end 175 end
168 176
169 define pbb 177 define pbb
170 set dump_bb ($, stderr, 0) 178 set debug ($)
171 end 179 end
172 180
173 document pbb 181 document pbb
174 Dump the basic block that is in $, including rtx. 182 Dump the basic block that is in $, including rtx.
175 end 183 end
179 end 187 end
180 188
181 document pbm 189 document pbm
182 Dump the bitmap that is in $ as a comma-separated list of numbers. 190 Dump the bitmap that is in $ as a comma-separated list of numbers.
183 end 191 end
192
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
184 221
185 # Put breakpoints at exit and fancy_abort in case abort is mapped 222 # Put breakpoints at exit and fancy_abort in case abort is mapped
186 # to either fprintf/exit or fancy_abort. 223 # to either fprintf/exit or fancy_abort.
187 b fancy_abort 224 b fancy_abort
188 225
194 # stdio stop working and therefore the `pr' command above as well. 231 # stdio stop working and therefore the `pr' command above as well.
195 # Put this last because gcc does not reference it any more unless 232 # Put this last because gcc does not reference it any more unless
196 # USE_SYSTEM_ABORT is defined, so gdb may complain and bail out. 233 # USE_SYSTEM_ABORT is defined, so gdb may complain and bail out.
197 b exit 234 b exit
198 b abort 235 b abort
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