Signed-off-by: Andreas Färber <afaerber@suse.de>
CPUState *cpu = ENV_GET_CPU(env);
cpu->current_tb = NULL;
CPUState *cpu = ENV_GET_CPU(env);
cpu->current_tb = NULL;
- siglongjmp(env->jmp_env, 1);
+ siglongjmp(cpu->jmp_env, 1);
}
/* exit the current TB from a signal handler. The host registers are
}
/* exit the current TB from a signal handler. The host registers are
#if defined(CONFIG_SOFTMMU)
void cpu_resume_from_signal(CPUArchState *env, void *puc)
{
#if defined(CONFIG_SOFTMMU)
void cpu_resume_from_signal(CPUArchState *env, void *puc)
{
+ CPUState *cpu = ENV_GET_CPU(env);
+
/* XXX: restore cpu registers saved in host registers */
env->exception_index = -1;
/* XXX: restore cpu registers saved in host registers */
env->exception_index = -1;
- siglongjmp(env->jmp_env, 1);
+ siglongjmp(cpu->jmp_env, 1);
/* prepare setjmp context for exception handling */
for(;;) {
/* prepare setjmp context for exception handling */
for(;;) {
- if (sigsetjmp(env->jmp_env, 0) == 0) {
+ if (sigsetjmp(cpu->jmp_env, 0) == 0) {
/* if an exception is pending, we execute it here */
if (env->exception_index >= 0) {
if (env->exception_index >= EXCP_INTERRUPT) {
/* if an exception is pending, we execute it here */
if (env->exception_index >= 0) {
if (env->exception_index >= EXCP_INTERRUPT) {
#endif
#include "config.h"
#endif
#include "config.h"
#include <inttypes.h>
#include "qemu/osdep.h"
#include "qemu/queue.h"
#include <inttypes.h>
#include "qemu/osdep.h"
#include "qemu/queue.h"
CPUWatchpoint *watchpoint_hit; \
\
/* Core interrupt code */ \
CPUWatchpoint *watchpoint_hit; \
\
/* Core interrupt code */ \
int exception_index; \
\
/* user data */ \
int exception_index; \
\
/* user data */ \
#define QEMU_CPU_H
#include <signal.h>
#define QEMU_CPU_H
#include <signal.h>
#include "hw/qdev-core.h"
#include "exec/hwaddr.h"
#include "qemu/queue.h"
#include "hw/qdev-core.h"
#include "exec/hwaddr.h"
#include "qemu/queue.h"
uint32_t interrupt_request;
int singlestep_enabled;
int64_t icount_extra;
uint32_t interrupt_request;
int singlestep_enabled;
int64_t icount_extra;
AddressSpace *as;
MemoryListener *tcg_as_listener;
AddressSpace *as;
MemoryListener *tcg_as_listener;
*/
void cpu_resume_from_signal(CPUArchState *env1, void *puc)
{
*/
void cpu_resume_from_signal(CPUArchState *env1, void *puc)
{
+ CPUState *cpu = ENV_GET_CPU(env1);
#ifdef __linux__
struct ucontext *uc = puc;
#elif defined(__OpenBSD__)
#ifdef __linux__
struct ucontext *uc = puc;
#elif defined(__OpenBSD__)
#endif
}
env1->exception_index = -1;
#endif
}
env1->exception_index = -1;
- siglongjmp(env1->jmp_env, 1);
+ siglongjmp(cpu->jmp_env, 1);
}
/* 'pc' is the host PC at which the exception was raised. 'address' is
}
/* 'pc' is the host PC at which the exception was raised. 'address' is