Commit Graph

4521 Commits

Author SHA1 Message Date
Alexandre Julliard 5c101ed58f ntdll: Fix unwinding of leaf functions on ARM64.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-23 21:09:38 +02:00
Henri Verbeet d82f06c075 ntdll: Properly handle 0 returns from unw_step().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-22 23:04:27 +02:00
Alexandre Julliard fd3735cf4d kernel32: Move dll load path initialization to ntdll.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-22 23:04:26 +02:00
Alexandre Julliard 2607bfa28f kernel32: Move command line initialization to ntdll.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-22 23:04:26 +02:00
Alexandre Julliard ee56be3fcd kernel32: Move Unicode argv initialization to ntdll.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-22 23:04:26 +02:00
Alexandre Julliard 075741b681 kernel32: Move image path name initialization to ntdll.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-22 23:04:26 +02:00
Alexandre Julliard 6b528d526d kernel32: Move additional environment initialization to ntdll.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-22 23:04:26 +02:00
Alexandre Julliard 628ca4aafe kernel32: Move registry environment initialization to ntdll.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-22 23:04:26 +02:00
Alexandre Julliard a511057f7e kernel32: Move Unix environment initialization to ntdll.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-22 23:04:26 +02:00
Alexandre Julliard cac9599207 kernel32: Move process name initialization to ntdll.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-22 23:04:26 +02:00
Alexandre Julliard 305b5a44c5 kernel32: Move current directory initialization to ntdll.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-22 23:04:26 +02:00
Alexandre Julliard e4595a0ce8 ntdll: Always add path separator when looking for a relative path name.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47979
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-22 09:57:23 +02:00
Vijay Kiran Kamuju 1aff1e6a37 ntdll: Fix the SYSTEM_MODULE struct field names.
Based on https://www.geoffchappell.com/studies/windows/km/ntoskrnl/api/rtl/ldrreloc/process_module_information.htm?ts=0,44

Signed-off-by: Vijay Kiran Kamuju <infyquest@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-21 19:56:26 +02:00
Alexandre Julliard 6d8c58d7cc kernel32: Retrieve the Unix codepage from ntdll.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-19 14:19:32 +02:00
Alexandre Julliard 4f42088762 ntdll: Initialize Unix codepage early during startup.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-19 14:16:19 +02:00
Alexandre Julliard 98238aa873 ntdll: Disallow changing DEP flags on 64-bit.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-16 16:51:21 +02:00
Evgeny Litvinenko 893e9d1b72 ntdll: Solaris requires sys/regset.h.
Signed-off-by: Evgeny Litvinenko <evgeny.v.litvinenko@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-08 10:58:09 +02:00
Piotr Caban fd60406e91 ntdll: Try to handle write watches while we're on the signal stack (x86_64).
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-03 22:58:07 +02:00
Akihiro Sagawa aade0bf7e3 ntdll: Add exception handling around DbgBreakPoint.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47509
Signed-off-by: Akihiro Sagawa <sagawa.aki@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-03 22:58:07 +02:00
Alexandre Julliard a5d45e9ae5 kernel32: Move exe path functions to ntdll.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-03 22:58:06 +02:00
Alexandre Julliard 619bd16e7a kernel32: Move dll path functions to ntdll.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-03 22:56:14 +02:00
Alexandre Julliard a0a2b25a44 kernel32: Move Get/SetDllDirectory() implementation to ntdll.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-01 15:14:08 +02:00
Alexandre Julliard 5f938bb51b ntdll: Implement RtlGetSearchPath().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-01 15:14:08 +02:00
Alexandre Julliard 444933ae04 ntdll: Implement RtlSetSearchPathMode().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-01 09:43:27 +02:00
Zebediah Figura d1a259d1a6 ntdll: Implement NtQueryInformationFile(FileAttributeTagInformation).
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47813
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-26 21:02:37 +02:00
Alex Henrie 34e15e5a1d ntdll/tests: Add tests for NtPowerInformation(SystemBatteryState).
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-26 21:00:13 +02:00
Sebastian Lackner b45d612549 ntdll: Execute queued APCs before starting a process.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=35561
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-23 19:44:17 +02:00
Piotr Caban a69762541a ntdll: Ignore ExceptionFlags changes done by exception handlers.
Fixes exceptions rethrowing in 64-bit .Net.

Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-23 19:44:17 +02:00
Alex Henrie eb699821d0 ntdll: Ensure that performance information is initialized (scan-build).
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-19 22:07:53 +02:00
Alexandre Julliard 82c753a273 ntdll: Send first chance debug event while on signal stack on ARM64.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-19 22:07:53 +02:00
Alexandre Julliard afe8467110 ntdll: Avoid server call when possible in NtSetContextThread() on ARM64.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-19 22:07:53 +02:00
Alexandre Julliard 7ee66b29cb ntdll: Send first chance debug event while on signal stack on i386.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-18 18:16:54 +02:00
Alexandre Julliard d299087d30 ntdll: Don't send the first chance debug event twice.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-18 17:19:34 +02:00
Alexandre Julliard af4c7e6e61 ntdll: Fix usage of libunwind on x86-64 on non-macOS platforms.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-18 17:07:46 +02:00
Alexandre Julliard 5f10545b19 ntdll: Don't use virtual_uninterrupted_read_memory() for invalid %gs check.
It doesn't work for code in system libraries. This is a partial revert
of 58139dcb12.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47769
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-17 16:50:44 +02:00
Ken Thomases bed4291336 ntdll: Fix the Mac build with SDKs older than 10.14.
Also, fix some warnings with the 10.14 SDK.
Thanks to Gijs Vermeulen for reporting the issue.

Signed-off-by: Ken Thomases <ken@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-16 22:58:41 +02:00
Alex Henrie 6ea282c7e1 ntdll: Avoid dead initialization (scan-build).
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-16 10:14:02 +02:00
Alexandre Julliard 944c4e8f76 ntdll: Use virtual_uninterrupted_read_memory() to read code inside signal handler on i386.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-13 19:34:19 +02:00
Alexandre Julliard 17c82ddc95 ntdll: Avoid calling init_handler() twice in signal handler on i386.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-13 19:34:19 +02:00
Ken Thomases 84760a8fb2 ntdll: On Mac, use the Mach API as preferred approach to get a thread's GS.base.
The previous technique was a gross hack peeking at the internals of the pthreads
implementation.

Signed-off-by: Ken Thomases <ken@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-13 10:36:06 +02:00
Dmitry Timoshkov 3b2937f7c7 ntdll: Implement RtlUnicodeToUTF8N.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-12 22:47:45 +02:00
Dmitry Timoshkov 65e1ed3480 ntdll/tests: Fix compilation with PSDK compiler.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-12 22:47:45 +02:00
Alexandre Julliard 2201229086 ntdll: Remove no longer needed function argument from setup_raise_exception() on ARM64.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-12 22:47:45 +02:00
Alexandre Julliard 60eb37c6be ntdll: Handle page fault in signal handler on ARM64.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-12 22:47:44 +02:00
Alexandre Julliard a7459d0c99 ntdll: Handle trap exception in signal handler on ARM64.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-12 22:47:44 +02:00
Alexandre Julliard 769c333c6c ntdll: Factor out setup_raise_exception() on ARM64.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-12 22:47:44 +02:00
Alexandre Julliard 7736f3837e ntdll: Use a stack_layout structure to build exception data on ARM64.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-12 22:47:44 +02:00
Alexandre Julliard d9ec920fd9 ntdll: Remove no longer needed function argument from setup_raise_exception() on i386.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-12 22:47:44 +02:00
Alexandre Julliard 5501055ed5 ntdll: Handle ATL thunk emulation in signal handler on i386.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-12 22:47:44 +02:00
Alexandre Julliard df3fad6383 ntdll: Handle page faults in signal handler on i386.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-12 21:07:05 +02:00