|
From: openocd-gerrit <ope...@us...> - 2023-10-25 01:34:28
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Main OpenOCD repository".
The branch, master has been updated
via e887cfb9e8e8e42513b38e09960849becc5d42e3 (commit)
from 18c64af13500342da5dc304cb3f2024078815bd4 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit e887cfb9e8e8e42513b38e09960849becc5d42e3
Author: Walter Ji <wal...@os...>
Date: Mon Oct 9 11:42:44 2023 +0800
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 <wal...@os...>
Reviewed-on: https://review.openocd.org/c/openocd/+/7932
Reviewed-by: Oleksij Rempel <li...@re...>
Tested-by: jenkins
Reviewed-by: Antonio Borneo <bor...@gm...>
diff --git a/src/target/mips32.c b/src/target/mips32.c
index 18160b237..99688b008 100644
--- a/src/target/mips32.c
+++ b/src/target/mips32.c
@@ -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)
-----------------------------------------------------------------------
Summary of changes:
src/target/mips32.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
hooks/post-receive
--
Main OpenOCD repository
|