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 | |
parent | 803bdfe43083475c7df3db38dc96f4e20d05457d (diff) | |
download | gdb-845b344fd54ba381a826b271dd33682d1f148438.zip gdb-845b344fd54ba381a826b271dd33682d1f148438.tar.gz 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')
-rw-r--r-- | gdb/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/msp430-tdep.c | 6 |
2 files changed, 7 insertions, 4 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 68d8f34..3cb6cd7 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2017-04-10 Alan Hayward <alan.hayward@arm.com> + + * msp430-tdep.c (msp430_pseudo_register_read): Never return + REG_UNKNOWN. + 2017-04-10 Yao Qi <yao.qi@linaro.org> PR gdb/19942 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. */ |