ntdll: Fix up instruction pointer in context for EXCEPTION_BREAKPOINT on x86_64.

Similar to eab168cf9e for x86.

Signed-off-by: Sebastian Lackner <sebastian@fds-team.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Sebastian Lackner 2016-02-19 03:08:42 +01:00 committed by Alexandre Julliard
parent 109e847f2a
commit d0cc0dd69f
2 changed files with 3 additions and 6 deletions

View File

@ -2482,6 +2482,9 @@ static NTSTATUS raise_exception( EXCEPTION_RECORD *rec, CONTEXT *context, BOOL f
if (status == DBG_CONTINUE || status == DBG_EXCEPTION_HANDLED)
return STATUS_SUCCESS;
/* fix up instruction pointer in context for EXCEPTION_BREAKPOINT */
if (rec->ExceptionCode == EXCEPTION_BREAKPOINT) context->Rip--;
if (call_vectored_handlers( rec, context ) == EXCEPTION_CONTINUE_EXECUTION)
return STATUS_SUCCESS;

View File

@ -1911,7 +1911,6 @@ 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,
@ -1978,7 +1977,6 @@ static const BYTE call_debug_service_code[] = {
static void test_debug_service(DWORD numexc)
{
const BOOL is_win64 = (sizeof(void *) > sizeof(int));
DWORD (CDECL *func)(DWORD_PTR) = code_mem;
DWORD expected_exc, expected_ret;
void *vectored_handler;
@ -1999,7 +1997,6 @@ static void test_debug_service(DWORD numexc)
ok(debug_service_exceptions == expected_exc,
"BREAKPOINT_BREAK generated %u exceptions, expected %u\n",
debug_service_exceptions, expected_exc);
todo_wine_if(is_win64)
ok(ret == expected_ret,
"BREAKPOINT_BREAK returned %u, expected %u\n", ret, expected_ret);
@ -2009,7 +2006,6 @@ static void test_debug_service(DWORD numexc)
ok(debug_service_exceptions == expected_exc,
"BREAKPOINT_PROMPT generated %u exceptions, expected %u\n",
debug_service_exceptions, expected_exc);
todo_wine_if(is_win64)
ok(ret == expected_ret,
"BREAKPOINT_PROMPT returned %u, expected %u\n", ret, expected_ret);
@ -2019,7 +2015,6 @@ static void test_debug_service(DWORD numexc)
ok(debug_service_exceptions == expected_exc,
"invalid debug service generated %u exceptions, expected %u\n",
debug_service_exceptions, expected_exc);
todo_wine_if(is_win64)
ok(ret == expected_ret,
"invalid debug service returned %u, expected %u\n", ret, expected_ret);
@ -2086,7 +2081,6 @@ static LONG CALLBACK breakpoint_handler(EXCEPTION_POINTERS *ExceptionInfo)
"got ExceptionInformation[0] = %lx\n", rec->ExceptionInformation[0]);
ExceptionInfo->ContextRecord->Eip = (DWORD)code_mem + 2;
#else
todo_wine
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