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
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
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
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
Alexandre Julliard
32fdffac42
include: Implement some inline functions in C instead of assembly.
...
This way the same code can be used on all platforms.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-06-26 23:08:53 +02:00
Zebediah Figura
90c3b78bec
ntdll: Implement RtlCreateUserStack() and RtlFreeUserStack().
...
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-06-17 20:50:10 +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
Huw Davies
13e11d3fcb
kernel32: Move the implementation of GetTickCount() to kernel32.
...
Fixes regression caused by 3e927c4aec
.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47265
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-30 21:53:27 +02:00
Huw Davies
3e927c4aec
ntdll: Extend NtGetTickCount() to return 64-bits. Forward kernel32 functions to it.
...
Marking the function as DECLSPEC_HOTPATCH to avoid reopening
https://bugs.winehq.org/show_bug.cgi?id=36486 . Even with -fno-PIC,
without DECLSPEC_HOTPATCH the generated code has a pushl at offset 7
that triggers the failure.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-16 20:54:23 +02:00
Martin Storsjo
044461e8a6
ntdll: Avoid truncating a nonzero exit code to zero in unix.
...
On Windows, the exit codes can use the full 32 bit range, while
on unix, they are truncated to the lowest 8 bits. If the intended
exit code is nonzero, to indicate failure, but the lower 8 bits
are zero (like when winedbg tries to exit with EXCEPTION_WINE_STUB,
80000100), the observed exit code used to be zero, indicating
successful execution.
Signed-off-by: Martin Storsjo <martin@martin.st>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-15 22:04:39 +02:00
Alexandre Julliard
d5a372abbb
include: Move inline assembly definitions to a new wine/asm.h header.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-14 13:45:07 +02:00
Alexandre Julliard
c9bf52502c
ntdll: Store offsets instead of pointers in the debug_info structure.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-03 19:28:19 +02:00
Piotr Caban
073bb1d0b4
ntdll: Use NTDLL_tolower instead of toupper.
...
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-26 13:50:22 +01:00
Piotr Caban
3588e5abd4
ntdll: Use _stricmp instead of strcasecmp.
...
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-26 13:50:20 +01:00
Paul Gofman
ba42efdb14
ntdll: Pass async parameter to add_fd_completion server call.
...
Signed-off-by: Paul Gofman <gofmanp@gmail.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-21 16:07:07 +01:00
Alexandre Julliard
5ecea50170
ntdll: Make the CPU information global.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-14 19:53:25 +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
a95d7f6c4f
ntdll: Recreate the process parameters structure once everything has been initialized.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-13 19:45:24 +01:00
Alexandre Julliard
7a122604ea
ntdll: Reimplement init_user_process_params() using RtlCreateProcessParametersEx().
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-12 11:31:53 +01:00
Alexandre Julliard
e24b16247d
ntdll: Pass an NT filename to get_load_order().
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-08 22:19:47 +01:00
Zebediah Figura
0ea963a406
ntdll: Call the select request directly in RtlWaitOnAddress().
...
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-12-04 16:13:10 +01:00
Alexandre Julliard
c998667bf0
ntdll: Also return the SECTION_IMAGE_INFORMATION data from RtlCreateUserProcess().
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-10-24 16:58:08 +02:00
Alexandre Julliard
03e05c1f57
ntdll: Implement RtlSetUnhandledExceptionFilter().
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-10-09 14:49:54 +02: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
Alexandre Julliard
2cab0ec389
server: Don't return the process exe file to the client.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-09-24 22:41:30 +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
Alexandre Julliard
39c8875ff8
ntdll: Add support for running IL-only .NET executables.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-02-21 09:55:05 +01:00
Alexandre Julliard
12276796c9
ntdll: Hardcode the windows and system directories.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-02-19 19:38:29 +01:00
Alexandre Julliard
73d1b89a12
ntdll: Get rid of the vm86 structure in the TEB.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-02-05 17:16:44 +01:00
Alexandre Julliard
60e6331520
ntdll: Move file mapping functionality to a helper function.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-01-30 15:10:23 +01:00
Alexandre Julliard
9d911a5736
ntdll: Move suspending a thread on startup back to the platform-specific files.
...
This partially reverts f64d2688d2
.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-01-22 22:26:46 +01:00
Alexandre Julliard
6fe15e6c41
ntdll: Round the pthread stack size to a page boundary.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-12-26 10:14:38 +01:00
Alexandre Julliard
7e9f1878db
ntdll: Run the thread/process detach code on the thread stack.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-12-14 10:54:56 +01:00
Alexandre Julliard
b526a48a24
ntdll: Pass the stack pointer to virtual_clear_thread_stack().
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-12-04 15:03:55 +01:00
Alexandre Julliard
23ec3ce2a3
ntdll: Start process execution directly at the kernel32 process entry point.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-12-04 15:03:55 +01:00
Alexandre Julliard
f64d2688d2
ntdll: Move suspending a thread on startup into attach_dlls().
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-12-01 20:32:12 +01:00
Alexandre Julliard
c3dd077d34
ntdll: Run the entire thread initialization code on the thread stack on remaining platforms.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-12-01 19:26:10 +01:00
Alexandre Julliard
70b69f3e5f
ntdll: Don't return from attach_dlls on failure.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-11-30 19:06:44 +01:00
Alexandre Julliard
6c61ea6a13
ntdll: Suspend a thread with its start context explicitly before attaching dlls.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-11-30 12:15:51 +01:00
Alexandre Julliard
53e4c36ef8
ntdll: Add a platform-specific helper for starting a thread.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-11-29 20:15:30 +01:00
Alexandre Julliard
afb16abc0f
ntdll: Add a platform-specific helper for starting a process.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-11-29 17:18:23 +01:00
Alexandre Julliard
f8e0bd1b0d
ntdll: Put the initial pthread stack at the end of the Win32 stack.
...
Create a separate view for it so that the main stack can be freed
independently.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-11-29 10:44:21 +01:00
Alexandre Julliard
8477ae27a8
ntdll: Fixup imports in the first thread that runs, even if it's not the main one.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-11-20 20:24:39 +01:00
Alexandre Julliard
51d348c8c2
ntdll: Add helpers to lock the user output buffer during file reads.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-09-22 15:10:42 +02:00
Alexandre Julliard
a20c4e11df
ntdll: Add a helper to lock the user output buffer during a server call.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-09-22 15:10:21 +02:00
Alexandre Julliard
8c103f298b
ntdll: Add support for setting a platform-specific initial context.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-09-19 12:10:14 +02:00
Alexandre Julliard
a003f0aed8
ntdll: Store the kernel32 process entry point in a global variable.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-09-19 11:59:58 +02:00
Alexandre Julliard
3bfd7973a4
ntdll: Don't do partial writes in virtual_uninterrupted_write_memory.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-09-06 17:31:00 +02:00
Alexandre Julliard
ca20bddefc
ntdll: Remove support for relay debugging of register functions.
...
The only remaining ones in krnl386 have been removed.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-26 10:41:27 +02:00
Alexandre Julliard
b87c66dd65
ntdll: Move the plaform-independent thread data to the GdiTebBatch TEB field.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-19 19:13:29 +02:00