gdbinit.in revision 117395
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
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
43define ptc
44output (enum tree_code) $.common.code
45echo \n
46end
47
48document ptc
49Print the tree-code of the tree node that is $.
50end
51
52define pdn
53output $.decl.name->identifier.id.str
54echo \n
55end
56
57document pdn
58Print the name of the decl-node that is $.
59end
60
61define ptn
62output $.type.name->decl.name->identifier.id.str
63echo \n
64end
65
66document ptn
67Print the name of the type-node that is $.
68end
69
70define prc
71output (enum rtx_code) $.code
72echo \ (
73output $.mode
74echo )\n
75end
76
77document prc
78Print the rtx-code and machine mode of the rtx that is $.
79end
80
81define pi
82print $.fld[0].rtx@7
83end
84
85document pi
86Print the fields of an instruction that is $.
87end
88
89define pbs
90set print_binding_stack ()
91end
92
93document pbs
94In cc1plus, print the current binding stack, frame by frame, up to and
95including the global binding level.
96end
97
98# Put breakpoints at exit and fancy_abort in case abort is mapped
99# to either fprintf/exit or fancy_abort.
100b fancy_abort
101
102# Make gdb complain about symbol reading errors.  This is so that gcc
103# developers can see and fix bugs in gcc debug output.
104set complaints 20
105
106# Don't let abort actually run, as it will make
107# stdio stop working and therefore the `pr' command above as well.
108# Put this last because gcc does not reference it any more unless
109# USE_SYSTEM_ABORT is defined, so gdb may complain and bail out.
110b exit
111b abort
112