OSDN Git Service

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