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
Nikolay Sivov
0cd5a68ca4
ntdll: Keep unwind table entry count instead of a size.
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-01-23 17:17:09 +01:00
Nikolay Sivov
6f7731819c
ntdll: Store range upper boundary for dynamic unwind entry.
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-01-23 17:17:06 +01:00
Alex Henrie
c9109309c8
ntdll: Add RtlGrowFunctionTable stub.
...
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-12-03 22:27:05 +01:00
Austin English
80991720de
ntdll: Add RtlAddGrowableFunctionTable stub.
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=42255
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-12-03 22:27:05 +01:00
Alexandre Julliard
da60ea1c33
ntdll: Add a wrapper to call the unhandled exception filter.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-10-09 14:42:30 +02:00
Michael Stefaniuc
10f23ddb58
ntdll: Use the ARRAY_SIZE() macro.
...
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-08-14 10:15:59 +02:00
Johannes Brandstätter
ec418e7f55
ntdll: Check for NULL context in NtGetContextThread.
...
Crash Bandicoot N. Sane Trilogy calls NtGetContextThread
with the context being set to NULL which leads to a crash.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=45428
Signed-off-by: Johannes Brandstätter <jbrandst@2ds.eu>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-07-12 13:35:13 +02:00
Zebediah Figura
b8927cf136
ntdll: Implement RtlWow64SetThreadContext().
...
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-06-12 14:01:35 +02:00
Zebediah Figura
f135c81b31
ntdll: Implement RtlWow64GetThreadContext().
...
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-06-12 14:01:35 +02:00
Alexandre Julliard
36371075f8
ntdll: Pass the server context to get/set_thread_context().
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-06-12 14:01:35 +02:00
Sebastian Lackner
19a3bb2725
ntdll: Set proper ExceptionInformation[0] for x86_64 exceptions.
...
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-03-27 10:30:14 +02:00
Zebediah Figura
a462735270
ntdll: Fix exception parameters on x86-64.
...
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-03-13 20:35:29 +01:00
Andrew Wesie
5644022c26
ntdll: Handle icebp on x86-64.
...
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-03-13 20:35:29 +01:00
Andrew Wesie
bd63cce8f5
ntdll: Handle interrupt 0x2c on x86-64.
...
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-03-13 20:35:29 +01:00
Sebastian Lackner
2f870c1801
ntdll: Correctly handle privileged instructions on x86-64.
...
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-03-13 20:35:29 +01:00