1 # Copyright (C) 2001-2017 Free Software Foundation, Inc.
3 # This file is part of GCC.
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)
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.
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/>.
24 Print the full structure of the rtx that is $.
25 Works only when an inferior is executing.
29 set debug_rtx_list ($, debug_rtx_count)
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 $.
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)
48 Print the full structure of the tree that is $.
49 Works only when an inferior is executing.
57 Print the tree that is $ in C syntax.
58 Works only when an inferior is executing.
62 set debug_gimple_stmt ($)
66 Print the Gimple statement that is $ in C syntax.
67 Works only when an inferior is executing.
71 set debug_gimple_seq ($)
75 Print the Gimple sequence that is $ in C syntax.
76 Works only when an inferior is executing.
80 set debug_generic_stmt ($)
84 Print the statement that is $ in C syntax.
85 Works only when an inferior is executing.
89 set debug_generic_expr ($)
93 Print the expression that is $ in C syntax.
94 Works only when an inferior is executing.
98 set mpz_out_str(stderr, 10, $)
102 Print the mpz value that is $
103 Works only when an inferior is executing.
107 output (enum tree_code) $.common.code
112 Print the tree-code of the tree node that is $.
116 output $.decl_minimal.name->identifier.id.str
121 Print the name of the decl-node that is $.
125 output $.type.name->decl_minimal.name->identifier.id.str
130 Print the name of the type-node that is $.
134 set debug_dwarf_die ($)
138 Print the dw_die_ref that is in $.
142 output (enum rtx_code) $.code
149 Print the rtx-code and machine mode of the rtx that is $.
153 print $.u.fld[0].rt_rtx@7
157 Print the fields of an instruction that is $.
161 set print_binding_stack ()
165 In cc1plus, print the current binding stack, frame by frame, up to and
166 including the global binding level.
174 Dump the basic block that is in $, including rtx.
178 set bitmap_print (stderr, $, "", "\n")
182 Dump the bitmap that is in $ as a comma-separated list of numbers.
186 output expand_location ($)
191 Print expanded location of $.
195 output debug_function (cfun ? cfun->decl : current_function_decl, 0)
200 Print current function.
203 define break-on-diagnostic
204 break diagnostic_show_locus
207 document break-on-diagnostic
208 Put a breakpoint on diagnostic_show_locus, called whenever a diagnostic
209 is emitted (as opposed to those warnings that are suppressed by
210 command-line options).
213 # Define some macros helpful to gdb when it is expanding macros.
214 macro define __FILE__ "gdb"
215 macro define __LINE__ 1
216 macro define __FUNCTION__ "gdb"
217 macro define __null 0
218 macro define input_line expand_location(input_location).line
219 macro define input_filename expand_location(input_location).file
221 # Gracefully handle aborts in functions used from gdb.
222 set unwindonsignal on
224 # Put breakpoints at exit and fancy_abort in case abort is mapped
225 # to either fprintf/exit or fancy_abort.
228 # Put a breakpoint on internal_error to help with debugging ICEs.
232 # Don't let abort actually run, as it will make
233 # stdio stop working and therefore the `pr' command above as well.
234 # Put this last because gcc does not reference it any more unless
235 # USE_SYSTEM_ABORT is defined, so gdb may complain and bail out.
239 # Disable strict type checking. This allows developers to (for example)
240 # make inferior calls without casting absolute address to a suitable
244 # Skip all inline functions in tree.h.
245 # These are used in accessor macros.
246 # Note that this is added at the end because older gdb versions
247 # do not understand the 'skip' command.
248 # See https://sourceware.org/gdb/current/onlinedocs/gdb/Skipping-Over-Functions-and-Files.html
251 # Also skip inline functions in is-a.h.
260 # Likewise, skip various inline functions in rtl.h.
261 skip rtx_expr_list::next
262 skip rtx_expr_list::element
263 skip rtx_insn_list::next
264 skip rtx_insn_list::insn
265 skip rtx_sequence::len
266 skip rtx_sequence::element
267 skip rtx_sequence::insn
276 skip INSN_HAS_LOCATION
277 skip JUMP_LABEL_AS_INSN