ntdll: Handle icebp on x86-64.

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Andrew Wesie 2018-03-12 23:03:07 -05:00 committed by Alexandre Julliard
parent bd63cce8f5
commit 5644022c26
2 changed files with 6 additions and 2 deletions

View File

@ -2917,6 +2917,12 @@ static void trap_handler( int signal, siginfo_t *siginfo, void *sigcontext )
rec->ExceptionCode = EXCEPTION_SINGLE_STEP;
break;
case TRAP_BRKPT: /* Breakpoint exception */
/* Check if this is actuallly icebp instruction */
if (((unsigned char *)rec->ExceptionAddress)[-1] == 0xF1)
{
rec->ExceptionCode = EXCEPTION_SINGLE_STEP;
break;
}
rec->ExceptionAddress = (char *)rec->ExceptionAddress - 1; /* back up over the int3 instruction */
/* fall through */
default:

View File

@ -2292,10 +2292,8 @@ static const struct exception
/* 35 */
{ { 0xa3, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc3 }, /* movl %eax,0xffffffffffffffff; ret */
0, 9, STATUS_ACCESS_VIOLATION, 2, { 1, 0xffffffffffffffff } },
#if 0
{ { 0xf1, 0x90, 0xc3 }, /* icebp; nop; ret */
1, 1, STATUS_SINGLE_STEP, 0 },
#endif
{ { 0xcd, 0x2c, 0xc3 },
0, 2, STATUS_ASSERTION_FAILURE, 0 },
};