]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/gdbinit.in
* cfg.c (redirect_edge_succ_nodup): Use find_edge rather than
[thirdparty/gcc.git] / gcc / gdbinit.in
CommitLineData
071cd279 1define pr
2set debug_rtx ($)
3end
4
5document pr
6Print the full structure of the rtx that is $.
7Works only when an inferior is executing.
8end
9
10define prl
11set debug_rtx_list ($, debug_rtx_count)
12end
13
14document prl
15Print the full structure of all rtx insns beginning at $.
16Works only when an inferior is executing.
17Uses variable debug_rtx_count to control number of insns printed:
18 debug_rtx_count > 0: print from $ on.
19 debug_rtx_count < 0: print a window around $.
20
21There is also debug_rtx_find (rtx, uid) that will scan a list for UID and print
22it using debug_rtx_list. Usage example: set $foo=debug_rtx_find(first, 42)
23end
24
25define pt
26set debug_tree ($)
27end
28
29document pt
30Print the full structure of the tree that is $.
31Works only when an inferior is executing.
32end
33
00ae6be7 34define pct
35set debug_c_tree ($)
36end
37
38document pct
39Print the tree that is $ in C syntax.
40Works only when an inferior is executing.
41end
42
4ee9c684 43define pgs
44set debug_generic_stmt ($)
45end
46
47document pgs
48Print the statement that is $ in C syntax.
49Works only when an inferior is executing.
50end
51
52define pge
53set debug_generic_expr ($)
54end
55
56document pge
57Print the expression that is $ in C syntax.
58Works only when an inferior is executing.
59end
60
071cd279 61define ptc
62output (enum tree_code) $.common.code
63echo \n
64end
65
66document ptc
67Print the tree-code of the tree node that is $.
68end
69
70define pdn
4e84a947 71output $.decl.name->identifier.id.str
071cd279 72echo \n
73end
74
75document pdn
76Print the name of the decl-node that is $.
77end
78
79define ptn
4e84a947 80output $.type.name->decl.name->identifier.id.str
071cd279 81echo \n
82end
83
84document ptn
85Print the name of the type-node that is $.
86end
87
88define prc
89output (enum rtx_code) $.code
90echo \ (
91output $.mode
92echo )\n
93end
94
95document prc
96Print the rtx-code and machine mode of the rtx that is $.
97end
98
99define pi
48bdfbc8 100print $.u.fld[0].rt_rtx@7
071cd279 101end
102
103document pi
104Print the fields of an instruction that is $.
105end
106
107define pbs
108set print_binding_stack ()
109end
110
111document pbs
112In cc1plus, print the current binding stack, frame by frame, up to and
113including the global binding level.
114end
115
97fce000 116# Put breakpoints at exit and fancy_abort in case abort is mapped
117# to either fprintf/exit or fancy_abort.
97fce000 118b fancy_abort
119
0fb7aaf2 120# Put a breakpoint on internal_error to help with debugging ICEs.
121b internal_error
122
071cd279 123# Make gdb complain about symbol reading errors. This is so that gcc
124# developers can see and fix bugs in gcc debug output.
125set complaints 20
3bdfaae6 126
127# Don't let abort actually run, as it will make
128# stdio stop working and therefore the `pr' command above as well.
129# Put this last because gcc does not reference it any more unless
130# USE_SYSTEM_ABORT is defined, so gdb may complain and bail out.
d62e1a3b 131b exit
3bdfaae6 132b abort