* dbxout.c (current_file): Also wrap inside DBX_DEBUGGING_INFO ||
[official-gcc.git] / gcc / gdbinit.in
blobccc6504dda785b5e93627ac6485fb649d7523cd4
1 define pr
2 set debug_rtx ($)
3 end
5 document pr
6 Print the full structure of the rtx that is $.
7 Works only when an inferior is executing.
8 end
10 define prl
11 set debug_rtx_list ($, debug_rtx_count)
12 end
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 $.
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
25 define pt
26 set debug_tree ($)
27 end
29 document pt
30 Print the full structure of the tree that is $.
31 Works only when an inferior is executing.
32 end
34 define pct
35 set debug_c_tree ($)
36 end
38 document pct
39 Print the tree that is $ in C syntax.
40 Works only when an inferior is executing.
41 end
43 define ptc
44 output (enum tree_code) $.common.code
45 echo \n
46 end
48 document ptc
49 Print the tree-code of the tree node that is $.
50 end
52 define pdn
53 output $.decl.name->identifier.id.str
54 echo \n
55 end
57 document pdn
58 Print the name of the decl-node that is $.
59 end
61 define ptn
62 output $.type.name->decl.name->identifier.id.str
63 echo \n
64 end
66 document ptn
67 Print the name of the type-node that is $.
68 end
70 define prc
71 output (enum rtx_code) $.code
72 echo \ (
73 output $.mode
74 echo )\n
75 end
77 document prc
78 Print the rtx-code and machine mode of the rtx that is $.
79 end
81 define pi
82 print $.u.fld[0].rtx@7
83 end
85 document pi
86 Print the fields of an instruction that is $.
87 end
89 define pbs
90 set print_binding_stack ()
91 end
93 document pbs
94 In cc1plus, print the current binding stack, frame by frame, up to and
95 including the global binding level.
96 end
98 # Put breakpoints at exit and fancy_abort in case abort is mapped
99 # to either fprintf/exit or fancy_abort.
100 b fancy_abort
102 # Make gdb complain about symbol reading errors.  This is so that gcc
103 # developers can see and fix bugs in gcc debug output.
104 set complaints 20
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.
110 b exit
111 b abort