1 # Copyright (C) 2001, 2002, 2003, 2004, 2006,
2 # 2008, 2010, 2012 Free Software Foundation, Inc.
4 # This file is part of GCC.
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)
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.
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/>.
25 Print the full structure of the rtx that is $.
26 Works only when an inferior is executing.
30 set debug_rtx_list ($, debug_rtx_count)
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 $.
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)
49 Print the full structure of the tree that is $.
50 Works only when an inferior is executing.
58 Print the tree that is $ in C syntax.
59 Works only when an inferior is executing.
63 set debug_gimple_stmt ($)
67 Print the Gimple statement that is $ in C syntax.
68 Works only when an inferior is executing.
72 set debug_gimple_seq ($)
76 Print the Gimple sequence that is $ in C syntax.
77 Works only when an inferior is executing.
81 set debug_generic_stmt ($)
85 Print the statement that is $ in C syntax.
86 Works only when an inferior is executing.
90 set debug_generic_expr ($)
94 Print the expression that is $ in C syntax.
95 Works only when an inferior is executing.
99 output (enum tree_code) $.common.code
104 Print the tree-code of the tree node that is $.
108 output $.decl_minimal.name->identifier.id.str
113 Print the name of the decl-node that is $.
117 output $.type.name->decl_minimal.name->identifier.id.str
122 Print the name of the type-node that is $.
126 set debug_vec_tree ($)
130 Print the VEC(tree) that is in $.
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.
170 set dump_bb ($, stderr, 0)
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.
185 # Define some macros helpful to gdb when it is expanding macros.
186 macro define __FILE__ "gdb"
187 macro define __LINE__ 1
189 # Gracefully handle aborts in functions used from gdb.
190 set unwindonsignal on
192 # Put breakpoints at exit and fancy_abort in case abort is mapped
193 # to either fprintf/exit or fancy_abort.
196 # Put a breakpoint on internal_error to help with debugging ICEs.
200 # Don't let abort actually run, as it will make
201 # stdio stop working and therefore the `pr' command above as well.
202 # Put this last because gcc does not reference it any more unless
203 # USE_SYSTEM_ABORT is defined, so gdb may complain and bail out.
207 # Skip all inline functions in tree.h.
208 # These are used in accessor macros.
209 # Note that this is added at the end because older gdb versions
210 # do not understand the 'skip' command.