summaryrefslogtreecommitdiffstats
path: root/target-i386/exec.h
diff options
context:
space:
mode:
authorJason Wessel <jason.wessel@windriver.com>2010-01-26 16:29:50 -0600
committerAurelien Jarno <aurelien@aurel32.net>2010-02-28 19:20:02 +0100
commit63a54736f31f9e11da6fb52319bba26e7d24f571 (patch)
tree230a6acdea201b38b7b3373c34d4ac2acd8c3e5d /target-i386/exec.h
parent6049f4f831c6f409031dfa09282b38d0cbaecad8 (diff)
downloadhqemu-63a54736f31f9e11da6fb52319bba26e7d24f571.zip
hqemu-63a54736f31f9e11da6fb52319bba26e7d24f571.tar.gz
target-i386: fix crash on x86 32bit linux host with hw breakpoint exceptions
If you make use of hw breakpoints on a 32bit x86 linux host, qemu will segmentation fault when processing the exception. The problem is that the value of env is stored in $ebp in the op_helper raise_exception() function, and it can have the wrong value when calling it from non generated code. It is possible to work around the problem by restoring the value of env before calling raise_exception() using a new helper function that takes (CPUState *) as one of the arguments. Signed-off-by: Jason Wessel <jason.wessel@windriver.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Diffstat (limited to 'target-i386/exec.h')
-rw-r--r--target-i386/exec.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/target-i386/exec.h b/target-i386/exec.h
index 1fd74fd..4ff3c57 100644
--- a/target-i386/exec.h
+++ b/target-i386/exec.h
@@ -73,6 +73,7 @@ void do_interrupt_user(int intno, int is_int, int error_code,
target_ulong next_eip);
void QEMU_NORETURN raise_exception_err(int exception_index, int error_code);
void QEMU_NORETURN raise_exception(int exception_index);
+void QEMU_NORETURN raise_exception_env(int exception_index, CPUState *nenv);
void do_smm_enter(void);
/* n must be a constant to be efficient */
OpenPOWER on IntegriCloud