diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2021-08-13 14:18:04 +0100 |
---|---|---|
committer | Laurent Vivier <laurent@vivier.eu> | 2021-09-23 14:42:55 +0200 |
commit | 1af354120dc4d9187ee1162b95ac84aafd7c4df0 (patch) | |
tree | b349fb2c7455e11016e1ed589a3c0d6902f669c6 /linux-user/arm | |
parent | 1fb6a87d0bc3a730ec90578cfdfb2ef7ac5b5d11 (diff) | |
download | qemu-1af354120dc4d9187ee1162b95ac84aafd7c4df0.zip qemu-1af354120dc4d9187ee1162b95ac84aafd7c4df0.tar.gz qemu-1af354120dc4d9187ee1162b95ac84aafd7c4df0.tar.bz2 |
linux-user/arm: Set siginfo_t addr field for SIGTRAP signals
When generating a TRAP_BRKPT SIGTRAP, set the siginfo_t addr field
to the PC where the breakpoint/singlestep trap occurred; this is
what the kernel does for this signal for this architecture.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20210813131809.28655-3-peter.maydell@linaro.org>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
Diffstat (limited to 'linux-user/arm')
-rw-r--r-- | linux-user/arm/cpu_loop.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/linux-user/arm/cpu_loop.c b/linux-user/arm/cpu_loop.c index 07032b3..0900d18 100644 --- a/linux-user/arm/cpu_loop.c +++ b/linux-user/arm/cpu_loop.c @@ -455,6 +455,7 @@ void cpu_loop(CPUARMState *env) info.si_signo = TARGET_SIGTRAP; info.si_errno = 0; info.si_code = TARGET_TRAP_BRKPT; + info._sifields._sigfault._addr = env->regs[15]; queue_signal(env, info.si_signo, QEMU_SI_FAULT, &info); break; case EXCP_KERNEL_TRAP: |