aboutsummaryrefslogtreecommitdiff
path: root/gdb/irix5-nat.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/irix5-nat.c')
-rw-r--r--gdb/irix5-nat.c50
1 files changed, 29 insertions, 21 deletions
diff --git a/gdb/irix5-nat.c b/gdb/irix5-nat.c
index de27ef1..a447389 100644
--- a/gdb/irix5-nat.c
+++ b/gdb/irix5-nat.c
@@ -61,13 +61,17 @@ supply_gregset (gregset_t *gregsetp)
for (regi = 0; regi <= CTX_RA; regi++)
supply_register (regi, (char *) (regp + regi) + gregoff);
- supply_register (PC_REGNUM, (char *) (regp + CTX_EPC) + gregoff);
- supply_register (HI_REGNUM, (char *) (regp + CTX_MDHI) + gregoff);
- supply_register (LO_REGNUM, (char *) (regp + CTX_MDLO) + gregoff);
- supply_register (CAUSE_REGNUM, (char *) (regp + CTX_CAUSE) + gregoff);
+ supply_register (mips_regnum (current_gdbarch)->pc,
+ (char *) (regp + CTX_EPC) + gregoff);
+ supply_register (mips_regnum (current_gdbarch)->hi,
+ (char *) (regp + CTX_MDHI) + gregoff);
+ supply_register (mips_regnum (current_gdbarch)->lo,
+ (char *) (regp + CTX_MDLO) + gregoff);
+ supply_register (mips_regnum (current_gdbarch)->cause,
+ (char *) (regp + CTX_CAUSE) + gregoff);
/* Fill inaccessible registers with zero. */
- supply_register (BADVADDR_REGNUM, zerobuf);
+ supply_register (mips_regnum (current_gdbarch)->badvaddr, zerobuf);
}
void
@@ -88,23 +92,24 @@ fill_gregset (gregset_t *gregsetp, int regno)
if ((regno == -1) || (regno == PC_REGNUM))
*(regp + CTX_EPC) =
- extract_signed_integer (&deprecated_registers[DEPRECATED_REGISTER_BYTE (PC_REGNUM)],
- DEPRECATED_REGISTER_RAW_SIZE (PC_REGNUM));
+ extract_signed_integer (&deprecated_registers[DEPRECATED_REGISTER_BYTE (mips_regnum (current_gdbarch)->pc)],
+ DEPRECATED_REGISTER_RAW_SIZE (mips_regnum (current_gdbarch)->pc));
- if ((regno == -1) || (regno == CAUSE_REGNUM))
+ if ((regno == -1) || (regno == mips_regnum (current_gdbarch)->cause))
*(regp + CTX_CAUSE) =
- extract_signed_integer (&deprecated_registers[DEPRECATED_REGISTER_BYTE (CAUSE_REGNUM)],
- DEPRECATED_REGISTER_RAW_SIZE (CAUSE_REGNUM));
+ extract_signed_integer (&deprecated_registers[DEPRECATED_REGISTER_BYTE (mips_regnum (current_gdbarch)->cause)],
+ DEPRECATED_REGISTER_RAW_SIZE (mips_regnum (current_gdbarch)->cause));
- if ((regno == -1) || (regno == HI_REGNUM))
+ if ((regno == -1)
+ || (regno == mips_regnum (current_gdbarch)->hi))
*(regp + CTX_MDHI) =
- extract_signed_integer (&deprecated_registers[DEPRECATED_REGISTER_BYTE (HI_REGNUM)],
- DEPRECATED_REGISTER_RAW_SIZE (HI_REGNUM));
+ extract_signed_integer (&deprecated_registers[DEPRECATED_REGISTER_BYTE (mips_regnum (current_gdbarch)->hi)],
+ DEPRECATED_REGISTER_RAW_SIZE (mips_regnum (current_gdbarch)->hi));
- if ((regno == -1) || (regno == LO_REGNUM))
+ if ((regno == -1) || (regno == mips_regnum (current_gdbarch)->lo))
*(regp + CTX_MDLO) =
- extract_signed_integer (&deprecated_registers[DEPRECATED_REGISTER_BYTE (LO_REGNUM)],
- DEPRECATED_REGISTER_RAW_SIZE (LO_REGNUM));
+ extract_signed_integer (&deprecated_registers[DEPRECATED_REGISTER_BYTE (mips_regnum (current_gdbarch)->lo)],
+ DEPRECATED_REGISTER_RAW_SIZE (mips_regnum (current_gdbarch)->lo));
}
/*
@@ -127,10 +132,12 @@ supply_fpregset (fpregset_t *fpregsetp)
supply_register (FP0_REGNUM + regi,
(char *) &fpregsetp->fp_r.fp_regs[regi]);
- supply_register (FCRCS_REGNUM, (char *) &fpregsetp->fp_csr);
+ supply_register (mips_regnum (current_gdbarch)->fp_control_status,
+ (char *) &fpregsetp->fp_csr);
- /* FIXME: how can we supply FCRIR_REGNUM? SGI doesn't tell us. */
- supply_register (FCRIR_REGNUM, zerobuf);
+ /* FIXME: how can we supply FCRIR? SGI doesn't tell us. */
+ supply_register (mips_regnum (current_gdbarch)->fp_implementation_revision,
+ zerobuf);
}
void
@@ -151,8 +158,9 @@ fill_fpregset (fpregset_t *fpregsetp, int regno)
}
}
- if ((regno == -1) || (regno == FCRCS_REGNUM))
- fpregsetp->fp_csr = *(unsigned *) &deprecated_registers[DEPRECATED_REGISTER_BYTE (FCRCS_REGNUM)];
+ if ((regno == -1)
+ || (regno == mips_regnum (current_gdbarch)->fp_control_status))
+ fpregsetp->fp_csr = *(unsigned *) &deprecated_registers[DEPRECATED_REGISTER_BYTE (mips_regnum (current_gdbarch)->fp_control_status)];
}