From: Alan Hayward Date: Mon, 10 Apr 2017 14:01:53 +0000 (+0100) Subject: msp430: Don't use REG_UNKNOWN X-Git-Tag: gdb-8.0-release~155 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;ds=sidebyside;h=845b344fd54ba381a826b271dd33682d1f148438;p=external%2Fbinutils.git msp430: Don't use REG_UNKNOWN gdb/ * msp430-tdep.c (msp430_pseudo_register_read): Never return REG_UNKNOWN. --- 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 + + * msp430-tdep.c (msp430_pseudo_register_read): Never return + REG_UNKNOWN. + 2017-04-10 Yao Qi 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. */