Fix regression: We should triage MIPS internal exceptions to Unicorn exceptions

This commit is contained in:
2024-12-07 17:09:59 +08:00
parent c22651c9fe
commit 3b2f54fc61
3 changed files with 24 additions and 1 deletions

View File

@@ -408,7 +408,9 @@ static inline bool cpu_handle_exception(CPUState *cpu, int *ret)
// Unicorn: If un-catched interrupt, stop executions.
if (!catched) {
// printf("AAAAAAAAAAAA\n"); qq
uc->invalid_error = UC_ERR_EXCEPTION;
if (uc->invalid_error == UC_ERR_OK) {
uc->invalid_error = UC_ERR_EXCEPTION;
}
cpu->halted = 1;
*ret = EXCP_HLT;
return true;