Petr Tesarik : ntdll: Fix debug exceptions from VM86.

Alexandre Julliard julliard at wine.codeweavers.com
Mon Mar 27 05:29:06 CST 2006


Module: wine
Branch: refs/heads/master
Commit: e748a77e1ae75d828c4340733f2f1107ec6ac2d2
URL:    http://source.winehq.org/git/?p=wine.git;a=commit;h=e748a77e1ae75d828c4340733f2f1107ec6ac2d2

Author: Petr Tesarik <hat at tesarici.cz>
Date:   Mon Mar 27 10:12:02 2006 +0200

ntdll: Fix debug exceptions from VM86.

- Set ContextFlags accordingly in save_vm86_context().
- Raise debug exceptions correctly for debug exceptions.
- Do not clear TF bit for VM86-generated debug exceptions.

---

 dlls/ntdll/signal_i386.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/dlls/ntdll/signal_i386.c b/dlls/ntdll/signal_i386.c
index 727223d..a9f2589 100644
--- a/dlls/ntdll/signal_i386.c
+++ b/dlls/ntdll/signal_i386.c
@@ -531,6 +531,7 @@ static inline TEB *get_current_teb(void)
  */
 static void save_vm86_context( CONTEXT *context, const struct vm86plus_struct *vm86 )
 {
+    context->ContextFlags = CONTEXT_FULL;
     context->Eax    = vm86->regs.eax;
     context->Ebx    = vm86->regs.ebx;
     context->Ecx    = vm86->regs.ecx;
@@ -1528,7 +1529,7 @@ void __wine_enter_vm86( CONTEXT *context
         case VM86_TRAP: /* return due to DOS-debugger request */
             switch(VM86_ARG(res))
             {
-            case TRAP_x86_TRCTRAP:  /* Single-step exception, single step flag is cleared by raise_trap_exception */
+            case TRAP_x86_TRCTRAP:  /* Single-step exception */
                 rec.ExceptionCode = EXCEPTION_SINGLE_STEP;
                 break;
             case TRAP_x86_BPTFLT:   /* Breakpoint exception */
@@ -1538,8 +1539,7 @@ void __wine_enter_vm86( CONTEXT *context
                 rec.ExceptionCode = EXCEPTION_BREAKPOINT;
                 break;
             }
-            raise_trap_exception( &rec, context );
-            continue;
+            break;
         case VM86_INTx: /* int3/int x instruction (ARG = x) */
             rec.ExceptionCode = EXCEPTION_VM86_INTx;
             rec.NumberParameters = 1;




More information about the wine-cvs mailing list