Alexandre Julliard
ff04d8a4c2
ntdll: Move the syscall dispatcher implementation to the platform-specific files.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-26 11:25:38 +02:00
Alexandre Julliard
847db3c1d3
ntdll: Store the syscall table in the syscall frame on all platforms.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-26 10:47:38 +02:00
Alexandre Julliard
94f63ea23f
ntdll: Add support for user callbacks.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-17 18:16:43 +02:00
Alexandre Julliard
daa1886a2c
ntdll: Add a stub for NtCallbackReturn().
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-17 11:52:35 +02:00
Alexandre Julliard
bedfb31d7c
ntdll: Add a helper function to retrieve the CPU area context on the Unix side.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-01 12:46:00 +02:00
Alexandre Julliard
7404ef3ef5
ntdll: Don't rely on get_thread_context() updating the context flags.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-29 15:25:42 +02:00
Alexandre Julliard
8ac411ed6d
server: Support both native and wow64 register contexts.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-27 11:42:32 +02:00
Alexandre Julliard
fed7e7a78b
ntdll: Simulate a syscall return when starting a thread.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-21 18:35:20 +02:00
Alexandre Julliard
db26df5934
ntdll: Go through the syscall return path for syscall faults.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-21 18:35:20 +02:00
Alexandre Julliard
9a430dc6db
ntdll: Also pass the TEB to signal_exit_thread().
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-14 18:32:24 +02:00
Alexandre Julliard
fa5759b9ef
ntdll: Simplify the platform-specific dispatcher interface.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-11 18:45:44 +02:00
Alexandre Julliard
7954b86f6b
ntdll: Switch to the kernel stack for syscalls on ARM.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-11 18:45:44 +02:00
Alexandre Julliard
4e74038749
ntdll: Fix some exception test failures on ARM.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-10 19:54:33 +02:00
Alexandre Julliard
1bd4473484
ntdll: Create a thread to run the ctrl-C routine instead of raising an exception.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-09 23:38:43 +02:00
Alexandre Julliard
e5982993ae
ntdll: Get rid of signal_init_syscalls().
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-02 20:16:07 +02:00
Alexandre Julliard
1cc0649755
ntdll: Store exception jump buffer in the per-thread data.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-01 15:16:23 +02:00
Zebediah Figura
10eba9b2e9
Revert "ntdll: Preserve syscall frame when calling async IO system APC.".
...
This reverts commit 8b8ddffa21
.
ws2_32 no longer uses system APCs.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-01 09:12:54 +02:00
Alexandre Julliard
543e49397f
winebuild: Store all parameters on the stack for syscall thunks on ARM.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-27 21:13:18 +02:00
Alexandre Julliard
1364b11fd4
ntdll: Pass the result status to call_user_apc_dispatcher().
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-25 21:13:00 +02:00
Alexandre Julliard
e8a1341f5c
ntdll: Add platform-specific helpers for getting/setting the Wow64 context.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-18 17:53:30 +02:00
Alexandre Julliard
f04c2bd4f1
ntdll: Make the server context conversion functions generic.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-18 17:46:41 +02:00
Alexandre Julliard
5ba8f0d73b
ntdll: Store the Wow64 context at the top of the 64-bit stack.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-17 18:49:09 +02:00
Alexandre Julliard
308bd35746
server: Store a machine ID instead of a CPU in the context structure.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-27 10:40:53 +02:00
Jacek Caban
ce5f17c892
ntdll: Store FPU and XMM contexts in x86 syscall frame.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-01 21:13:00 +01:00
Jacek Caban
437bef6ac1
ntdll: Use syscall dispatcher for restoring context in x86_64 NtSetContextThread implementation.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-22 20:19:15 +01:00
Jacek Caban
a0a62463e3
ntdll: Introduce signal_init_syscalls.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-19 23:46:30 +01:00
Alexandre Julliard
fc7c3b51ac
ntdll: Always inline NtCurrentTeb() on ARM.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-01-21 20:46:13 +01:00
Alexandre Julliard
37c24eabc7
ntdll: Support Thumb mode in signal handling.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-01-19 13:25:18 +01:00
Alexandre Julliard
54cd0e9187
ntdll: Make inline asm compatible with Thumb-2.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-01-19 13:24:14 +01:00
Paul Gofman
8b8ddffa21
ntdll: Preserve syscall frame when calling async IO system APC.
...
The frame can currently be reset from ws2_32.dll async IO callbacks
which are still in the user part and are calling 'syscall' functions.
If the user APC is processed after that during the same call to
server_select(), the call_user_apc_dispatcher() faults.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=49782
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-12-23 22:07:50 +01:00
Alexandre Julliard
cc9d69b20b
ntdll: Pop the Unix stack completely in call_user_apc_dispatcher().
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-04 21:16:49 +02:00
Alexandre Julliard
c2c330532e
ntdll: Call the process entry point through RtlUserThreadStart().
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-01 16:41:03 +02:00
Alexandre Julliard
75e616d52b
ntdll: Clear the syscall frame on return instead of popping the previous one.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-27 12:14:35 +02:00
Alexandre Julliard
1581fb619b
ntdll: Get rid of the server_init_process_done() Unix library callback.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-26 13:04:09 +02:00
Alexandre Julliard
0b3db9dfa2
ntdll: Handle page faults happening during a syscall without dispatching the exception.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-24 11:46:22 +02:00
Alexandre Julliard
77fbf3a9fd
ntdll: Unwind the syscall frame in NtSetContextThread().
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-20 18:45:53 +02:00
Alexandre Julliard
a686759f1d
ntdll: Unwind the syscall frame when calling KiUserApcDispatcher().
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-20 18:45:53 +02:00
Alexandre Julliard
53e0bf2f9f
ntdll: Don't expect LdrInitializeThunk() to return to the Unix side.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-20 18:45:53 +02:00
Alexandre Julliard
9b7f14f1b4
ntdll: Unwind the syscall frame when calling KiRaiseUserExceptionDispatcher().
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-11 17:56:10 +02:00
Alexandre Julliard
1e7e21534e
ntdll: Unwind the syscall frame when calling KiUserExceptionDispatcher().
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-11 17:56:10 +02:00
Alexandre Julliard
13abe9e2bd
ntdll/tests: Run exception tests under the debugger on all platforms.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-11 17:56:10 +02:00
Alexandre Julliard
7a71f98640
ntdll: Use KiUserApcDispatcher() to call user APCs.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-06 19:31:24 +02:00
Mikołaj Zalewski
9014dae8fb
ntdll: Return from Thumb to ARM mode after assembling raise_func_trampoline_thumb.
...
Without it, Raspbian gcc thinks the next function
(raise_func_trampoline_arm) is in Thumb and will create its own
trampoline to to execute it as Thumb (bad).
Signed-off-by: Mikołaj Zalewski <mikolaj@zalewski.pl>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-06 11:39:48 +02:00
Alexandre Julliard
8e5c11b964
ntdll/tests: Enable more exception tests on ARM platforms.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-28 14:13:48 +02:00
Alexandre Julliard
57f419993e
ntdll: Use a syscall thunk for NtGetContextThread().
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-28 13:51:44 +02:00
Alexandre Julliard
28e443d9e2
winebuild: Store the syscall frame in the thread data on ARM.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-28 13:31:59 +02:00
Alexandre Julliard
0bf52b09f2
ntdll: Update the TEB and PEB structures for newer Windows versions.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-23 23:21:08 +02:00
Alexandre Julliard
adb4e74b47
ntdll: Send debug event before pushing exception data on ARM.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-15 10:36:23 +02:00
Alexandre Julliard
1e4865ffcf
ntdll: Handle signals on the signal stack also on ARM.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-15 10:34:18 +02:00
Alexandre Julliard
485c8566f1
ntdll: Build the exception record on the signal stack first.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-15 10:31:19 +02:00