diff options
-rw-r--r-- | gdb/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/builtin-regs.c | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 98247ae..1b2ad40 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2002-05-13 Richard Earnshaw <rearnsha@arm.com> + + * builtin-regs.c (value_of_builtin_reg): Correctly calculate the + builtin reg number. + 2002-05-13 Daniel Jacobowitz <drow@mvista.com> * ax-gdb.c (gen_sign_extend, gen_fetch, gen_usual_unary) diff --git a/gdb/builtin-regs.c b/gdb/builtin-regs.c index f9a6781..8c488e3 100644 --- a/gdb/builtin-regs.c +++ b/gdb/builtin-regs.c @@ -71,7 +71,7 @@ builtin_reg_map_name_to_regnum (const char *name, int len) struct value * value_of_builtin_reg (int regnum, struct frame_info *frame) { - int reg = regnum - NUM_REGS + NUM_PSEUDO_REGS; + int reg = regnum - (NUM_REGS + NUM_PSEUDO_REGS); gdb_assert (reg >= 0 && reg < nr_builtin_regs); return builtin_regs[reg].value (frame); } |