fix: semihosting_fileio display the unsupported info (#699)
the abnormal info display below: semihosting: unsupported call 0 semihosting: unsupported call 0 semihosting: unsupported call 0 semihosting: unsupported call 0 semihosting: unsupported call 0 semihosting: unsupported call 0 semihosting: unsupported call 0 semihosting: unsupported call 0 semihosting: unsupported call 0 semihosting: unsupported call 0 semihosting: unsupported call 0 the PC did not plus 4 before resume, which cause this abnormal info popup. Change-Id: I15c1e7426f1925e78f607c566976f9352216506f Signed-off-by: Wu Zhigang <zhigang.wu@starfivetech.com> Co-authored-by: Wu Zhigang <zhigang.wu@starfivetech.com>
This commit is contained in:
parent
a037b20f2e
commit
a408bdc8db
|
@ -155,16 +155,16 @@ semihosting_result_t riscv_semihosting(struct target *target, int *retval)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Resume right after the EBREAK 4 bytes instruction. */
|
||||||
|
*retval = riscv_set_register(target, GDB_REGNO_PC, pc + 4);
|
||||||
|
if (*retval != ERROR_OK)
|
||||||
|
return SEMI_ERROR;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Resume target if we are not waiting on a fileio
|
* Resume target if we are not waiting on a fileio
|
||||||
* operation to complete.
|
* operation to complete.
|
||||||
*/
|
*/
|
||||||
if (semihosting->is_resumable && !semihosting->hit_fileio) {
|
if (semihosting->is_resumable && !semihosting->hit_fileio) {
|
||||||
/* Resume right after the EBREAK 4 bytes instruction. */
|
|
||||||
*retval = riscv_set_register(target, GDB_REGNO_PC, pc + 4);
|
|
||||||
if (*retval != ERROR_OK)
|
|
||||||
return SEMI_ERROR;
|
|
||||||
|
|
||||||
LOG_DEBUG(" -> HANDLED");
|
LOG_DEBUG(" -> HANDLED");
|
||||||
return SEMI_HANDLED;
|
return SEMI_HANDLED;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue