aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoel Brobecker <brobecker@gnat.com>2004-11-13 23:40:01 +0000
committerJoel Brobecker <brobecker@gnat.com>2004-11-13 23:40:01 +0000
commit44ed547b2d1376263f90ccb0abfd707755de08d2 (patch)
tree36a1c2e1e9a44d21b8137af6f3d7ba2370d7ca3a
parentca1a823ab2c5338e553ad23aa71ced9556b8efdc (diff)
downloadgdb-44ed547b2d1376263f90ccb0abfd707755de08d2.zip
gdb-44ed547b2d1376263f90ccb0abfd707755de08d2.tar.gz
gdb-44ed547b2d1376263f90ccb0abfd707755de08d2.tar.bz2
* irix5-nat.c (fill_gregset): Replace use of deprecated_registers
with equivalent code. (fill_fpregset): Likewise.
-rw-r--r--gdb/ChangeLog6
-rw-r--r--gdb/irix5-nat.c47
2 files changed, 35 insertions, 18 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 38082a9..20161f4 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,9 @@
+2004-11-13 Joel Brobecker <brobecker@gnat.com>
+
+ * irix5-nat.c (fill_gregset): Replace use of deprecated_registers
+ with equivalent code.
+ (fill_fpregset): Likewise.
+
2004-11-13 Andrew Cagney <cagney@gnu.org>
* MAINTAINERS: Do not list "Deleted" architectures.
diff --git a/gdb/irix5-nat.c b/gdb/irix5-nat.c
index 182a05a..9948d4a 100644
--- a/gdb/irix5-nat.c
+++ b/gdb/irix5-nat.c
@@ -83,6 +83,7 @@ fill_gregset (gregset_t *gregsetp, int regno)
{
int regi;
greg_t *regp = &(*gregsetp)[0];
+ LONGEST regval;
/* Under Irix6, if GDB is built with N32 ABI and is debugging an O32
executable, we have to sign extend the registers to 64 bits before
@@ -90,30 +91,39 @@ fill_gregset (gregset_t *gregsetp, int regno)
for (regi = 0; regi <= CTX_RA; regi++)
if ((regno == -1) || (regno == regi))
- *(regp + regi) =
- extract_signed_integer (&deprecated_registers[DEPRECATED_REGISTER_BYTE (regi)],
- register_size (current_gdbarch, regi));
+ {
+ regcache_raw_read_signed (current_regcache, regi, &regval);
+ *(regp + regi) = regval;
+ }
if ((regno == -1) || (regno == PC_REGNUM))
- *(regp + CTX_EPC) =
- extract_signed_integer (&deprecated_registers[DEPRECATED_REGISTER_BYTE (mips_regnum (current_gdbarch)->pc)],
- register_size (current_gdbarch, mips_regnum (current_gdbarch)->pc));
+ {
+ regcache_raw_read_signed
+ (current_regcache, mips_regnum (current_gdbarch)->pc, &regval);
+ *(regp + CTX_EPC) = regval;
+ }
if ((regno == -1) || (regno == mips_regnum (current_gdbarch)->cause))
- *(regp + CTX_CAUSE) =
- extract_signed_integer (&deprecated_registers[DEPRECATED_REGISTER_BYTE (mips_regnum (current_gdbarch)->cause)],
- register_size (current_gdbarch, mips_regnum (current_gdbarch)->cause));
+ {
+ regcache_raw_read_signed
+ (current_regcache, mips_regnum (current_gdbarch)->cause, &regval);
+ *(regp + CTX_CAUSE) = regval;
+ }
if ((regno == -1)
|| (regno == mips_regnum (current_gdbarch)->hi))
- *(regp + CTX_MDHI) =
- extract_signed_integer (&deprecated_registers[DEPRECATED_REGISTER_BYTE (mips_regnum (current_gdbarch)->hi)],
- register_size (current_gdbarch, mips_regnum (current_gdbarch)->hi));
+ {
+ regcache_raw_read_signed
+ (current_regcache, mips_regnum (current_gdbarch)->hi, &regval);
+ *(regp + CTX_MDHI) = regval;
+ }
if ((regno == -1) || (regno == mips_regnum (current_gdbarch)->lo))
- *(regp + CTX_MDLO) =
- extract_signed_integer (&deprecated_registers[DEPRECATED_REGISTER_BYTE (mips_regnum (current_gdbarch)->lo)],
- register_size (current_gdbarch, mips_regnum (current_gdbarch)->lo));
+ {
+ regcache_raw_read_signed
+ (current_regcache, mips_regnum (current_gdbarch)->lo, &regval);
+ *(regp + CTX_MDLO) = regval;
+ }
}
/*
@@ -158,15 +168,16 @@ fill_fpregset (fpregset_t *fpregsetp, int regno)
{
if ((regno == -1) || (regno == regi))
{
- from = (char *) &deprecated_registers[DEPRECATED_REGISTER_BYTE (regi)];
to = (char *) &(fpregsetp->fp_r.fp_regs[regi - FP0_REGNUM]);
- memcpy (to, from, register_size (current_gdbarch, regi));
+ regcache_raw_read (current_regcache, regi, to);
}
}
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)];
+ regcache_raw_read (current_regcache,
+ mips_regnum (current_gdbarch)->fp_control_status,
+ &fpregsetp->fp_csr);
}