Sebastian Lackner : ntdll: Set correct number of arguments for breakpoint exceptions.

Alexandre Julliard julliard at wine.codeweavers.com
Fri Feb 19 08:56:21 CST 2016


Module: wine
Branch: master
Commit: 123185c3a20a42b55b58e466de281d1162513e3e
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=123185c3a20a42b55b58e466de281d1162513e3e

Author: Sebastian Lackner <sebastian at fds-team.de>
Date:   Fri Feb 19 03:09:17 2016 +0100

ntdll: Set correct number of arguments for breakpoint exceptions.

Signed-off-by: Sebastian Lackner <sebastian at fds-team.de>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/ntdll/signal_i386.c     | 4 ++++
 dlls/ntdll/signal_x86_64.c   | 2 ++
 dlls/ntdll/tests/exception.c | 4 ----
 3 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/dlls/ntdll/signal_i386.c b/dlls/ntdll/signal_i386.c
index 5708aae..59dca6c 100644
--- a/dlls/ntdll/signal_i386.c
+++ b/dlls/ntdll/signal_i386.c
@@ -2170,6 +2170,10 @@ static void trap_handler( int signal, siginfo_t *siginfo, void *sigcontext )
         /* fall through */
     default:
         rec->ExceptionCode = EXCEPTION_BREAKPOINT;
+        rec->NumberParameters = is_wow64 ? 1 : 3;
+        rec->ExceptionInformation[0] = 0;
+        rec->ExceptionInformation[1] = 0; /* FIXME */
+        rec->ExceptionInformation[2] = 0; /* FIXME */
         break;
     }
 }
diff --git a/dlls/ntdll/signal_x86_64.c b/dlls/ntdll/signal_x86_64.c
index 84802b2..1e88df3 100644
--- a/dlls/ntdll/signal_x86_64.c
+++ b/dlls/ntdll/signal_x86_64.c
@@ -2658,6 +2658,8 @@ static void trap_handler( int signal, siginfo_t *siginfo, void *sigcontext )
         /* fall through */
     default:
         rec->ExceptionCode = EXCEPTION_BREAKPOINT;
+        rec->NumberParameters = 1;
+        rec->ExceptionInformation[0] = 0;
         break;
     }
 }
diff --git a/dlls/ntdll/tests/exception.c b/dlls/ntdll/tests/exception.c
index 670c37b..64f3dff 100644
--- a/dlls/ntdll/tests/exception.c
+++ b/dlls/ntdll/tests/exception.c
@@ -2073,20 +2073,16 @@ static LONG CALLBACK breakpoint_handler(EXCEPTION_POINTERS *ExceptionInfo)
 #ifdef __i386__
     ok(ExceptionInfo->ContextRecord->Eip == (DWORD)code_mem + 1,
        "expected Eip = %x, got %x\n", (DWORD)code_mem + 1, ExceptionInfo->ContextRecord->Eip);
-    todo_wine
     ok(rec->NumberParameters == (is_wow64 ? 1 : 3),
        "ExceptionParameters is %d instead of %d\n", rec->NumberParameters, is_wow64 ? 1 : 3);
-    todo_wine
     ok(rec->ExceptionInformation[0] == 0,
        "got ExceptionInformation[0] = %lx\n", rec->ExceptionInformation[0]);
     ExceptionInfo->ContextRecord->Eip = (DWORD)code_mem + 2;
 #else
     ok(ExceptionInfo->ContextRecord->Rip == (DWORD_PTR)code_mem + 1,
        "expected Rip = %lx, got %lx\n", (DWORD_PTR)code_mem + 1, ExceptionInfo->ContextRecord->Rip);
-    todo_wine
     ok(rec->NumberParameters == 1,
        "ExceptionParameters is %d instead of 1\n", rec->NumberParameters);
-    todo_wine
     ok(rec->ExceptionInformation[0] == 0,
        "got ExceptionInformation[0] = %lx\n", rec->ExceptionInformation[0]);
     ExceptionInfo->ContextRecord->Rip = (DWORD_PTR)code_mem + 2;




More information about the wine-cvs mailing list