diff options
Diffstat (limited to 'gdb/inf-ptrace.c')
-rw-r--r-- | gdb/inf-ptrace.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gdb/inf-ptrace.c b/gdb/inf-ptrace.c index dfdfe50..9b485f0 100644 --- a/gdb/inf-ptrace.c +++ b/gdb/inf-ptrace.c @@ -664,7 +664,7 @@ static void inf_ptrace_fetch_registers (struct regcache *regcache, int regnum) { if (regnum == -1) - for (regnum = 0; regnum < NUM_REGS; regnum++) + for (regnum = 0; regnum < gdbarch_num_regs (current_gdbarch); regnum++) inf_ptrace_fetch_register (regcache, regnum); else inf_ptrace_fetch_register (regcache, regnum); @@ -717,7 +717,7 @@ void inf_ptrace_store_registers (struct regcache *regcache, int regnum) { if (regnum == -1) - for (regnum = 0; regnum < NUM_REGS; regnum++) + for (regnum = 0; regnum < gdbarch_num_regs (current_gdbarch); regnum++) inf_ptrace_store_register (regcache, regnum); else inf_ptrace_store_register (regcache, regnum); |