summaryrefslogtreecommitdiffstats
path: root/linux-user/host/arm
diff options
context:
space:
mode:
authorWarner Losh2021-11-13 05:55:59 +0100
committerRichard Henderson2021-11-23 01:47:01 +0100
commitc6cda6a44a8adaeb30bd6dc185f021809625433d (patch)
tree89da6580df84c90fb5f843f99931bf6a0d421f3a /linux-user/host/arm
parentMerge tag 'pull-target-arm-20211122-1' of https://git.linaro.org/people/pmayd... (diff)
downloadqemu-c6cda6a44a8adaeb30bd6dc185f021809625433d.tar.gz
qemu-c6cda6a44a8adaeb30bd6dc185f021809625433d.tar.xz
qemu-c6cda6a44a8adaeb30bd6dc185f021809625433d.zip
linux-user: Add host_signal_set_pc to set pc in mcontext
Add a new function host_signal_set_pc to set the next pc in an mcontext. The caller should ensure this is a valid PC for execution. Acked-by: Laurent Vivier <laurent@vivier.eu> Signed-off-by: Warner Losh <imp@bsdimp.com> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20211113045603.60391-2-imp@bsdimp.com> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'linux-user/host/arm')
-rw-r--r--linux-user/host/arm/host-signal.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/linux-user/host/arm/host-signal.h b/linux-user/host/arm/host-signal.h
index efb165c0c5..6c095773c0 100644
--- a/linux-user/host/arm/host-signal.h
+++ b/linux-user/host/arm/host-signal.h
@@ -16,6 +16,11 @@ static inline uintptr_t host_signal_pc(ucontext_t *uc)
return uc->uc_mcontext.arm_pc;
}
+static inline void host_signal_set_pc(ucontext_t *uc, uintptr_t pc)
+{
+ uc->uc_mcontext.arm_pc = pc;
+}
+
static inline bool host_signal_write(siginfo_t *info, ucontext_t *uc)
{
/*