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/builtin-regs.c | |
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/builtin-regs.c')
-rw-r--r-- | gdb/builtin-regs.c | 2 |
1 files changed, 1 insertions, 1 deletions
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); } |