*isfloat = 1;
return regno - tdep->ppc_fp0_regnum + FPR0;
}
- else if (regno == PC_REGNUM)
+ else if (regno == gdbarch_pc_regnum (current_gdbarch))
return IAR;
else if (regno == tdep->ppc_ps_regnum)
return MSR;
/* Bogus register number. */
else if (nr < 0)
{
- if (regno >= NUM_REGS)
+ if (regno >= gdbarch_num_regs (current_gdbarch))
fprintf_unfiltered (gdb_stderr,
"gdb error: register no %d not implemented.\n",
regno);
/* Bogus register number. */
else if (nr < 0)
{
- if (regno >= NUM_REGS)
+ if (regno >= gdbarch_num_regs (current_gdbarch))
fprintf_unfiltered (gdb_stderr,
"gdb error: register no %d not implemented.\n",
regno);
/* Fixed-point registers. */
else
{
- if (regno == SP_REGNUM)
+ if (regno == gdbarch_sp_regnum (current_gdbarch))
/* Execute one dummy instruction (which is a breakpoint) in inferior
process to give kernel a chance to do internal housekeeping.
Otherwise the following ptrace(2) calls will mess up user stack
fetch_register (regcache, tdep->ppc_fp0_regnum + regno);
/* Read special registers. */
- fetch_register (regcache, PC_REGNUM);
+ fetch_register (regcache, gdbarch_pc_regnum (current_gdbarch));
fetch_register (regcache, tdep->ppc_ps_regnum);
fetch_register (regcache, tdep->ppc_cr_regnum);
fetch_register (regcache, tdep->ppc_lr_regnum);
store_register (regcache, tdep->ppc_fp0_regnum + regno);
/* Write special registers. */
- store_register (regcache, PC_REGNUM);
+ store_register (regcache, gdbarch_pc_regnum (current_gdbarch));
store_register (regcache, tdep->ppc_ps_regnum);
store_register (regcache, tdep->ppc_cr_regnum);
store_register (regcache, tdep->ppc_lr_regnum);
\f
/* xcoff_relocate_symtab - hook for symbol table relocation.
- also reads shared libraries. */
+
+ This is only applicable to live processes, and is a no-op when
+ debugging a core file. */
void
xcoff_relocate_symtab (unsigned int pid)
int ldisize = arch64 ? sizeof (ldi->l64) : sizeof (ldi->l32);
int size;
+ if (ptid_equal (inferior_ptid, null_ptid))
+ return;
+
do
{
size = load_segs * ldisize;