Commit Graph

4459 Commits

Author SHA1 Message Date
Jacek Caban 649be380b1 ntdll: Call send_debug_event from debug handler on x86_64.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-04 20:03:30 +02:00
Jacek Caban 200490b36c ntdll: Remove no longer needed func argument from setup_raise_exception.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-04 20:03:24 +02:00
Jacek Caban 00f8790799 ntdll: Call virtual_handle_fault from signal handler on x86_64.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-04 20:03:19 +02:00
Jacek Caban 2fff34493f ntdll: Handle interrupt exceptions in signal handler on x86_64.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-04 20:03:16 +02:00
Jacek Caban b76df7fa6d ntdll: Handle single step exception in setup_raise_exception on x86_64.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-04 20:03:14 +02:00
Jacek Caban be7a8d6b7a ntdll: Factor out setup_raise_exception.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-04 20:03:12 +02:00
Jacek Caban bd836a6f3e ntdll: Move setup_exception implementation.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-04 20:03:08 +02:00
Alex Henrie 363b8809f3 ntdll: Implement RtlIpv4StringToAddress(Ex)A.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46149
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-03 20:45:18 +02:00
Alex Henrie e9ee0df5d2 ntdll: Implement RtlIpv4StringToAddress(Ex)W.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46149
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-03 20:43:07 +02:00
André Hentschel 9220772d28 ntdll: Add RtlUnwindEx spec entry for ARM64.
Signed-off-by: André Hentschel <nerv@dawncrow.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-30 21:24:26 +02:00
Alexandre Julliard 5e8234b3c4 ntdll: Implement stack unwinding on ARM64.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-29 20:08:14 +02:00
Alexandre Julliard d2e4a6fae0 configure: Add support for using an external libunwind.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-29 20:08:14 +02:00
Alexandre Julliard 2002c22afa ntdll: Add a helper function for calling RtlVirtualUnwind() on x86-64.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-29 13:09:52 +02:00
Alexandre Julliard a9755d286e ntdll: Implement RtlVirtualUnwind() for ARM64.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-29 12:01:52 +02:00
Hans Leidekker 4e71e86747 ntdll: Read the chassis type from sysfs.
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-27 20:23:43 +02:00
Alexandre Julliard 87d9fef2ae ntdll: Take stack guarantee into account when handling stack overflows.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-26 12:04:25 +02:00
Alex Henrie 56f96c17f2 ntdll/tests: Add more tests for RtlIpv4StringToAddress.
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-23 19:38:00 +02:00
Alexandre Julliard 59f1c98e2c ntdll: Run signal handlers on the signal stack on ARM64.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-22 14:45:03 +02:00
Alexandre Julliard b96d15e1b0 ntdll: Add .seh annotations for x86_64.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-21 11:56:13 +02:00
Richard Yao 8d55542473 advapi32: Add EventWriteString stub.
"Are You Ready for Valve Index?" needs this to work.

Signed-off-by: Richard Yao <ryao@gentoo.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-19 16:13:26 +02:00
Alexandre Julliard 14e34bedbf ntdll: Share dynamic exception table functions across platforms.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-19 13:21:47 +02:00
Alexandre Julliard 44a6043388 ntdll: Move some exception definitions to winnt.h.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-19 13:17:37 +02:00
Zebediah Figura 08fc532033 ntdll: Handle UWOP_EPILOG directives in x86_64 unwind info.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-19 11:29:28 +02:00
Zebediah Figura 7ea3a14792 ntdll: Handle version 2 unwind info on x86_64.
It seems this is identical to version 1, but with an additional UWOP_EPILOG
opcode.

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-19 11:29:28 +02:00
Naveen Narayanan de5392bfe7 ntdll: Set pthread stack guard size to 0 for NetBSD.
pthread_attr_setstack(3) in NetBSD 8.0 and newer sets the guard size
to 65536 and extends the stack beyond the specified range.

Signed-off-by: Naveen Narayanan <zerous@nocebo.space>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-13 20:27:06 +02:00
Alexandre Julliard fc97373f62 ntdll: Fix support for breakpoint exceptions on ARM64.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-13 15:41:55 +02:00
Alexandre Julliard 3027c266fc ntdll: Don't run exception handlers on the signal stack on ARM64.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-13 15:41:25 +02:00
Alexandre Julliard 94a98cf5a2 ntdll: Implement setting the thread context on ARM64.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-13 14:53:07 +02:00
Alexandre Julliard 1c9fdaab0f ntdll: Save the context from the caller stack frame in RtlCaptureContext() on ARM64.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-13 14:52:23 +02:00
Alexandre Julliard 84783ed74f ntdll: Preserve the stack red zone on ARM64.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-13 14:51:47 +02:00
Alexandre Julliard 85c01202ac ntdll: Use the exception fault code to detect write access on ARM64.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-13 14:47:17 +02:00
Alexandre Julliard 07f37f2137 ntdll: Add support for saving/restoring FPU state on ARM64.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-13 14:44:41 +02:00
Rémi Bernon 8a765533d6 ntdll: Implement zero_bits parameter in virtual alloc functions.
Use alloc_area.limit field to limit the search in reserved areas to the
desired memory range, or call find_free_area to get a pointer to a free
memory region which matches the zero_bits constraint, then mmap it with
MAP_FIXED flag.

Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-13 12:29:45 +02:00
Rémi Bernon 6672fc9d85 ntdll: Use custom internal zero_bits_64 parameter format.
The zero_bits parameter can be a pointer mask on Win64 and WoW64 and it
was incorrectly truncated to 16bits in APCs. Testing shows that only the
leading zeroes are used in the mask, so we can safely use the 64 based
number of leading zeroes everywhere instead.

Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-13 12:29:45 +02:00
Rémi Bernon f172dd03ff ntdll/tests: Update zero_bits > 31 test case to validate bitmask behavior.
Only the leading zeroes are taken into account, so 0x1aaaaaaa zero_bits
behaves as 0x1fffffff

Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-13 12:11:46 +02:00
Rémi Bernon 54ba6b0ce5 ntdll/tests: Use MEM_TOP_DOWN parameter to consistently fail zero_bits tests.
The todo_wine_if made the tests not really test anything, and one test
was succeeding when it shouldn't. Now we can actually remove the todo
when 1 zero_bits handling is implemented.

Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-13 12:11:33 +02:00
Rémi Bernon 3cdb5072e8 ntdll/tests: Factor WoW64 checks and add is_win64 constant.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-13 12:11:27 +02:00
Rémi Bernon d1a7b681ea ntdll: Change zero_bits parameter type to ULONG_PTR for NtMapViewOfSection and NtAllocateVirtualMemory.
It can be a pointer mask, eventually 64bit, and ULONG_PTR is what can be
found in several documentation of these functions.

Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-13 12:11:15 +02:00
Rémi Bernon 5328b9e083 ntdll: Directly call internal functions from APC handler.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-13 12:11:08 +02:00
Rémi Bernon 1aa963efd7 ntdll: Add alloc_type parameter to virtual_map_section and top_down to map_image.
NtMapViewOfSection also accepts the MEM_TOP_DOWN parameter that can
be used in combination with zero_bits to map memory on the highest
possible address.

Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-13 12:11:02 +02:00
Michael Stefaniuc 724c216d18 ntdll: Remove useless cast to self.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-12 09:32:02 +02:00
Nikolay Sivov 2a15f77b49 ntdll: Ignore -1 time value same as 0 when setting file times.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-09 10:03:19 +02:00
Nikolay Sivov 3172b854ae ntdll/tests: Add some tests for setting file times.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-09 10:03:17 +02:00
Francois Gouget cc9ce65d96 ntdll: Add a trailing '\n' to a TRACE().
Signed-off-by: Francois Gouget <fgouget@free.fr>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-08 17:53:36 +02:00
Francois Gouget 4392ee399e ntdll/tests: A spelling fix in a comment.
Signed-off-by: Francois Gouget <fgouget@free.fr>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-08 17:53:36 +02:00
Zebediah Figura a28736df1f include: Add NTSTATUS severity macros.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-08 09:15:43 +02:00
Alexandre Julliard 9b6d2d3310 ntdll: Silence FIXME for LdrResolveDelayLoadedAPI().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-07 00:12:25 +02:00
Alexandre Julliard e91e6cc9bd ntdll: Reimplement thread initialization in assembler on ARM64.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-07 00:12:25 +02:00
Chip Davis ca2b701249 ntdll: Stub power request APIs.
Signed-off-by: Chip Davis <cdavis@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-01 19:12:03 +02:00
Chip Davis 6420ebdf93 ntdll: Move SetThreadExecutionState() implementation to ntdll.
Signed-off-by: Chip Davis <cdavis@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-01 19:12:03 +02:00