target/mips32: check read regs result in save context
Add result check for mips32_pracc_read_regs in mips32_save_context. Change-Id: Ie796d2b05a9feb11e246c2d0771b52cad4fb70db Signed-off-by: Walter Ji <walter.ji@oss.cipunited.com> Reviewed-on: https://review.openocd.org/c/openocd/+/7932 Reviewed-by: Oleksij Rempel <linux@rempel-privat.de> Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
This commit is contained in:
parent
18c64af135
commit
e887cfb9e8
|
@ -306,7 +306,11 @@ int mips32_save_context(struct target *target)
|
|||
struct mips32_common *mips32 = target_to_mips32(target);
|
||||
|
||||
/* read core registers */
|
||||
mips32_pracc_read_regs(mips32);
|
||||
int retval = mips32_pracc_read_regs(mips32);
|
||||
if (retval != ERROR_OK) {
|
||||
LOG_ERROR("Could not read core registers from target");
|
||||
return retval;
|
||||
}
|
||||
|
||||
for (i = 0; i < MIPS32_NUM_REGS; i++) {
|
||||
if (!mips32->core_cache->reg_list[i].valid)
|
||||
|
|
Loading…
Reference in New Issue