diff options
author | Alan Hayward <alan.hayward@arm.com> | 2017-04-10 15:01:53 +0100 |
---|---|---|
committer | Alan Hayward <alan.hayward@arm.com> | 2017-04-10 15:01:53 +0100 |
commit | 845b344fd54ba381a826b271dd33682d1f148438 (patch) | |
tree | b81e180280fcf5e53ad727b411f8e514fc758acf /gdb/msp430-tdep.c | |
parent | 803bdfe43083475c7df3db38dc96f4e20d05457d (diff) | |
download | fsf-binutils-gdb-845b344fd54ba381a826b271dd33682d1f148438.zip fsf-binutils-gdb-845b344fd54ba381a826b271dd33682d1f148438.tar.gz fsf-binutils-gdb-845b344fd54ba381a826b271dd33682d1f148438.tar.bz2 |
msp430: Don't use REG_UNKNOWN
gdb/
* msp430-tdep.c (msp430_pseudo_register_read): Never return
REG_UNKNOWN.
Diffstat (limited to 'gdb/msp430-tdep.c')
-rw-r--r-- | gdb/msp430-tdep.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/gdb/msp430-tdep.c b/gdb/msp430-tdep.c index 75329df..d9eebf0 100644 --- a/gdb/msp430-tdep.c +++ b/gdb/msp430-tdep.c @@ -221,10 +221,9 @@ msp430_pseudo_register_read (struct gdbarch *gdbarch, struct regcache *regcache, int regnum, gdb_byte *buffer) { - enum register_status status = REG_UNKNOWN; - if (MSP430_NUM_REGS <= regnum && regnum < MSP430_NUM_TOTAL_REGS) { + enum register_status status; ULONGEST val; enum bfd_endian byte_order = gdbarch_byte_order (gdbarch); int regsize = register_size (gdbarch, regnum); @@ -234,11 +233,10 @@ msp430_pseudo_register_read (struct gdbarch *gdbarch, if (status == REG_VALID) store_unsigned_integer (buffer, regsize, byte_order, val); + return status; } else gdb_assert_not_reached ("invalid pseudo register number"); - - return status; } /* Implement the "pseudo_register_write" gdbarch method. */ |