Mercurial > hg > CbC > CbC_gcc
comparison gcc/gdbinit.in @ 0:a06113de4d67
first commit
author | kent <kent@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Fri, 17 Jul 2009 14:47:48 +0900 |
parents | |
children | 77e2b8dfacca |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:a06113de4d67 |
---|---|
1 define pr | |
2 set debug_rtx ($) | |
3 end | |
4 | |
5 document pr | |
6 Print the full structure of the rtx that is $. | |
7 Works only when an inferior is executing. | |
8 end | |
9 | |
10 define prl | |
11 set debug_rtx_list ($, debug_rtx_count) | |
12 end | |
13 | |
14 document prl | |
15 Print the full structure of all rtx insns beginning at $. | |
16 Works only when an inferior is executing. | |
17 Uses 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 | |
21 There is also debug_rtx_find (rtx, uid) that will scan a list for UID and print | |
22 it using debug_rtx_list. Usage example: set $foo=debug_rtx_find(first, 42) | |
23 end | |
24 | |
25 define pt | |
26 set debug_tree ($) | |
27 end | |
28 | |
29 document pt | |
30 Print the full structure of the tree that is $. | |
31 Works only when an inferior is executing. | |
32 end | |
33 | |
34 define pct | |
35 set debug_c_tree ($) | |
36 end | |
37 | |
38 document pct | |
39 Print the tree that is $ in C syntax. | |
40 Works only when an inferior is executing. | |
41 end | |
42 | |
43 define pgg | |
44 set debug_gimple_stmt ($) | |
45 end | |
46 | |
47 document pgg | |
48 Print the Gimple statement that is $ in C syntax. | |
49 Works only when an inferior is executing. | |
50 end | |
51 | |
52 define pgs | |
53 set debug_generic_stmt ($) | |
54 end | |
55 | |
56 document pgs | |
57 Print the statement that is $ in C syntax. | |
58 Works only when an inferior is executing. | |
59 end | |
60 | |
61 define pge | |
62 set debug_generic_expr ($) | |
63 end | |
64 | |
65 document pge | |
66 Print the expression that is $ in C syntax. | |
67 Works only when an inferior is executing. | |
68 end | |
69 | |
70 define ptc | |
71 output (enum tree_code) $.common.code | |
72 echo \n | |
73 end | |
74 | |
75 document ptc | |
76 Print the tree-code of the tree node that is $. | |
77 end | |
78 | |
79 define pdn | |
80 output $.decl_minimal.name->identifier.id.str | |
81 echo \n | |
82 end | |
83 | |
84 document pdn | |
85 Print the name of the decl-node that is $. | |
86 end | |
87 | |
88 define ptn | |
89 output $.type.name->decl_minimal.name->identifier.id.str | |
90 echo \n | |
91 end | |
92 | |
93 document ptn | |
94 Print the name of the type-node that is $. | |
95 end | |
96 | |
97 define prc | |
98 output (enum rtx_code) $.code | |
99 echo \ ( | |
100 output $.mode | |
101 echo )\n | |
102 end | |
103 | |
104 document prc | |
105 Print the rtx-code and machine mode of the rtx that is $. | |
106 end | |
107 | |
108 define pi | |
109 print $.u.fld[0].rt_rtx@7 | |
110 end | |
111 | |
112 document pi | |
113 Print the fields of an instruction that is $. | |
114 end | |
115 | |
116 define pbs | |
117 set print_binding_stack () | |
118 end | |
119 | |
120 document pbs | |
121 In cc1plus, print the current binding stack, frame by frame, up to and | |
122 including the global binding level. | |
123 end | |
124 | |
125 define pbb | |
126 set dump_bb ($, stderr, 0) | |
127 end | |
128 | |
129 document pbb | |
130 Dump the basic block that is in $, including rtx. | |
131 end | |
132 | |
133 define pbm | |
134 set bitmap_print (stderr, $, "", "\n") | |
135 end | |
136 | |
137 document pbm | |
138 Dump the bitmap that is in $ as a comma-separated list of numbers. | |
139 end | |
140 | |
141 # Put breakpoints at exit and fancy_abort in case abort is mapped | |
142 # to either fprintf/exit or fancy_abort. | |
143 b fancy_abort | |
144 | |
145 # Put a breakpoint on internal_error to help with debugging ICEs. | |
146 b internal_error | |
147 | |
148 set complaints 0 | |
149 # Don't let abort actually run, as it will make | |
150 # stdio stop working and therefore the `pr' command above as well. | |
151 # Put this last because gcc does not reference it any more unless | |
152 # USE_SYSTEM_ABORT is defined, so gdb may complain and bail out. | |
153 b exit | |
154 b abort |