Alexandre Julliard
683583faf2
ntdll: Remove support for setting custom signal handlers.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-06 16:45:36 +02:00
Alexandre Julliard
7f28a1c521
ntdll: Use NtContinue() to restore context after an exception.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-06 15:17:07 +02:00
Alexandre Julliard
e561ce4b92
ntdll: Move NtRaiseException() implementation to the Unix library.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-06 14:31:00 +02:00
Alexandre Julliard
be0eb9c92e
ntdll: Move the thread startup code to the Unix library.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-03 20:01:16 +02:00
Alexandre Julliard
c96ef78b6d
ntdll: Move the virtual memory functions to the Unix library.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-02 17:19:12 +02:00
Alexandre Julliard
7c32b2dd93
ntdll: Move NtGetContextThread() implementation to the Unix library.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-02 14:23:21 +02:00
Alexandre Julliard
ac90898f72
ntdll: Move NtSetContextThread() implementation to the Unix library.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-02 14:01:10 +02:00
Alexandre Julliard
3e9f8c87e5
ntdll: Move the threading initialization functions to the Unix library.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-01 22:10:28 +02:00
Matteo Bruni
2e5c2c7cdb
ntdll: Use memcpy() in set_float_reg().
...
The source address might not be aligned although the compiler can
expect alignment when using a plain assignment.
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-25 20:20:09 +02:00
Alexandre Julliard
bd9a1e23f2
ntdll: Move TEB allocation to the common code.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-28 14:03:26 +02:00
Alexandre Julliard
9650f1d3a1
ntdll: Move signal stack size computation to the common code.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-28 13:34:06 +02:00
Alexandre Julliard
ffb7c595c6
ntdll: Add a helper for platform-specific threading initialization.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-28 13:17:07 +02:00
Zebediah Figura
feeb1c7c24
include: Rename LDR_MODULE to LDR_DATA_TABLE_ENTRY.
...
This name is used in Microsoft's public winternl.h.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-24 10:13:39 +02:00
Alexandre Julliard
0187310966
ntdll: Implement NtSetLdtEntries().
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-01 12:38:50 +02:00
Alexandre Julliard
6169cacd0d
ntdll: Move support for getting LDT entries to the platform-specific files.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-01 12:33:29 +02:00
Zhiyi Zhang
e41547c548
ntdll: Fix some Rtl* functions having wrong calling convention.
...
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-01-16 12:21:11 +01:00
Alexandre Julliard
0b2e65f53a
ntdll: Fix FPU initialization for new threads on x86-64.
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=48019
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-04 09:45:53 +01: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
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
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
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
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
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
Alexandre Julliard
6e6711d773
ntdll: Use a stack_layout structure to build exception data on x86-64.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-12 17:46:39 +02:00
Alexandre Julliard
24876bf17e
ntdll: Use virtual_uninterrupted_read_memory() to read code inside signal handler on x86-64.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-12 16:44:54 +02:00
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
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
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
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
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
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
Chip Davis
4e4aa46775
ntdll: Implement RtlCaptureStackBackTrace() for x86_64.
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=40868
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47101
Signed-off-by: Chip Davis <cdavis@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-01 19:12:03 +02:00
Rémi Bernon
00451d5edf
ntdll: Clarify NtAllocateVirtualMemory zero_bits parameter semantics.
...
This parameter was misinterpreted as an alignment parameter for the
lower bits of the allocated memory region, although it is a constraint
on the higher bits.
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-06-13 20:55:35 +02:00
Alexandre Julliard
60df3b14b5
include: Make the Wine exception handlers cdecl.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-30 15:04:06 +02:00
Hans Leidekker
4872747b27
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>
2019-05-15 22:04:39 +02:00
Derek Lesho
3d0cf846f9
ntdll: Fix unwinding from leaf function on x86_64.
...
Signed-off-by: Derek Lesho <dereklesho52@Gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-20 22:42:30 +01:00
Alexandre Julliard
9f0d669239
ntdll: Rename attach_dlls() to LdrInitializeThunk().
...
Based on a patch by Andrew Wesie.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-14 17:57:09 +01:00
Alexandre Julliard
7f4e5b1ed8
ntdll: Don't crash on empty table in RtlAddFunctionTable().
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-01-24 16:45:54 +01:00
Nikolay Sivov
067f6d7463
ntdll: Implement growable unwind tables API.
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46479
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-01-23 17:17:18 +01:00