Commit 5644022c authored by Andrew Wesie's avatar Andrew Wesie Committed by Alexandre Julliard

ntdll: Handle icebp on x86-64.

parent bd63cce8
...@@ -2917,6 +2917,12 @@ static void trap_handler( int signal, siginfo_t *siginfo, void *sigcontext ) ...@@ -2917,6 +2917,12 @@ static void trap_handler( int signal, siginfo_t *siginfo, void *sigcontext )
rec->ExceptionCode = EXCEPTION_SINGLE_STEP; rec->ExceptionCode = EXCEPTION_SINGLE_STEP;
break; break;
case TRAP_BRKPT: /* Breakpoint exception */ 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 */ rec->ExceptionAddress = (char *)rec->ExceptionAddress - 1; /* back up over the int3 instruction */
/* fall through */ /* fall through */
default: default:
......
...@@ -2292,10 +2292,8 @@ static const struct exception ...@@ -2292,10 +2292,8 @@ static const struct exception
/* 35 */ /* 35 */
{ { 0xa3, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc3 }, /* movl %eax,0xffffffffffffffff; ret */ { { 0xa3, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc3 }, /* movl %eax,0xffffffffffffffff; ret */
0, 9, STATUS_ACCESS_VIOLATION, 2, { 1, 0xffffffffffffffff } }, 0, 9, STATUS_ACCESS_VIOLATION, 2, { 1, 0xffffffffffffffff } },
#if 0
{ { 0xf1, 0x90, 0xc3 }, /* icebp; nop; ret */ { { 0xf1, 0x90, 0xc3 }, /* icebp; nop; ret */
1, 1, STATUS_SINGLE_STEP, 0 }, 1, 1, STATUS_SINGLE_STEP, 0 },
#endif
{ { 0xcd, 0x2c, 0xc3 }, { { 0xcd, 0x2c, 0xc3 },
0, 2, STATUS_ASSERTION_FAILURE, 0 }, 0, 2, STATUS_ASSERTION_FAILURE, 0 },
}; };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment