This commit is contained in:
Jan Matyas 2025-03-07 12:59:17 +03:00 committed by GitHub
commit 80a370b1e9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 5 additions and 2 deletions

View File

@ -1889,8 +1889,11 @@ static int handle_halt(struct target *target, bool announce)
if (target->debug_reason == DBG_REASON_BREAKPOINT) { if (target->debug_reason == DBG_REASON_BREAKPOINT) {
int retval; int retval;
if (riscv_semihosting(target, &retval) != 0) /* Don't try to handle semihosting before the target
return retval; * gets successfully examined. */
if (target_was_examined(target))
if (riscv_semihosting(target, &retval) != SEMIHOSTING_NONE)
return retval;
} }
if (announce) if (announce)