diff options
author | Richard Henderson <richard.henderson@linaro.org> | 2021-11-23 11:33:14 +0100 |
---|---|---|
committer | Richard Henderson <richard.henderson@linaro.org> | 2021-11-23 11:33:14 +0100 |
commit | 73e0f70e097b7c92a5ce16ee35b53afe119b20d7 (patch) | |
tree | 367c83eab788d75083b87ac1528de1eed5f72329 /linux-user/host/x86_64/host-signal.h | |
parent | 3c2a46d5286b475ce9fc81cbf0ed47af5adeff6b (diff) | |
parent | 07637888687bfecf3c0cc8351c5c24f29a611691 (diff) |
Merge tag 'pull-lu-20211123' of https://gitlab.com/rth7680/qemu into staging
Create common rewind_if_in_safe_syscall function.
Resolves pointer type issues with uc_mcontext.pc
on aarch64 between glibc and musl.
# gpg: Signature made Tue 23 Nov 2021 09:47:07 AM CET
# gpg: using RSA key 7A481E78868B4DB6A85A05C064DF38E8AF7E215F
# gpg: issuer "richard.henderson@linaro.org"
# gpg: Good signature from "Richard Henderson <richard.henderson@linaro.org>" [ultimate]
* tag 'pull-lu-20211123' of https://gitlab.com/rth7680/qemu:
linux-user/signal.c: Create a common rewind_if_in_safe_syscall
linux-user: Add host_signal_set_pc to set pc in mcontext
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'linux-user/host/x86_64/host-signal.h')
-rw-r--r-- | linux-user/host/x86_64/host-signal.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/linux-user/host/x86_64/host-signal.h b/linux-user/host/x86_64/host-signal.h index 883d2fcf65..c71d597eb2 100644 --- a/linux-user/host/x86_64/host-signal.h +++ b/linux-user/host/x86_64/host-signal.h @@ -15,6 +15,11 @@ static inline uintptr_t host_signal_pc(ucontext_t *uc) return uc->uc_mcontext.gregs[REG_RIP]; } +static inline void host_signal_set_pc(ucontext_t *uc, uintptr_t pc) +{ + uc->uc_mcontext.gregs[REG_RIP] = pc; +} + static inline bool host_signal_write(siginfo_t *info, ucontext_t *uc) { return uc->uc_mcontext.gregs[REG_TRAPNO] == 0xe |