Alexandre Julliard
f89f7a54c2
ntdll: Support loading a PE-format ntdll.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-30 12:21:15 +02:00
Alexandre Julliard
4fcf20d1d1
ntdll: Move part of the PE image mapping code into virtual_map_section().
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-30 12:21:15 +02:00
Alexandre Julliard
64731a8e9f
ntdll: Fix a few more thread information access rights.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-30 11:05:53 +02:00
Rémi Bernon
e1e34cdc37
ntdll: Correctly implement ThreadHideFromDebugger.
...
At least, store the thread information, instead of pretending and
failing to correctly validate handles and access rights.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-30 11:05:53 +02:00
Rémi Bernon
eef527723f
ntdll/tests: Add more HideFromDebugger tests.
...
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-30 11:05:53 +02:00
Francois Gouget
1aa64a30be
ntdll: Fix wording of a comment.
...
Signed-off-by: Francois Gouget <fgouget@free.fr>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-29 21:07:43 +02:00
Alexandre Julliard
43be3507c0
ntdll: Setup the main thread before initializing ntdll.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-29 19:51:47 +02:00
Alexandre Julliard
83a4549e9b
ntdll: Remove support for being loaded directly from libwine.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-29 19:51:47 +02:00
Alexandre Julliard
15c3eaafbb
ntdll: Move retrieving the startup info to the Unix library.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-29 19:51:47 +02:00
Alexandre Julliard
f1ff598e2a
ntdll: Update the __wine_ldt_copy pointer directly from the Unix library.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-29 19:51:47 +02:00
Alexandre Julliard
2334f4e645
ntdll: Stop sharing the thread counter with the Unix library.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-29 19:51:47 +02:00
Alexandre Julliard
067648cd2b
ntdll: Reimplement the string functions to avoid depending on libc.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-29 19:51:47 +02:00
Alexandre Julliard
bc8745851e
ntdll: Reimplement the ctype functions to avoid depending on libc.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-29 19:51:47 +02:00
Alexandre Julliard
716cf7d342
ntdll: Avoid a compiler warning when fetching the return address.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-29 19:51:47 +02:00
Alexandre Julliard
38c78a9682
ntdll: Avoid some Unix dependencies.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-29 19:51:47 +02:00
Alexandre Julliard
b9f531a0e8
ntdll: Move the console handle initialization to the Unix library.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-29 19:51:46 +02:00
Michael Müller
ed566a8723
ntdll: Return process times in NtQuerySystemInformation(SystemProcessInformation).
...
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-29 19:51:46 +02:00
Michael Müller
69e9651c1a
ntdll: Return thread times in NtQuerySystemInformation(SystemProcessInformation).
...
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-29 19:51:46 +02:00
Sebastian Lackner
847b93c740
ntdll: Implement NtQueryInformationThread(ThreadTimes) using procfs.
...
Based on a patch by Ray Hinchliffe <ray@pobox.co.uk>.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=20230
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-29 19:51:46 +02:00
Jacek Caban
d2a3104f5f
ntdll: Support CONIN$ and CONOUT$ in RtlIsDosDeviceName_U.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-26 21:52:10 +02:00
Alexandre Julliard
8b36885973
ntdll: Fix some stdcall/cdecl calling convention mismatches.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-26 20:53:33 +02:00
Alexandre Julliard
dde38fda6e
ntdll: Use Windows APIs to handle the dll overrides variable.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-26 20:53:33 +02:00
Alexandre Julliard
e605919198
ntdll: Move the math functions to the Unix library.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-26 09:12:11 +02:00
Alexandre Julliard
b8dc6b2412
ntdll: Move RtlGetSystemTimePrecise() to the Unix library.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-25 23:08:30 +02:00
Alexandre Julliard
13c1f008c0
ntdll: Move the timezone detection code to the Unix library.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-25 23:08:30 +02:00
Alexandre Julliard
7161dcd426
ntdll: Return the current time and timezone bias in NtQuerySystemInformation(SystemTimeOfDayInformation).
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-25 23:08:30 +02:00
Alexandre Julliard
c031662fd0
ntdll: Always set the thread context through NtSetContextThread().
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-25 23:08:30 +02:00
Alexandre Julliard
10dbd1edd1
ntdll: Move the libunwind support to the Unix library.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-25 23:08:30 +02:00
Paul Gofman
1f6423f778
ntdll: Call TLS callbacks for main exe on thread detach.
...
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-24 22:36:21 +02:00
Paul Gofman
1dc3383389
ntdll: Call TLS callbacks also for main exe on thread attach.
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=49007
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=49098
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=49041
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-24 22:36:19 +02:00
Rémi Bernon
f5a8ed47a3
ntdll: Leave some space around DbgBreakPoint and DbgUserBreakPoint.
...
CoD: Black Ops 3 and CoD: WWII modify these (and several others) and
expect to have enough space for a few instructions.
It then verifies later that the patches are still in place, and
terminates if the byte sequence do not match. Having small symbols can
make the patches to overlap and the check to fail.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-24 18:31:09 +02:00
Alexandre Julliard
438abad27c
ntdll: Set the Wine paths environment variables from the Unix library.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-24 18:31:09 +02:00
Alexandre Julliard
36e55720b6
ntdll: Store home directory and username at init time in the Unix library.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-24 09:20:33 +02:00
Paul Gofman
01143089f0
ntdll: Also call fsync() for FD_TYPE_CHAR in NtFlushBuffersFile().
...
Fixes a regression introduced by
3078f10d43
. Files of FD_TYPE_CHAR
were also flushed by fsync() on server before referenced commit.
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-23 22:38:05 +02:00
Alexandre Julliard
9b9845e43e
ntdll: Move the system information functions to the Unix library.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-23 20:23:55 +02:00
Alexandre Julliard
577b392440
ntdll: Move searching for builtin dlls to the Unix library.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-23 20:15:53 +02:00
Alexandre Julliard
31538a79a9
ntdll: Move the loading of .so dlls to the Unix library.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-23 20:09:42 +02:00
Alexandre Julliard
99649d7892
ntdll: Add a common helper for building a modref.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-23 19:31:18 +02:00
Rémi Bernon
b7ccb9d06a
ntdll: Only raise EXCEPTION_INVALID_HANDLE if debugger is present.
...
CoD: WWII writes to PEB->BeingDebugged field, so we cannot completely
trust it, but we can double check with ProcessDebugPort.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-23 10:16:14 +02:00
Rémi Bernon
537bb7a8ae
ntdll: Refine NtSetInformationThread ThreadHideFromDebugger stubs.
...
CoD: Black Ops 3 and CoD: WWII do each one of these calls and terminate
if they return unexpected results.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-23 10:12:31 +02:00
Alex Henrie
449b8c7e92
include: Add RTL_GENERIC_TABLE.
...
And fix RtlInitializeGenericTable's return type while updating the ntdll
functions to use the newly added typedefs.
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-22 21:04:40 +02:00
Paul Gofman
6d712a42ca
ntdll: Increment num_busy_workers when queuing TP object.
...
Otherwise two consequative submits may have the same
num_busy_workers value if threadpool_worker_proc did not
have a chance to pick the work in between. A new thread is
not created in tp_submit() for the second submit and if the
first submit queues an (infinitely long) wait
the next submitted callback is not called for indefinite
time period.
Fixes hang on exit in Detroit Become Human.
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-22 16:43:12 +02:00
Alexandre Julliard
67949d96a7
ntdll: Make the client cpu constant global.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-22 16:43:12 +02:00
Alexandre Julliard
9e3893cc29
ntdll: Use FSCTL_GET_OBJECT_ID to compare file identities.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-22 12:06:19 +02:00
Alexandre Julliard
251335cdf3
ntdll: Implement FSCTL_GET_OBJECT_ID to retrieve a file id.
...
It can be used instead of FileIdInformation to avoid depending on
mountmgr.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-22 12:05:15 +02:00
Alexandre Julliard
6ff0bb786c
ntdll: Set the Unix current directory also in the exec process case.
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=49425
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-22 12:04:35 +02:00
Alexandre Julliard
c468a36903
ntdll: Use unix_to_nt_file_name() to convert Unix paths in RtlGetFullPathName_U().
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-21 16:48:24 +02:00
Alexandre Julliard
a2c890c1e1
ntdll: Actually return an NT path in wine_unix_to_nt_file_name() for relative paths.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-19 18:34:40 +02:00
André Hentschel
5f9f827fd4
ntdll: Change master/slave to more neutral words.
...
Signed-off-by: André Hentschel <nerv@dawncrow.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-18 19:56:43 +02:00
Alexandre Julliard
78532a0c09
ntdll: Move the directory change functions to the Unix library.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-18 19:56:43 +02:00