Sebastian Lackner : ntdll/tests: Add additional tests for instruction pointer in debug service tests.

Alexandre Julliard julliard at wine.codeweavers.com
Tue Apr 12 06:45:26 CDT 2016


Module: wine
Branch: stable
Commit: e728081da1777895e3b23d1a41a9fb5364aaf707
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=e728081da1777895e3b23d1a41a9fb5364aaf707

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

ntdll/tests: Add additional tests for instruction pointer in debug service tests.

Signed-off-by: Sebastian Lackner <sebastian at fds-team.de>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
(cherry picked from commit 4e878e9114e16cef656f92aa61cb026669077751)
Signed-off-by: Michael Stefaniuc <mstefani at winehq.org>

---

 dlls/ntdll/tests/exception.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/dlls/ntdll/tests/exception.c b/dlls/ntdll/tests/exception.c
index 2123b6b..ef67986 100644
--- a/dlls/ntdll/tests/exception.c
+++ b/dlls/ntdll/tests/exception.c
@@ -949,6 +949,8 @@ static void test_debugger(void)
                 {
                     ok(de.u.Exception.ExceptionRecord.ExceptionCode == EXCEPTION_BREAKPOINT,
                        "expected EXCEPTION_BREAKPOINT, got %08x\n", de.u.Exception.ExceptionRecord.ExceptionCode);
+                    ok((char *)ctx.Eip == (char *)code_mem_address + 0x1d,
+                       "expected Eip = %p, got 0x%x\n", (char *)code_mem_address + 0x1d, ctx.Eip);
 
                     if (stage == 8) continuestatus = DBG_EXCEPTION_NOT_HANDLED;
                 }
@@ -1844,6 +1846,8 @@ static LONG CALLBACK debug_service_handler(EXCEPTION_POINTERS *ExceptionInfo)
        rec->ExceptionCode, EXCEPTION_BREAKPOINT);
 
 #ifdef __i386__
+    ok(ExceptionInfo->ContextRecord->Eip == (DWORD)code_mem + 0x1c,
+       "expected Eip = %x, got %x\n", (DWORD)code_mem + 0x1c, ExceptionInfo->ContextRecord->Eip);
     ok(rec->NumberParameters == (is_wow64 ? 1 : 3),
        "ExceptionParameters is %d instead of %d\n", rec->NumberParameters, is_wow64 ? 1 : 3);
     ok(rec->ExceptionInformation[0] == ExceptionInfo->ContextRecord->Eax,
@@ -1857,6 +1861,9 @@ static LONG CALLBACK debug_service_handler(EXCEPTION_POINTERS *ExceptionInfo)
            "got ExceptionInformation[2] = %lx\n", rec->ExceptionInformation[2]);
     }
 #else
+    todo_wine
+    ok(ExceptionInfo->ContextRecord->Rip == (DWORD_PTR)code_mem + 0x2f,
+       "expected Rip = %lx, got %lx\n", (DWORD_PTR)code_mem + 0x2f, ExceptionInfo->ContextRecord->Rip);
     ok(rec->NumberParameters == 1,
        "ExceptionParameters is %d instead of 1\n", rec->NumberParameters);
     ok(rec->ExceptionInformation[0] == ExceptionInfo->ContextRecord->Rax,




More information about the wine-cvs mailing list