diff options
author | Richard Earnshaw <richard.earnshaw@arm.com> | 2002-05-13 16:25:08 +0000 |
---|---|---|
committer | Richard Earnshaw <richard.earnshaw@arm.com> | 2002-05-13 16:25:08 +0000 |
commit | 3e3f273960b18167f33f032d88605deabbc5e436 (patch) | |
tree | a593ed76c1a101fc0d47374f582bfcd7e4d32b78 /gdb | |
parent | 942e7dd9113bfab19db743a7597599579689d77c (diff) | |
download | gdb-3e3f273960b18167f33f032d88605deabbc5e436.zip gdb-3e3f273960b18167f33f032d88605deabbc5e436.tar.gz gdb-3e3f273960b18167f33f032d88605deabbc5e436.tar.bz2 |
* builtin-regs.c (value_of_builtin_reg): Correctly calculate the
builtin reg number.
Diffstat (limited to 'gdb')
-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); } |