ntdll: Fix breakpoint exception address on 64-bit Linux.
Signed-off-by: Hans Leidekker <hans@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
f2503a3e0d
commit
4872747b27
|
@ -638,7 +638,15 @@ static void test_debug_loop(int argc, char **argv)
|
||||||
if (!ret) break;
|
if (!ret) break;
|
||||||
|
|
||||||
if (ev.dwDebugEventCode == EXIT_PROCESS_DEBUG_EVENT) break;
|
if (ev.dwDebugEventCode == EXIT_PROCESS_DEBUG_EVENT) break;
|
||||||
|
#if defined(__i386__) || defined(__x86_64__)
|
||||||
|
if (ev.dwDebugEventCode == EXCEPTION_DEBUG_EVENT &&
|
||||||
|
ev.u.Exception.ExceptionRecord.ExceptionCode == EXCEPTION_BREAKPOINT)
|
||||||
|
{
|
||||||
|
BYTE byte = 0;
|
||||||
|
NtReadVirtualMemory(pi.hProcess, ev.u.Exception.ExceptionRecord.ExceptionAddress, &byte, 1, NULL);
|
||||||
|
ok(byte == 0xcc, "got %02x\n", byte);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
ret = ContinueDebugEvent(ev.dwProcessId, ev.dwThreadId, DBG_CONTINUE);
|
ret = ContinueDebugEvent(ev.dwProcessId, ev.dwThreadId, DBG_CONTINUE);
|
||||||
ok(ret, "ContinueDebugEvent failed, last error %#x.\n", GetLastError());
|
ok(ret, "ContinueDebugEvent failed, last error %#x.\n", GetLastError());
|
||||||
if (!ret) break;
|
if (!ret) break;
|
||||||
|
|
|
@ -3134,7 +3134,10 @@ 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 */
|
#ifdef SI_KERNEL
|
||||||
|
case SI_KERNEL:
|
||||||
|
#endif
|
||||||
|
/* Check if this is actually icebp instruction */
|
||||||
if (((unsigned char *)rec->ExceptionAddress)[-1] == 0xF1)
|
if (((unsigned char *)rec->ExceptionAddress)[-1] == 0xF1)
|
||||||
{
|
{
|
||||||
rec->ExceptionCode = EXCEPTION_SINGLE_STEP;
|
rec->ExceptionCode = EXCEPTION_SINGLE_STEP;
|
||||||
|
|
Loading…
Reference in New Issue