summaryrefslogtreecommitdiffstats
path: root/gdb/rs6000-nat.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/rs6000-nat.c')
-rw-r--r--gdb/rs6000-nat.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gdb/rs6000-nat.c b/gdb/rs6000-nat.c
index 3be2e9ff10..2c77328aad 100644
--- a/gdb/rs6000-nat.c
+++ b/gdb/rs6000-nat.c
@@ -228,7 +228,7 @@ fetch_register (struct regcache *regcache, int 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);
@@ -288,7 +288,7 @@ store_register (const struct regcache *regcache, int 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);
OpenPOWER on IntegriCloud