Merge pull request #835 from en-sc/en-sc/fix-err-resume

target/riscv: Handle error code in resume_prep
This commit is contained in:
Tim Newsome 2023-04-11 09:54:47 -07:00 committed by GitHub
commit c454db3eee
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -1735,8 +1735,8 @@ static int resume_prep(struct target *target, int current,
RISCV_INFO(r);
LOG_TARGET_DEBUG(target, "target->state=%d", target->state);
if (!current)
riscv_set_register(target, GDB_REGNO_PC, address);
if (!current && riscv_set_register(target, GDB_REGNO_PC, address) != ERROR_OK)
return ERROR_FAIL;
if (target->debug_reason == DBG_REASON_WATCHPOINT) {
/* To be able to run off a trigger, disable all the triggers, step, and