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:
commit
c454db3eee
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue