[PATCH 2/2] Fix debug exceptions from VM86
Petr Tesarik
hat at tesarici.cz
Mon Mar 27 02:15:29 CST 2006
Hi,
when I applied my last patch, I still experienced problems running
VM86 code in a debugger. This involved many issues:
1. save_vm86_context() didn't set the ContextFlags (which was not a
problem before).
2. we can't call raise_trap_exception() for VM86, as this routine ends
with a call to NtSetContextThread(), but that call can't return to
VM86.
3. the TF bit must not be reset in the exception context;
4. it should be reset by the DOS VM in winedos
This patch fixes points 4.
ChangeLog:
* Clear TF bit before passing control to a VM86 interrupt handler
-------------- next part --------------
Index: interrupts.c
===================================================================
RCS file: /home/wine/wine/dlls/winedos/interrupts.c,v
retrieving revision 1.26
diff -u -r1.26 interrupts.c
--- interrupts.c 3 Jan 2005 20:04:54 -0000 1.26
+++ interrupts.c 27 Mar 2006 08:13:22 -0000
@@ -514,8 +514,8 @@
context->SegCs = SELECTOROF( handler );
context->Eip = OFFSETOF( handler );
- /* Clear virtual interrupt flag. */
- context->EFlags &= ~VIF_MASK;
+ /* Clear virtual interrupt flag and trap flag. */
+ context->EFlags &= ~(VIF_MASK | TF_MASK);
}
}
More information about the wine-patches
mailing list