Skip to content

Commit 2b607dd

Browse files
authored
Currently svc $n always passes intno 2 to the hook, this PR should fix this.
1 parent f8c6db9 commit 2b607dd

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

qemu/accel/tcg/cpu-exec.c

+4
Original file line numberDiff line numberDiff line change
@@ -397,6 +397,10 @@ static inline bool cpu_handle_exception(CPUState *cpu, int *ret)
397397
#if defined(TARGET_PPC)
398398
CPUPPCState *env = &(POWERPC_CPU(uc->cpu)->env);
399399
env->nip += 4;
400+
#endif
401+
#if defined(TARGET_ARM)
402+
CPUARMState *env = &(ARM_CPU(uc->cpu)->env);
403+
cpu->exception_index=env->exception.syndrome&0xff; //save svc call number so it will be passed to uc-hook
400404
#endif
401405
// Unicorn: call registered interrupt callbacks
402406
catched = false;

0 commit comments

Comments
 (0)