e1de156021
* rtl.h (rtl_size): Declare. (rtunion): Remove rtwint. (rtx_def): Replace 'fld' with a union of an rtunion or a HOST_WIDE_INT. (RTX_HDR_SIZE, RTX_SIZE): New macros. (RTL_CHECK1): Adjust for new rtx_def layout. (RTL_CHECK2, RTL_CHECKC1, RTL_CHECKC2): Likewise. (XWINT, XCWINT): Likewise. Access the rtx structure directly. (X0WINT): Remove. (X0ANY): New macro. * rtl.def: Adjust comments for new rtx_def layout. * ggc.h (ggc_alloc_rtx): Take the rtx code as argument, not the number of slots. * rtl.c (rtx_size): New array. (rtx_alloc): Adjust call to ggc_alloc_rtx. Use RTX_HDR_SIZE. (copy_rtx): Use RTX_HDR_SIZE. Adjust for new rtx_def layout. (shallow_copy_rtx): Adjust call to ggc_alloc_rtx. Use RTX_SIZE. * integrate.c (copy_rtx_and_substitute): Use X0ANY to copy '0' fields. * emit-rtl.c (copy_most_rtx): Likewise. (copy_rtx_if_shared): Use RTX_SIZE. (copy_insn_1): Use RTX_HDR_SIZE. Adjust for new rtx_def layout. * gengenrtl.c (gendef): Adjust ggc_alloc_rtx call. Use RTX_HDR_SIZE. * gengtype.c (write_rtx_next): Use RTX_HDR_SIZE. (adjust_field_rtx_def): Expect "rtx_def" to be a union rather than an array. Adjust output for new rtx_def layout. * ggc-page.c (RTL_SIZE): Use RTX_HDR_SIZE. * reload1.c (eliminate_regs): Use RTX_SIZE. * rtlanal.c (loc_mentioned_in_p): Adjust for new rtx_def layout. * gdbinit.in (pi): Likewise. From-SVN: r72647
112 lines
2.2 KiB
Plaintext
112 lines
2.2 KiB
Plaintext
define pr
|
|
set debug_rtx ($)
|
|
end
|
|
|
|
document pr
|
|
Print the full structure of the rtx that is $.
|
|
Works only when an inferior is executing.
|
|
end
|
|
|
|
define prl
|
|
set debug_rtx_list ($, debug_rtx_count)
|
|
end
|
|
|
|
document prl
|
|
Print the full structure of all rtx insns beginning at $.
|
|
Works only when an inferior is executing.
|
|
Uses variable debug_rtx_count to control number of insns printed:
|
|
debug_rtx_count > 0: print from $ on.
|
|
debug_rtx_count < 0: print a window around $.
|
|
|
|
There is also debug_rtx_find (rtx, uid) that will scan a list for UID and print
|
|
it using debug_rtx_list. Usage example: set $foo=debug_rtx_find(first, 42)
|
|
end
|
|
|
|
define pt
|
|
set debug_tree ($)
|
|
end
|
|
|
|
document pt
|
|
Print the full structure of the tree that is $.
|
|
Works only when an inferior is executing.
|
|
end
|
|
|
|
define pct
|
|
set debug_c_tree ($)
|
|
end
|
|
|
|
document pct
|
|
Print the tree that is $ in C syntax.
|
|
Works only when an inferior is executing.
|
|
end
|
|
|
|
define ptc
|
|
output (enum tree_code) $.common.code
|
|
echo \n
|
|
end
|
|
|
|
document ptc
|
|
Print the tree-code of the tree node that is $.
|
|
end
|
|
|
|
define pdn
|
|
output $.decl.name->identifier.id.str
|
|
echo \n
|
|
end
|
|
|
|
document pdn
|
|
Print the name of the decl-node that is $.
|
|
end
|
|
|
|
define ptn
|
|
output $.type.name->decl.name->identifier.id.str
|
|
echo \n
|
|
end
|
|
|
|
document ptn
|
|
Print the name of the type-node that is $.
|
|
end
|
|
|
|
define prc
|
|
output (enum rtx_code) $.code
|
|
echo \ (
|
|
output $.mode
|
|
echo )\n
|
|
end
|
|
|
|
document prc
|
|
Print the rtx-code and machine mode of the rtx that is $.
|
|
end
|
|
|
|
define pi
|
|
print $.u.fld[0].rtx@7
|
|
end
|
|
|
|
document pi
|
|
Print the fields of an instruction that is $.
|
|
end
|
|
|
|
define pbs
|
|
set print_binding_stack ()
|
|
end
|
|
|
|
document pbs
|
|
In cc1plus, print the current binding stack, frame by frame, up to and
|
|
including the global binding level.
|
|
end
|
|
|
|
# Put breakpoints at exit and fancy_abort in case abort is mapped
|
|
# to either fprintf/exit or fancy_abort.
|
|
b fancy_abort
|
|
|
|
# Make gdb complain about symbol reading errors. This is so that gcc
|
|
# developers can see and fix bugs in gcc debug output.
|
|
set complaints 20
|
|
|
|
# Don't let abort actually run, as it will make
|
|
# stdio stop working and therefore the `pr' command above as well.
|
|
# Put this last because gcc does not reference it any more unless
|
|
# USE_SYSTEM_ABORT is defined, so gdb may complain and bail out.
|
|
b exit
|
|
b abort
|