mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-15 06:01:58 -06:00
linux-user: Introduce host_sigcontext
Do not directly access ucontext_t as the third signal parameter. This is preparation for a sparc64 fix. Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
This commit is contained in:
parent
c8c89a6a30
commit
9940799bde
12 changed files with 80 additions and 47 deletions
|
@ -11,6 +11,9 @@
|
||||||
#ifndef AARCH64_HOST_SIGNAL_H
|
#ifndef AARCH64_HOST_SIGNAL_H
|
||||||
#define AARCH64_HOST_SIGNAL_H
|
#define AARCH64_HOST_SIGNAL_H
|
||||||
|
|
||||||
|
/* The third argument to a SA_SIGINFO handler is ucontext_t. */
|
||||||
|
typedef ucontext_t host_sigcontext;
|
||||||
|
|
||||||
/* Pre-3.16 kernel headers don't have these, so provide fallback definitions */
|
/* Pre-3.16 kernel headers don't have these, so provide fallback definitions */
|
||||||
#ifndef ESR_MAGIC
|
#ifndef ESR_MAGIC
|
||||||
#define ESR_MAGIC 0x45535201
|
#define ESR_MAGIC 0x45535201
|
||||||
|
@ -20,7 +23,7 @@ struct esr_context {
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static inline struct _aarch64_ctx *first_ctx(ucontext_t *uc)
|
static inline struct _aarch64_ctx *first_ctx(host_sigcontext *uc)
|
||||||
{
|
{
|
||||||
return (struct _aarch64_ctx *)&uc->uc_mcontext.__reserved;
|
return (struct _aarch64_ctx *)&uc->uc_mcontext.__reserved;
|
||||||
}
|
}
|
||||||
|
@ -30,22 +33,22 @@ static inline struct _aarch64_ctx *next_ctx(struct _aarch64_ctx *hdr)
|
||||||
return (struct _aarch64_ctx *)((char *)hdr + hdr->size);
|
return (struct _aarch64_ctx *)((char *)hdr + hdr->size);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline uintptr_t host_signal_pc(ucontext_t *uc)
|
static inline uintptr_t host_signal_pc(host_sigcontext *uc)
|
||||||
{
|
{
|
||||||
return uc->uc_mcontext.pc;
|
return uc->uc_mcontext.pc;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void host_signal_set_pc(ucontext_t *uc, uintptr_t pc)
|
static inline void host_signal_set_pc(host_sigcontext *uc, uintptr_t pc)
|
||||||
{
|
{
|
||||||
uc->uc_mcontext.pc = pc;
|
uc->uc_mcontext.pc = pc;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void *host_signal_mask(ucontext_t *uc)
|
static inline void *host_signal_mask(host_sigcontext *uc)
|
||||||
{
|
{
|
||||||
return &uc->uc_sigmask;
|
return &uc->uc_sigmask;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline bool host_signal_write(siginfo_t *info, ucontext_t *uc)
|
static inline bool host_signal_write(siginfo_t *info, host_sigcontext *uc)
|
||||||
{
|
{
|
||||||
struct _aarch64_ctx *hdr;
|
struct _aarch64_ctx *hdr;
|
||||||
uint32_t insn;
|
uint32_t insn;
|
||||||
|
|
|
@ -11,22 +11,25 @@
|
||||||
#ifndef ALPHA_HOST_SIGNAL_H
|
#ifndef ALPHA_HOST_SIGNAL_H
|
||||||
#define ALPHA_HOST_SIGNAL_H
|
#define ALPHA_HOST_SIGNAL_H
|
||||||
|
|
||||||
static inline uintptr_t host_signal_pc(ucontext_t *uc)
|
/* The third argument to a SA_SIGINFO handler is ucontext_t. */
|
||||||
|
typedef ucontext_t host_sigcontext;
|
||||||
|
|
||||||
|
static inline uintptr_t host_signal_pc(host_sigcontext *uc)
|
||||||
{
|
{
|
||||||
return uc->uc_mcontext.sc_pc;
|
return uc->uc_mcontext.sc_pc;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void host_signal_set_pc(ucontext_t *uc, uintptr_t pc)
|
static inline void host_signal_set_pc(host_sigcontext *uc, uintptr_t pc)
|
||||||
{
|
{
|
||||||
uc->uc_mcontext.sc_pc = pc;
|
uc->uc_mcontext.sc_pc = pc;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void *host_signal_mask(ucontext_t *uc)
|
static inline void *host_signal_mask(host_sigcontext *uc)
|
||||||
{
|
{
|
||||||
return &uc->uc_sigmask;
|
return &uc->uc_sigmask;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline bool host_signal_write(siginfo_t *info, ucontext_t *uc)
|
static inline bool host_signal_write(siginfo_t *info, host_sigcontext *uc)
|
||||||
{
|
{
|
||||||
uint32_t *pc = (uint32_t *)host_signal_pc(uc);
|
uint32_t *pc = (uint32_t *)host_signal_pc(uc);
|
||||||
uint32_t insn = *pc;
|
uint32_t insn = *pc;
|
||||||
|
|
|
@ -11,22 +11,25 @@
|
||||||
#ifndef ARM_HOST_SIGNAL_H
|
#ifndef ARM_HOST_SIGNAL_H
|
||||||
#define ARM_HOST_SIGNAL_H
|
#define ARM_HOST_SIGNAL_H
|
||||||
|
|
||||||
static inline uintptr_t host_signal_pc(ucontext_t *uc)
|
/* The third argument to a SA_SIGINFO handler is ucontext_t. */
|
||||||
|
typedef ucontext_t host_sigcontext;
|
||||||
|
|
||||||
|
static inline uintptr_t host_signal_pc(host_sigcontext *uc)
|
||||||
{
|
{
|
||||||
return uc->uc_mcontext.arm_pc;
|
return uc->uc_mcontext.arm_pc;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void host_signal_set_pc(ucontext_t *uc, uintptr_t pc)
|
static inline void host_signal_set_pc(host_sigcontext *uc, uintptr_t pc)
|
||||||
{
|
{
|
||||||
uc->uc_mcontext.arm_pc = pc;
|
uc->uc_mcontext.arm_pc = pc;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void *host_signal_mask(ucontext_t *uc)
|
static inline void *host_signal_mask(host_sigcontext *uc)
|
||||||
{
|
{
|
||||||
return &uc->uc_sigmask;
|
return &uc->uc_sigmask;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline bool host_signal_write(siginfo_t *info, ucontext_t *uc)
|
static inline bool host_signal_write(siginfo_t *info, host_sigcontext *uc)
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
* In the FSR, bit 11 is WnR, assuming a v6 or
|
* In the FSR, bit 11 is WnR, assuming a v6 or
|
||||||
|
|
|
@ -11,22 +11,25 @@
|
||||||
#ifndef I386_HOST_SIGNAL_H
|
#ifndef I386_HOST_SIGNAL_H
|
||||||
#define I386_HOST_SIGNAL_H
|
#define I386_HOST_SIGNAL_H
|
||||||
|
|
||||||
static inline uintptr_t host_signal_pc(ucontext_t *uc)
|
/* The third argument to a SA_SIGINFO handler is ucontext_t. */
|
||||||
|
typedef ucontext_t host_sigcontext;
|
||||||
|
|
||||||
|
static inline uintptr_t host_signal_pc(host_sigcontext *uc)
|
||||||
{
|
{
|
||||||
return uc->uc_mcontext.gregs[REG_EIP];
|
return uc->uc_mcontext.gregs[REG_EIP];
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void host_signal_set_pc(ucontext_t *uc, uintptr_t pc)
|
static inline void host_signal_set_pc(host_sigcontext *uc, uintptr_t pc)
|
||||||
{
|
{
|
||||||
uc->uc_mcontext.gregs[REG_EIP] = pc;
|
uc->uc_mcontext.gregs[REG_EIP] = pc;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void *host_signal_mask(ucontext_t *uc)
|
static inline void *host_signal_mask(host_sigcontext *uc)
|
||||||
{
|
{
|
||||||
return &uc->uc_sigmask;
|
return &uc->uc_sigmask;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline bool host_signal_write(siginfo_t *info, ucontext_t *uc)
|
static inline bool host_signal_write(siginfo_t *info, host_sigcontext *uc)
|
||||||
{
|
{
|
||||||
return uc->uc_mcontext.gregs[REG_TRAPNO] == 0xe
|
return uc->uc_mcontext.gregs[REG_TRAPNO] == 0xe
|
||||||
&& (uc->uc_mcontext.gregs[REG_ERR] & 0x2);
|
&& (uc->uc_mcontext.gregs[REG_ERR] & 0x2);
|
||||||
|
|
|
@ -11,22 +11,25 @@
|
||||||
#ifndef LOONGARCH64_HOST_SIGNAL_H
|
#ifndef LOONGARCH64_HOST_SIGNAL_H
|
||||||
#define LOONGARCH64_HOST_SIGNAL_H
|
#define LOONGARCH64_HOST_SIGNAL_H
|
||||||
|
|
||||||
static inline uintptr_t host_signal_pc(ucontext_t *uc)
|
/* The third argument to a SA_SIGINFO handler is ucontext_t. */
|
||||||
|
typedef ucontext_t host_sigcontext;
|
||||||
|
|
||||||
|
static inline uintptr_t host_signal_pc(host_sigcontext *uc)
|
||||||
{
|
{
|
||||||
return uc->uc_mcontext.__pc;
|
return uc->uc_mcontext.__pc;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void host_signal_set_pc(ucontext_t *uc, uintptr_t pc)
|
static inline void host_signal_set_pc(host_sigcontext *uc, uintptr_t pc)
|
||||||
{
|
{
|
||||||
uc->uc_mcontext.__pc = pc;
|
uc->uc_mcontext.__pc = pc;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void *host_signal_mask(ucontext_t *uc)
|
static inline void *host_signal_mask(host_sigcontext *uc)
|
||||||
{
|
{
|
||||||
return &uc->uc_sigmask;
|
return &uc->uc_sigmask;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline bool host_signal_write(siginfo_t *info, ucontext_t *uc)
|
static inline bool host_signal_write(siginfo_t *info, host_sigcontext *uc)
|
||||||
{
|
{
|
||||||
const uint32_t *pinsn = (const uint32_t *)host_signal_pc(uc);
|
const uint32_t *pinsn = (const uint32_t *)host_signal_pc(uc);
|
||||||
uint32_t insn = pinsn[0];
|
uint32_t insn = pinsn[0];
|
||||||
|
|
|
@ -11,17 +11,20 @@
|
||||||
#ifndef MIPS_HOST_SIGNAL_H
|
#ifndef MIPS_HOST_SIGNAL_H
|
||||||
#define MIPS_HOST_SIGNAL_H
|
#define MIPS_HOST_SIGNAL_H
|
||||||
|
|
||||||
static inline uintptr_t host_signal_pc(ucontext_t *uc)
|
/* The third argument to a SA_SIGINFO handler is ucontext_t. */
|
||||||
|
typedef ucontext_t host_sigcontext;
|
||||||
|
|
||||||
|
static inline uintptr_t host_signal_pc(host_sigcontext *uc)
|
||||||
{
|
{
|
||||||
return uc->uc_mcontext.pc;
|
return uc->uc_mcontext.pc;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void host_signal_set_pc(ucontext_t *uc, uintptr_t pc)
|
static inline void host_signal_set_pc(host_sigcontext *uc, uintptr_t pc)
|
||||||
{
|
{
|
||||||
uc->uc_mcontext.pc = pc;
|
uc->uc_mcontext.pc = pc;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void *host_signal_mask(ucontext_t *uc)
|
static inline void *host_signal_mask(host_sigcontext *uc)
|
||||||
{
|
{
|
||||||
return &uc->uc_sigmask;
|
return &uc->uc_sigmask;
|
||||||
}
|
}
|
||||||
|
@ -30,7 +33,7 @@ static inline void *host_signal_mask(ucontext_t *uc)
|
||||||
#error "Unsupported encoding"
|
#error "Unsupported encoding"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static inline bool host_signal_write(siginfo_t *info, ucontext_t *uc)
|
static inline bool host_signal_write(siginfo_t *info, host_sigcontext *uc)
|
||||||
{
|
{
|
||||||
uint32_t insn = *(uint32_t *)host_signal_pc(uc);
|
uint32_t insn = *(uint32_t *)host_signal_pc(uc);
|
||||||
|
|
||||||
|
|
|
@ -11,22 +11,25 @@
|
||||||
#ifndef PPC_HOST_SIGNAL_H
|
#ifndef PPC_HOST_SIGNAL_H
|
||||||
#define PPC_HOST_SIGNAL_H
|
#define PPC_HOST_SIGNAL_H
|
||||||
|
|
||||||
static inline uintptr_t host_signal_pc(ucontext_t *uc)
|
/* The third argument to a SA_SIGINFO handler is ucontext_t. */
|
||||||
|
typedef ucontext_t host_sigcontext;
|
||||||
|
|
||||||
|
static inline uintptr_t host_signal_pc(host_sigcontext *uc)
|
||||||
{
|
{
|
||||||
return uc->uc_mcontext.regs->nip;
|
return uc->uc_mcontext.regs->nip;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void host_signal_set_pc(ucontext_t *uc, uintptr_t pc)
|
static inline void host_signal_set_pc(host_sigcontext *uc, uintptr_t pc)
|
||||||
{
|
{
|
||||||
uc->uc_mcontext.regs->nip = pc;
|
uc->uc_mcontext.regs->nip = pc;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void *host_signal_mask(ucontext_t *uc)
|
static inline void *host_signal_mask(host_sigcontext *uc)
|
||||||
{
|
{
|
||||||
return &uc->uc_sigmask;
|
return &uc->uc_sigmask;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline bool host_signal_write(siginfo_t *info, ucontext_t *uc)
|
static inline bool host_signal_write(siginfo_t *info, host_sigcontext *uc)
|
||||||
{
|
{
|
||||||
return uc->uc_mcontext.regs->trap != 0x400
|
return uc->uc_mcontext.regs->trap != 0x400
|
||||||
&& (uc->uc_mcontext.regs->dsisr & 0x02000000);
|
&& (uc->uc_mcontext.regs->dsisr & 0x02000000);
|
||||||
|
|
|
@ -11,22 +11,25 @@
|
||||||
#ifndef RISCV_HOST_SIGNAL_H
|
#ifndef RISCV_HOST_SIGNAL_H
|
||||||
#define RISCV_HOST_SIGNAL_H
|
#define RISCV_HOST_SIGNAL_H
|
||||||
|
|
||||||
static inline uintptr_t host_signal_pc(ucontext_t *uc)
|
/* The third argument to a SA_SIGINFO handler is ucontext_t. */
|
||||||
|
typedef ucontext_t host_sigcontext;
|
||||||
|
|
||||||
|
static inline uintptr_t host_signal_pc(host_sigcontext *uc)
|
||||||
{
|
{
|
||||||
return uc->uc_mcontext.__gregs[REG_PC];
|
return uc->uc_mcontext.__gregs[REG_PC];
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void host_signal_set_pc(ucontext_t *uc, uintptr_t pc)
|
static inline void host_signal_set_pc(host_sigcontext *uc, uintptr_t pc)
|
||||||
{
|
{
|
||||||
uc->uc_mcontext.__gregs[REG_PC] = pc;
|
uc->uc_mcontext.__gregs[REG_PC] = pc;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void *host_signal_mask(ucontext_t *uc)
|
static inline void *host_signal_mask(host_sigcontext *uc)
|
||||||
{
|
{
|
||||||
return &uc->uc_sigmask;
|
return &uc->uc_sigmask;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline bool host_signal_write(siginfo_t *info, ucontext_t *uc)
|
static inline bool host_signal_write(siginfo_t *info, host_sigcontext *uc)
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
* Detect store by reading the instruction at the program counter.
|
* Detect store by reading the instruction at the program counter.
|
||||||
|
|
|
@ -11,22 +11,25 @@
|
||||||
#ifndef S390_HOST_SIGNAL_H
|
#ifndef S390_HOST_SIGNAL_H
|
||||||
#define S390_HOST_SIGNAL_H
|
#define S390_HOST_SIGNAL_H
|
||||||
|
|
||||||
static inline uintptr_t host_signal_pc(ucontext_t *uc)
|
/* The third argument to a SA_SIGINFO handler is ucontext_t. */
|
||||||
|
typedef ucontext_t host_sigcontext;
|
||||||
|
|
||||||
|
static inline uintptr_t host_signal_pc(host_sigcontext *uc)
|
||||||
{
|
{
|
||||||
return uc->uc_mcontext.psw.addr;
|
return uc->uc_mcontext.psw.addr;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void host_signal_set_pc(ucontext_t *uc, uintptr_t pc)
|
static inline void host_signal_set_pc(host_sigcontext *uc, uintptr_t pc)
|
||||||
{
|
{
|
||||||
uc->uc_mcontext.psw.addr = pc;
|
uc->uc_mcontext.psw.addr = pc;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void *host_signal_mask(ucontext_t *uc)
|
static inline void *host_signal_mask(host_sigcontext *uc)
|
||||||
{
|
{
|
||||||
return &uc->uc_sigmask;
|
return &uc->uc_sigmask;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline bool host_signal_write(siginfo_t *info, ucontext_t *uc)
|
static inline bool host_signal_write(siginfo_t *info, host_sigcontext *uc)
|
||||||
{
|
{
|
||||||
uint16_t *pinsn = (uint16_t *)host_signal_pc(uc);
|
uint16_t *pinsn = (uint16_t *)host_signal_pc(uc);
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,10 @@
|
||||||
#ifndef SPARC_HOST_SIGNAL_H
|
#ifndef SPARC_HOST_SIGNAL_H
|
||||||
#define SPARC_HOST_SIGNAL_H
|
#define SPARC_HOST_SIGNAL_H
|
||||||
|
|
||||||
static inline uintptr_t host_signal_pc(ucontext_t *uc)
|
/* FIXME: the third argument to a SA_SIGINFO handler is *not* ucontext_t. */
|
||||||
|
typedef ucontext_t host_sigcontext;
|
||||||
|
|
||||||
|
static inline uintptr_t host_signal_pc(host_sigcontext *uc)
|
||||||
{
|
{
|
||||||
#ifdef __arch64__
|
#ifdef __arch64__
|
||||||
return uc->uc_mcontext.mc_gregs[MC_PC];
|
return uc->uc_mcontext.mc_gregs[MC_PC];
|
||||||
|
@ -20,7 +23,7 @@ static inline uintptr_t host_signal_pc(ucontext_t *uc)
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void host_signal_set_pc(ucontext_t *uc, uintptr_t pc)
|
static inline void host_signal_set_pc(host_sigcontext *uc, uintptr_t pc)
|
||||||
{
|
{
|
||||||
#ifdef __arch64__
|
#ifdef __arch64__
|
||||||
uc->uc_mcontext.mc_gregs[MC_PC] = pc;
|
uc->uc_mcontext.mc_gregs[MC_PC] = pc;
|
||||||
|
@ -29,12 +32,12 @@ static inline void host_signal_set_pc(ucontext_t *uc, uintptr_t pc)
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void *host_signal_mask(ucontext_t *uc)
|
static inline void *host_signal_mask(host_sigcontext *uc)
|
||||||
{
|
{
|
||||||
return &uc->uc_sigmask;
|
return &uc->uc_sigmask;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline bool host_signal_write(siginfo_t *info, ucontext_t *uc)
|
static inline bool host_signal_write(siginfo_t *info, host_sigcontext *uc)
|
||||||
{
|
{
|
||||||
uint32_t insn = *(uint32_t *)host_signal_pc(uc);
|
uint32_t insn = *(uint32_t *)host_signal_pc(uc);
|
||||||
|
|
||||||
|
|
|
@ -10,22 +10,25 @@
|
||||||
#ifndef X86_64_HOST_SIGNAL_H
|
#ifndef X86_64_HOST_SIGNAL_H
|
||||||
#define X86_64_HOST_SIGNAL_H
|
#define X86_64_HOST_SIGNAL_H
|
||||||
|
|
||||||
static inline uintptr_t host_signal_pc(ucontext_t *uc)
|
/* The third argument to a SA_SIGINFO handler is ucontext_t. */
|
||||||
|
typedef ucontext_t host_sigcontext;
|
||||||
|
|
||||||
|
static inline uintptr_t host_signal_pc(host_sigcontext *uc)
|
||||||
{
|
{
|
||||||
return uc->uc_mcontext.gregs[REG_RIP];
|
return uc->uc_mcontext.gregs[REG_RIP];
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void host_signal_set_pc(ucontext_t *uc, uintptr_t pc)
|
static inline void host_signal_set_pc(host_sigcontext *uc, uintptr_t pc)
|
||||||
{
|
{
|
||||||
uc->uc_mcontext.gregs[REG_RIP] = pc;
|
uc->uc_mcontext.gregs[REG_RIP] = pc;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void *host_signal_mask(ucontext_t *uc)
|
static inline void *host_signal_mask(host_sigcontext *uc)
|
||||||
{
|
{
|
||||||
return &uc->uc_sigmask;
|
return &uc->uc_sigmask;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline bool host_signal_write(siginfo_t *info, ucontext_t *uc)
|
static inline bool host_signal_write(siginfo_t *info, host_sigcontext *uc)
|
||||||
{
|
{
|
||||||
return uc->uc_mcontext.gregs[REG_TRAPNO] == 0xe
|
return uc->uc_mcontext.gregs[REG_TRAPNO] == 0xe
|
||||||
&& (uc->uc_mcontext.gregs[REG_ERR] & 0x2);
|
&& (uc->uc_mcontext.gregs[REG_ERR] & 0x2);
|
||||||
|
|
|
@ -800,7 +800,7 @@ void queue_signal(CPUArchState *env, int sig, int si_type,
|
||||||
/* Adjust the signal context to rewind out of safe-syscall if we're in it */
|
/* Adjust the signal context to rewind out of safe-syscall if we're in it */
|
||||||
static inline void rewind_if_in_safe_syscall(void *puc)
|
static inline void rewind_if_in_safe_syscall(void *puc)
|
||||||
{
|
{
|
||||||
ucontext_t *uc = (ucontext_t *)puc;
|
host_sigcontext *uc = (host_sigcontext *)puc;
|
||||||
uintptr_t pcreg = host_signal_pc(uc);
|
uintptr_t pcreg = host_signal_pc(uc);
|
||||||
|
|
||||||
if (pcreg > (uintptr_t)safe_syscall_start
|
if (pcreg > (uintptr_t)safe_syscall_start
|
||||||
|
@ -815,7 +815,7 @@ static void host_signal_handler(int host_sig, siginfo_t *info, void *puc)
|
||||||
CPUState *cpu = env_cpu(env);
|
CPUState *cpu = env_cpu(env);
|
||||||
TaskState *ts = cpu->opaque;
|
TaskState *ts = cpu->opaque;
|
||||||
target_siginfo_t tinfo;
|
target_siginfo_t tinfo;
|
||||||
ucontext_t *uc = puc;
|
host_sigcontext *uc = puc;
|
||||||
struct emulated_sigtable *k;
|
struct emulated_sigtable *k;
|
||||||
int guest_sig;
|
int guest_sig;
|
||||||
uintptr_t pc = 0;
|
uintptr_t pc = 0;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue