Skip to content

Commit e03109d

Browse files
committed
Respect users' decision for UC_ERR_INSN_INVALID
1 parent a9a54ae commit e03109d

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

qemu/accel/tcg/cpu-exec.c

+3-4
Original file line numberDiff line numberDiff line change
@@ -354,11 +354,10 @@ static inline bool cpu_handle_exception(CPUState *cpu, int *ret)
354354
}
355355
if (!catched) {
356356
uc->invalid_error = UC_ERR_INSN_INVALID;
357+
// we want to stop emulation
358+
*ret = EXCP_HLT;
359+
return true;
357360
}
358-
359-
// we want to stop emulation
360-
*ret = EXCP_HLT;
361-
return true;
362361
}
363362

364363
if (cpu->exception_index < 0) {

0 commit comments

Comments
 (0)