From 3e3f273960b18167f33f032d88605deabbc5e436 Mon Sep 17 00:00:00 2001 From: Richard Earnshaw Date: Mon, 13 May 2002 16:25:08 +0000 Subject: [PATCH] * builtin-regs.c (value_of_builtin_reg): Correctly calculate the builtin reg number. --- gdb/ChangeLog | 5 +++++ gdb/builtin-regs.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 98247ae67fe..1b2ad4021c4 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2002-05-13 Richard Earnshaw + + * builtin-regs.c (value_of_builtin_reg): Correctly calculate the + builtin reg number. + 2002-05-13 Daniel Jacobowitz * ax-gdb.c (gen_sign_extend, gen_fetch, gen_usual_unary) diff --git a/gdb/builtin-regs.c b/gdb/builtin-regs.c index f9a67818bf2..8c488e3a557 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); } -- 2.30.2