2019-09-12 15:44:02 -07:00
|
|
|
From ee30dc13a100788219ecc357056f8edf3a2f2113 Mon Sep 17 00:00:00 2001
|
2017-03-19 12:32:29 -07:00
|
|
|
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
|
|
|
Date: Sun, 19 Mar 2017 19:08:34 +0100
|
2019-09-12 15:44:02 -07:00
|
|
|
Subject: [PATCH] ntdll: Catch windows int 0x2e syscall on i386.
|
2017-03-19 12:32:29 -07:00
|
|
|
|
|
|
|
---
|
2019-09-12 15:44:02 -07:00
|
|
|
dlls/ntdll/signal_i386.c | 10 +++++++++-
|
2017-03-19 12:32:29 -07:00
|
|
|
include/wine/exception.h | 1 +
|
2019-09-12 15:44:02 -07:00
|
|
|
2 files changed, 10 insertions(+), 1 deletion(-)
|
2017-03-19 12:32:29 -07:00
|
|
|
|
|
|
|
diff --git a/dlls/ntdll/signal_i386.c b/dlls/ntdll/signal_i386.c
|
2019-09-12 15:44:02 -07:00
|
|
|
index 8876790195..7ddc64284e 100644
|
2017-03-19 12:32:29 -07:00
|
|
|
--- a/dlls/ntdll/signal_i386.c
|
|
|
|
+++ b/dlls/ntdll/signal_i386.c
|
2019-09-12 15:44:02 -07:00
|
|
|
@@ -1945,6 +1944,15 @@ static BOOL handle_interrupt( unsigned int interrupt, ucontext_t *sigcontext, st
|
|
|
|
stack->rec.ExceptionInformation[2] = stack->context.Edx;
|
|
|
|
setup_raise_exception( sigcontext, stack );
|
2017-03-19 12:32:29 -07:00
|
|
|
return TRUE;
|
|
|
|
+ case 0x2e:
|
2019-09-12 15:44:02 -07:00
|
|
|
+ stack->context.Eip += 2;
|
|
|
|
+ stack->rec.ExceptionCode = EXCEPTION_WINE_SYSCALL;
|
|
|
|
+ stack->rec.ExceptionAddress = (void *)stack->context.Eip;
|
|
|
|
+ stack->rec.NumberParameters = 2;
|
|
|
|
+ stack->rec.ExceptionInformation[0] = stack->context.Eax;
|
|
|
|
+ stack->rec.ExceptionInformation[1] = stack->context.Edx;
|
|
|
|
+ setup_raise_exception( sigcontext, stack );
|
2017-03-19 12:32:29 -07:00
|
|
|
+ return TRUE;
|
|
|
|
default:
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
diff --git a/include/wine/exception.h b/include/wine/exception.h
|
2019-09-12 15:44:02 -07:00
|
|
|
index 3281130c50..e822573ace 100644
|
2017-03-19 12:32:29 -07:00
|
|
|
--- a/include/wine/exception.h
|
|
|
|
+++ b/include/wine/exception.h
|
2019-09-12 15:44:02 -07:00
|
|
|
@@ -315,6 +315,7 @@ static inline EXCEPTION_REGISTRATION_RECORD *__wine_get_frame(void)
|
2017-03-19 12:32:29 -07:00
|
|
|
|
|
|
|
#define EXCEPTION_WINE_STUB 0x80000100 /* stub entry point called */
|
|
|
|
#define EXCEPTION_WINE_ASSERTION 0x80000101 /* assertion failed */
|
|
|
|
+#define EXCEPTION_WINE_SYSCALL 0x80000103
|
|
|
|
|
2018-02-17 19:16:05 -08:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
2017-03-19 12:32:29 -07:00
|
|
|
--
|
2019-09-12 15:44:02 -07:00
|
|
|
2.17.1
|
|
|
|
|