Hello,
Core GDB uses NPC_REGNUM in two ways:
- in generic write pc to upate the next pc
Architectures (HP/UX and SPARC) can (and I suspect do) implement TARGET_WRITE_PC to do this directly
- procfs_fetch_registers contains the performance tweak:
if (FP0_REGNUM >= 0) /* need floating point? */
{
if ((regno >= 0 && regno < FP0_REGNUM) ||
regno == PC_REGNUM ||
(NPC_REGNUM >= 0 && regno == NPC_REGNUM) ||
regno == DEPRECATED_FP_REGNUM ||
regno == SP_REGNUM)
return; /* not a floating point register */
if ((fpregs = proc_get_fpregs (pi)) == NULL)
proc_error (pi, "fetch_registers, get_fpregs", __LINE__);
supply_fpregset (fpregs);
}
Even without NPC_REGNUM, GDB works. The regset stuff should make it possible to both cleanup the code and rewrite that performance hack into oblivion.
Eli, doco ok?
I'll follow up in a few days,