debug: Support "phrs" for dumping a HARD_REG_SET
commitabbdb623c4287baad6e5bff1ae694ef30264519c
authorHans-Peter Nilsson <hp@axis.com>
Wed, 15 Feb 2023 00:09:06 +0000 (15 01:09 +0100)
committerHans-Peter Nilsson <hp@bitrange.com>
Wed, 15 Feb 2023 00:09:06 +0000 (15 01:09 +0100)
tree426a31a1cca30564c7c284eaf434a3d66a8aec1d
parentcce62625025380c2ea2a220deb10f8f355f83abf
debug: Support "phrs" for dumping a HARD_REG_SET

The debug-function in sel-sched-dump.cc that would be
suitable for a hookup to a command in gdb is guarded by
#ifdef INSN_SCHEDULING, thus can't be used for all targets.
Better move the function marked DEBUG_FUNCTION elsewhere,
here to a file with a suitable static function to call.

There are multiple sets of similar functions dumping
HARD_REG_SETs, but cleaning that up is better left to a
separate commit.

gcc:
* gdbinit.in (phrs): New command.
* sel-sched-dump.cc (debug_hard_reg_set): Remove debug-function.
* ira-color.cc (debug_hard_reg_set): New, calling print_hard_reg_set.
gcc/gdbinit.in
gcc/ira-color.cc
gcc/sel-sched-dump.cc