Alexandre Julliard
42a30a693a
makefiles: Move l_intl.nls to a new nls directory.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-11 09:05:33 +01:00
Alexandre Julliard
44ce5d9283
unicode: Support fetching a zip containining the data files.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-09 09:48:42 +01:00
Andrew Wesie
64d70b103d
ntdll: Add NtQueryVirtualMemory(MemoryWorkingSetExInformation).
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=45667
Signed-off-by: Andrew Wesie <awesie@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-07 13:25:37 +01:00
Dmitry Timoshkov
bbd73667d7
ntdll: Split logic for MemoryBasicInformation into a separate function.
...
Signed-off-by: Andrew Wesie <awesie@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-07 13:14:07 +01:00
Kevin Puetz
b6e91fa44b
ntdll: Allow NULL lpAssemblyDirectoryName in find_actctx_dll.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-05 21:32:00 +01:00
Rémi Bernon
544fd9504a
ntdll: Process system APCs while the signals are blocked.
...
This makes sure that system APC, such as APC_BREAK_PROCESS do not get
interrupted in the middle of their execution, and that the APC
completion notification is always correctly sent back to the caller.
Otherwise DbgBreakProcess sometimes did not return until
WaitForDebugEvent/ContinueDebugEvent are called, because of a race
condition between the APC servicing thread, and the newly created
exception thread.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-05 21:28:26 +01:00
Rémi Bernon
2dc99bfb30
ntdll: Handle system APCs in a separate inner loop.
...
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-05 21:28:24 +01:00
Rémi Bernon
3ffa355d2b
ntdll: Use the status to tell user APC from system APC.
...
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-05 21:28:21 +01:00
Rémi Bernon
6cb2336217
ntdll: Reorder code to make the select logic clearer.
...
The wait_select_reply call may return STATUS_USER_APC/STATUS_KERNEL_APC,
depending on which APC is about to be returned but the apc call will
always be APC_NONE right after the wait. It needs an additional select
request to actually return the call.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-05 21:28:18 +01:00
Rémi Bernon
676ad9b0af
server: Use STATUS_KERNEL_APC to indicate system APCs.
...
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-05 21:28:15 +01:00
Alexandre Julliard
6346809302
unicode: Move the combining class table to ntdll.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-04 21:30:26 +01:00
Alexandre Julliard
cd8eaef47e
unicode: Avoid copying the decomposition data when not necessary.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-04 21:30:26 +01:00
Alexandre Julliard
a7cc191aa8
ntdll: Fix estimated buffer sizes in RtlNormalizeString().
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-03 20:48:03 +01:00
Alexandre Julliard
dcd195e0f1
ntdll: Add parameter checking in RtlNormalizeString().
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-03 19:20:39 +01:00
Alexandre Julliard
cc300a20b3
libport: Move Unicode normalization implementation to ntdll.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-03 19:20:39 +01:00
Zebediah Figura
b41ab972ec
ntdll: Support the %I format modifier.
...
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-01-31 10:20:42 +01:00
Zebediah Figura
9c3dcdfb6c
ntdll/tests: Add more tests for printf format specifiers.
...
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-01-31 10:20:39 +01:00
Rémi Bernon
d03420da12
ntdll: Don't change RtlWaitOnAddress size after user invoke_apc.
...
This makes the next iteration to immediately return STATUS_SUCCESS
because of compare_addr returning FALSE with size == 0.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-01-29 20:42:16 +01:00
Alexandre Julliard
c599ec1494
libwine: Make some loader functions obsolete.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-01-29 20:14:54 +01:00
Alexandre Julliard
39138478fd
libwine: Make some functions obsolete.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-01-29 20:14:54 +01:00
Alexandre Julliard
4b5c67ee0b
unicode: Remove case mappings that don't round-trip.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-01-23 21:11:29 +01: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
Alex Henrie
42525d8516
ntdll/tests: Fix expected RtlIpv6StringToAddress terminator output.
...
The "broken" function was applied to the wrong condition in the "ok"
statement (RtlIpv6StringToAddress is supposed to set the terminator to
the first character after the address, not the second-to-last character
of the address). However, since this test is already being skipped on XP
and Vista and we really don't need a test for how exactly XP and Vista
are broken, we can just delete it.
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-01-05 17:34:52 +01:00
Zebediah Figura
230a09b707
ntdll: Fix a typo in get_current_directory().
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=48415
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-01-05 17:34:17 +01:00
Alexandre Julliard
d96331d830
ntdll: Make loop counter signed.
...
Spotted by Gianfranco Costamagna.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=48398
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-01-04 11:22:08 +01:00
Zebediah Figura
7662fe0b47
ntdll/tests: Fix some exception test failures.
...
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-01-02 19:16:02 +01:00
Zebediah Figura
d409ef0188
ntdll: Avoid debug traces in _vsnprintf().
...
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-01-02 17:39:28 +01:00
Zebediah Figura
3b09a6b1bc
ntdll/tests: Fix some test failures with Windows 10.
...
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-30 21:11:45 +01:00
Alexandre Julliard
aeab1b2a6b
ntdll: Fix memory leak in RtlNormalizeString().
...
Spotted by Piotr Caban.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-30 21:11:38 +01:00
Alexandre Julliard
ddb6f150e1
ntdll: Fix memory corruption in RtlNormalizeString().
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-27 17:58:34 +01:00
Rémi Bernon
5eca6ffa8b
ntdll: Start find_free_area from address_space_start instead of 0.
...
The search was initiated with base == 0, which returns NULL immediately
if MEM_TOP_DOWN is not used. Use address_space_start instead.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47974
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-27 11:11:19 +01:00
Rémi Bernon
1a44ef3237
ntdll: Replace incorrect find_free_reserved_area function call.
...
This introduces map_free_area function which tries mapping the expected
free areas until it finds one that succeeds. It now also works for
memory regions outside of the reserved region, but could probably be
improved.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-27 11:11:16 +01:00
Rémi Bernon
cec83fede4
ntdll: Split view search initialization to find_view_inside_range function.
...
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-27 11:11:08 +01:00
Rémi Bernon
d840d7852b
ntdll: Rename find_free_area to find_reserved_free_area.
...
We used this function to find free areas outside of the reserved range,
and it's obviously incorrect as there can be some system or external
memory mapping we don't know about.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-27 11:03:19 +01:00
Zebediah Figura
347b3b42fe
ntdll/tests: Remove a no longer reliable test.
...
On Windows 10 version 1607, a process called "Memory Compression" violates this
invariant.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-26 22:08:32 +01:00
Dmitry Timoshkov
b95d2f553c
ntdll: Use default casemap and codepage file names if the value in registry is empty.
...
This helps to keep compatibility with old prefixes being reused for wine-5.0.
Old prefixes in their registry have
[System\\CurrentControlSet\\Control\\Nls\\Codepage]
"37"=""
[System\\CurrentControlSet\\Control\\Nls\\Language]
"0409"=""
and this leads to LCMapString(LCMAP_LOWERCASE/LCMAP_UPPERCASE) return garbage.
This is a regression caused by 94a3add0ea
.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-24 20:21:11 +01:00
Erich E. Hoover
94675cd8e3
ntdll: Drop support for floating point numbers in sscanf.
...
Takes care of one more use of "long double".
Signed-off-by: Erich E. Hoover <erich.e.hoover@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-23 10:51:08 +01:00
Alexandre Julliard
238c6be5b8
ntdll: Silence the timezone fixme when the registry is empty.
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=48300
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-17 19:39:14 +01:00
Alexandre Julliard
f391ae901e
ntdll: Fix loading the main binary as PE file with an explicit dll override.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-17 16:55:15 +01:00
Alexandre Julliard
8b0a7b2503
ntdll: Fix RtlQueryUnbiasedInterruptTime() prototype.
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=48239
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-16 18:44:57 +01:00
Zebediah Figura
18c3c2c78b
ntdll: Return -1 from Unix code page conversion functions if an error was encountered.
...
If 0 is returned, the caller has no way of determining this. This fixes a
test failure in kernel32:change introduced by f46fa9c92
.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-16 11:57:27 +01:00
Paul Gofman
74a74556dd
server: Support creating processes with specified parent.
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47817
Signed-off-by: Paul Gofman <gofmanp@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-13 13:13:36 +01:00
Francois Gouget
101be282a6
ntdll: Fix the spelling of some comments.
...
Signed-off-by: Francois Gouget <fgouget@free.fr>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-12 23:17:05 +01:00
Alexandre Julliard
6731f33d40
ntdll: Add status code for ELOOP error.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-11 21:51:28 +01:00
Alexandre Julliard
30e5f1215e
kernel32: Remove __wine_kernel_init().
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-10 18:24:32 +01:00
Nikolay Sivov
a5bc81ebe5
ntdll/tests: Enable some more string API tests.
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-09 23:47:45 +01:00
Alexandre Julliard
5de7b6a159
ntdll: Fix contents of the glyph table in generated codepage data.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-06 22:30:23 +01:00
Alexandre Julliard
117dbfa2cf
ntdll: Fix DBCS mappings in RtlCustomCPToUnicodeN().
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-06 19:50:06 +01:00
Paul Gofman
923e62eb55
ntdll: Add DECLSPEC_HOTPATCH to NtProtectVirtualMemory().
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=48077
Signed-off-by: Paul Gofman <gofmanp@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-04 16:57:13 +01:00
Alexandre Julliard
331947c993
kernel32: Move some initialization code to ntdll.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-04 16:03:48 +01:00
Alexandre Julliard
d33504b9bb
kernel32: Use the Rtl UTF8 conversion functions.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-04 16:03:48 +01:00
Alexandre Julliard
f46fa9c92d
ntdll: Use the Rtl UTF8 conversion functions.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-04 16:03:48 +01:00
Alexandre Julliard
27f0426b6f
ntdll: Implement RtlUTF8ToUnicodeN.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-04 16:03:48 +01:00
Alexandre Julliard
0b39344ef0
ntdll: Reimplement RtlUnicodeToUTF8N.
...
This avoids relying on wine_utf8_wcstombs().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-04 16:03:48 +01:00
Nikolay Sivov
b0951ba860
ntdll: Add support for querying thread suspend count.
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-03 21:27:14 +01:00
Nikolay Sivov
7082ebc608
ntdll: Use better type for thread description info structure.
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-03 21:27:14 +01:00
Alexandre Julliard
bba33e5391
ntdll: Get rid of __wine_init_codepages().
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-03 09:30:43 +01:00
Alexandre Julliard
3ebe447507
ntdll: Reimplement Unicode case mapping functions using the Win32-format tables.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-03 09:30:43 +01:00
Alexandre Julliard
dd572e9a2d
ntdll: Reimplement Unicode to multibyte conversion functions using the Win32-format tables.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-03 09:30:43 +01:00
Alexandre Julliard
e13c4d859e
ntdll: Reimplement multibyte to Unicode conversion functions using the Win32-format tables.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-03 09:30:43 +01:00
Alexandre Julliard
b7fcb956ef
ntdll: Avoid memory allocations in RtlUpcaseUnicodeString functions.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-03 09:30:43 +01:00
Alexandre Julliard
0e97fe86fd
ntdll: Implement custom codepage conversion functions.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-03 09:30:43 +01:00
Anastasios Simeonidis
0b6c3a4460
ntdll/tests: Add relationship tests for NtQuerySystemInformationEx.
...
Signed-off-by: Anastasios Simeonidis <symeonidis@csd.auth.gr>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-02 22:02:56 +01:00
Anastasios Simeonidis
440a06f7f5
ntdll: Implement relationship filtering for create_logical_proc_info on linux.
...
Also calculate all_cpus_mask on first pass.
Signed-off-by: Anastasios Simeonidis <symeonidis@csd.auth.gr>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-02 22:02:56 +01:00
Anastasios Simeonidis
9885b0acbb
ntdll: Move relationship filtering to create_logical_proc_info.
...
Signed-off-by: Anastasios Simeonidis <symeonidis@csd.auth.gr>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-02 22:02:56 +01:00
Alexandre Julliard
dd73223289
ntdll: Remove trailing \n in fatal_perror() calls.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-29 17:50:48 +01:00
Chip Davis
289d456dd6
ntdll: Fix tick count calculation on Mac.
...
Inspired by a patch by Andrew Eikum.
macOS's mach_absolute_time() stops counting when the computer goes to
sleep/suspend/hibernate/etc. However, Windows's GetTickCount() does not
stop counting. mach_continuous_time() matches Windows's behavior.
BSD's CLOCK_MONOTONIC already counts asleep time.
Unfortunately, there is no clock source on Linux which does exactly what
we want. CLOCK_MONOTONIC_RAW is unaffected by NTP adjustment, but like
mach_absolute_time() doesn't keep ticking when the computer is asleep.
CLOCK_BOOTTIME does keep ticking, but it is affected by NTP adjustments.
CLOCK_MONOTONIC has both problems. What's needed is a
CLOCK_BOOTTIME_RAW, which would not be slewed by adjtimex(2) and would
count time spent asleep.
To avoid issues with skew and performance, this patch falls back to
mach_absolute_time() on macOS if mach_continuous_time() is unavailable.
Note that mach_continuous_time() was introduced in macOS 10.12, meaning
that if the minimum version required is less than that, it will be
linked weakly. Therefore we must check that it is nonnull before
attempting to call it.
Signed-off-by: Chip Davis <cdavis@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-28 20:45:46 +01:00
Alexandre Julliard
f206081241
ntdll: Keep a valid DOS name if the initial current directory is a Unix dir.
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=48114
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-28 20:45:46 +01:00
Alexandre Julliard
1902ab4d85
ntdll: Don't fail to load data file when the registry key is missing.
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=48188
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-28 10:06:25 +01:00
Gijs Vermeulen
9bd292127e
ntdll: Fix implicit declaration of mach_port_deallocate.
...
Signed-off-by: Gijs Vermeulen <gijsvrm@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-27 22:05:09 +01:00
Chip Davis
0d1029e829
ntdll: Fix macOS build.
...
Signed-off-by: Chip Davis <cdavis@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-26 22:49:03 +01:00
Alexandre Julliard
ea20035272
ntdll: Generate a Windows format codepage table using the libwine data.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-26 20:43:52 +01:00
Alexandre Julliard
c0ff49061f
ntdll Implement RtlInitNlsTables() and RtlResetRtlTranslations().
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-26 20:43:52 +01:00
Alexandre Julliard
9ae5717ba6
ntdll: Implement RtlInitCodePageTable().
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-26 20:43:52 +01:00
Alexandre Julliard
f5c4a89cf2
ntdll: Implement NtGetNlsSectionPtr().
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-26 18:03:16 +01:00
Nikolay Sivov
b934f6626e
ntdll: Implement thread description as information class.
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-26 16:32:32 +01:00
Chip Davis
eea87600d2
ntdll: Implement SystemBatteryState for Mac OS.
...
Signed-off-by: Chip Davis <cdavis@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-25 20:47:43 +01:00
Francois Gouget
ca577af1bc
ntdll: S/4Gb/4GB/ in a comment since it refers to bytes.
...
Signed-off-by: Francois Gouget <fgouget@free.fr>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-21 19:01:10 +01:00
Alexandre Julliard
c77cb5a5f7
ntdll: Handle version parsing in Unicode.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-21 19:01:10 +01:00
Alexandre Julliard
fd588a22b7
kernel32: Move string normalization functions to ntdll.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-21 10:43:46 +01:00
Alexandre Julliard
f1bfd2c0b1
ntdll: Initialize the system and user locales directly in ntdll.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-20 16:25:16 +01:00
Alexandre Julliard
599deed91c
ntdll: Fix counting of environment strings.
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=48141
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-20 16:25:16 +01:00
Alexandre Julliard
7ac7a902c8
ntdll: Implement RtlLocaleNameToLcid().
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-19 23:15:04 +01:00
Alexandre Julliard
4538a137e0
ntdll: Move locale functions to a new locale.c file.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-19 23:15:04 +01:00
Alexandre Julliard
dad14ab833
ntdll: Support SystemPerformanceInformation on non-Linux platforms.
...
Based on the GlobalMemoryStatusEx implementation.
2019-11-19 23:15:04 +01:00
Alexandre Julliard
eee3a4e84a
kernel32: Move support for starting Unix processes to ntdll.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-12 22:05:58 +01:00
Alexandre Julliard
1deefb84ee
kernel32: Use RtlCreateUserProcess() to start new processes.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-12 22:05:58 +01:00
Alexandre Julliard
83e520f556
kernel32: Move exec process functionality to ntdll.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-11 22:58:00 +01:00
Piotr Caban
b4ec402859
ntdll: Work around futimens weak linking problem in set_file_times.
...
Newer XCode versions are weak linking to futimens function. Because of
that Wine will crash trying to execute the function on Mac OS <= 10.12.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-07 21:49:53 +01:00
Alexandre Julliard
b0199ea2fe
ntdll: Load the main binary directly in ntdll when possible.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-07 19:24:19 +01:00
Alexandre Julliard
608d086f1b
ntdll: Move some initializations out of thread_init().
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-07 17:05:56 +01:00
Alexandre Julliard
b7db0b52ce
ntdll: Initialize earlier things that need the executable name.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-07 16:54:31 +01:00
Zebediah Figura
3ede217e5c
ntdll: Fix a typo.
...
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-07 14:10:14 +01:00
Alexandre Julliard
051a8ddd04
ntdll: Support running .exe.so binaries in RtlCreateUserProcess().
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-07 12:34:28 +01:00
Zebediah Figura
87307de217
ntdll: Set the ProgramFiles(x86) and CommonProgramFiles(x86) environment variables.
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=40950
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-06 09:32:38 +01:00
Alexandre Julliard
3dadd980bf
ntdll: Directly allocate the final process parameters structure.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-05 13:25:03 +01:00
Alexandre Julliard
e5354008f4
kernel32: Move initialization of the WoW64 environment to ntdll.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-05 13:25:02 +01:00
Alexandre Julliard
461b5e56f9
kernel32: Move support for running wineboot to ntdll.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-05 13:25:02 +01:00
Alexandre Julliard
326df4c180
ntdll: Support running a builtin without corresponding file in RtlCreateUserProcess().
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-05 11:03:54 +01:00
Alexandre Julliard
6a0e0001ef
ntdll: Initialize FPU context on ARM64.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-04 09:58:45 +01:00
Alexandre Julliard
85f1fbdb7e
server: Clarify naming of ARM64 floating-point registers.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-04 09:58:45 +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
Alexandre Julliard
1b3fa02190
ntdll: Initialize MxCsr for new threads on x86.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-02 14:46:02 +01:00
Alistair Leslie-Hughes
4a1bbff61b
ntdll: Fix compile error on macos.
...
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-01 10:31:10 +01:00
Alex Henrie
63ddf0343b
ntdll: Implement NtPowerInformation(SystemBatteryState) on Linux.
...
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-31 19:38:42 +01:00
Andrew Eikum
9e817f8f8b
ntdll: Add missing spec file entry for EtwEventWriteString.
...
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-31 17:44:06 +01:00
Andrew Eikum
364d654ba3
advapi32: Add EventRegister and EventUnregister tests.
...
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-31 17:43:58 +01:00
Piotr Caban
92731ccbbe
ntdll: Use SIZE_T to store passed buffer size in sprintf.
...
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-31 00:33:46 +01:00
Sven Baars
e8f4251423
ntdll/tests: Fix some test failures on Windows 10.
...
Signed-off-by: Sven Baars <sven.wine@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-28 21:58:32 +01:00
Brendan Shanks
aa51aee1a9
ntdll: Enable WoW64 filesystem redirection when loading libraries.
...
This matches the behavior seen on Windows 7/2008R2 and newer.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47912
Signed-off-by: Brendan Shanks <bshanks@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-28 21:11:48 +01:00
Alexandre Julliard
5b1fc81908
ntdll: Hardcode address space limits for ARM platforms.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-28 21:07:53 +01:00
Alexandre Julliard
5c101ed58f
ntdll: Fix unwinding of leaf functions on ARM64.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-23 21:09:38 +02: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
Alexandre Julliard
fd3735cf4d
kernel32: Move dll load path initialization to ntdll.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-22 23:04:26 +02:00
Alexandre Julliard
2607bfa28f
kernel32: Move command line initialization to ntdll.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-22 23:04:26 +02:00
Alexandre Julliard
ee56be3fcd
kernel32: Move Unicode argv initialization to ntdll.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-22 23:04:26 +02:00
Alexandre Julliard
075741b681
kernel32: Move image path name initialization to ntdll.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-22 23:04:26 +02:00
Alexandre Julliard
6b528d526d
kernel32: Move additional environment initialization to ntdll.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-22 23:04:26 +02:00
Alexandre Julliard
628ca4aafe
kernel32: Move registry environment initialization to ntdll.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-22 23:04:26 +02:00
Alexandre Julliard
a511057f7e
kernel32: Move Unix environment initialization to ntdll.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-22 23:04:26 +02:00
Alexandre Julliard
cac9599207
kernel32: Move process name initialization to ntdll.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-22 23:04:26 +02:00
Alexandre Julliard
305b5a44c5
kernel32: Move current directory initialization to ntdll.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-22 23:04:26 +02:00
Alexandre Julliard
e4595a0ce8
ntdll: Always add path separator when looking for a relative path name.
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47979
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-22 09:57:23 +02:00
Vijay Kiran Kamuju
1aff1e6a37
ntdll: Fix the SYSTEM_MODULE struct field names.
...
Based on https://www.geoffchappell.com/studies/windows/km/ntoskrnl/api/rtl/ldrreloc/process_module_information.htm?ts=0,44
Signed-off-by: Vijay Kiran Kamuju <infyquest@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-21 19:56:26 +02:00
Alexandre Julliard
6d8c58d7cc
kernel32: Retrieve the Unix codepage from ntdll.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-19 14:19:32 +02:00
Alexandre Julliard
4f42088762
ntdll: Initialize Unix codepage early during startup.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-19 14:16:19 +02:00
Alexandre Julliard
98238aa873
ntdll: Disallow changing DEP flags on 64-bit.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-16 16:51:21 +02:00
Evgeny Litvinenko
893e9d1b72
ntdll: Solaris requires sys/regset.h.
...
Signed-off-by: Evgeny Litvinenko <evgeny.v.litvinenko@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-08 10:58:09 +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
Akihiro Sagawa
aade0bf7e3
ntdll: Add exception handling around DbgBreakPoint.
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47509
Signed-off-by: Akihiro Sagawa <sagawa.aki@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-03 22:58:07 +02:00
Alexandre Julliard
a5d45e9ae5
kernel32: Move exe path functions to ntdll.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-03 22:58:06 +02:00
Alexandre Julliard
619bd16e7a
kernel32: Move dll path functions to ntdll.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-03 22:56:14 +02:00
Alexandre Julliard
a0a2b25a44
kernel32: Move Get/SetDllDirectory() implementation to ntdll.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-01 15:14:08 +02:00
Alexandre Julliard
5f938bb51b
ntdll: Implement RtlGetSearchPath().
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-01 15:14:08 +02:00
Alexandre Julliard
444933ae04
ntdll: Implement RtlSetSearchPathMode().
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-01 09:43:27 +02:00
Zebediah Figura
d1a259d1a6
ntdll: Implement NtQueryInformationFile(FileAttributeTagInformation).
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47813
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-26 21:02:37 +02:00
Alex Henrie
34e15e5a1d
ntdll/tests: Add tests for NtPowerInformation(SystemBatteryState).
...
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-26 21:00:13 +02:00
Sebastian Lackner
b45d612549
ntdll: Execute queued APCs before starting a process.
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=35561
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-23 19:44:17 +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
Alex Henrie
eb699821d0
ntdll: Ensure that performance information is initialized (scan-build).
...
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-19 22:07:53 +02:00
Alexandre Julliard
82c753a273
ntdll: Send first chance debug event while on signal stack on ARM64.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-19 22:07:53 +02:00
Alexandre Julliard
afe8467110
ntdll: Avoid server call when possible in NtSetContextThread() on ARM64.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-19 22:07:53 +02:00
Alexandre Julliard
7ee66b29cb
ntdll: Send first chance debug event while on signal stack on i386.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-18 18:16:54 +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
Alexandre Julliard
5f10545b19
ntdll: Don't use virtual_uninterrupted_read_memory() for invalid %gs check.
...
It doesn't work for code in system libraries. This is a partial revert
of 58139dcb12
.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47769
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-17 16:50:44 +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
Alex Henrie
6ea282c7e1
ntdll: Avoid dead initialization (scan-build).
...
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-16 10:14:02 +02:00
Alexandre Julliard
944c4e8f76
ntdll: Use virtual_uninterrupted_read_memory() to read code inside signal handler on i386.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-13 19:34:19 +02:00
Alexandre Julliard
17c82ddc95
ntdll: Avoid calling init_handler() twice in signal handler on i386.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-13 19:34:19 +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
Dmitry Timoshkov
3b2937f7c7
ntdll: Implement RtlUnicodeToUTF8N.
...
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-12 22:47:45 +02:00
Dmitry Timoshkov
65e1ed3480
ntdll/tests: Fix compilation with PSDK compiler.
...
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-12 22:47:45 +02:00
Alexandre Julliard
2201229086
ntdll: Remove no longer needed function argument from setup_raise_exception() on ARM64.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-12 22:47:45 +02:00
Alexandre Julliard
60eb37c6be
ntdll: Handle page fault in signal handler on ARM64.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-12 22:47:44 +02:00
Alexandre Julliard
a7459d0c99
ntdll: Handle trap exception in signal handler on ARM64.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-12 22:47:44 +02:00
Alexandre Julliard
769c333c6c
ntdll: Factor out setup_raise_exception() on ARM64.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-12 22:47:44 +02:00
Alexandre Julliard
7736f3837e
ntdll: Use a stack_layout structure to build exception data on ARM64.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-12 22:47:44 +02:00
Alexandre Julliard
d9ec920fd9
ntdll: Remove no longer needed function argument from setup_raise_exception() on i386.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-12 22:47:44 +02:00
Alexandre Julliard
5501055ed5
ntdll: Handle ATL thunk emulation in signal handler on i386.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-12 22:47:44 +02:00
Alexandre Julliard
df3fad6383
ntdll: Handle page faults in signal handler on i386.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-12 21:07:05 +02:00
Alexandre Julliard
58139dcb12
ntdll: Handle invalid %gs fault in signal handler on i386.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-12 20:32:30 +02:00
Alexandre Julliard
0bd2465326
ntdll: Handle breakpoint interrupt in signal handler on i386.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-12 20:32:28 +02:00
Alexandre Julliard
846de4aef8
ntdll: Handle alignment fault in signal handler on i386.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-12 20:28:19 +02:00
Alexandre Julliard
5e2b0585cd
ntdll: Handle single step exception in signal handler on i386.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-12 20:27:39 +02:00
Alexandre Julliard
41509c0d5b
ntdll: Factor out setup_raise_exception() on i386.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-12 20:27:38 +02:00
Alexandre Julliard
04c73a8930
ntdll: Use a stack_layout structure to build exception data on i386.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-12 20:25:39 +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
Alexandre Julliard
0617b490b3
ntdll: Add partial implementation for IOCTL_SERIAL_GET_PROPERTIES.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-09 21:05:01 +02:00
Daniel Lehman
3462b4d1f2
ntdll/tests: Adjust timing on RtlWaitOnAddress tests.
...
Signed-off-by: Daniel Lehman <dlehman25@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-09 16:25:55 +02:00
Alexandre Julliard
44efb1a026
ntdll: Allocate environment blocks from the process heap.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-09 16:25:55 +02:00
Alexandre Julliard
a311140f93
kernel32: Move QueryPerformanceCounter/Frequency functions to ntdll.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-09 16:25:55 +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
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
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
Gabriel Ivăncescu
ec4752cef2
ntdll: Define AT_NO_AUTOMOUNT if needed.
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47445
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-07-31 09:27:58 +02:00
Jacek Caban
5e0b0d3521
server: Rename cpu_type_t to client_cpu_t.
...
To avoid conflicts with mac headers.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-07-05 17:43:53 +02:00
Jacek Caban
7f9faf10c7
ntdll: Implement DbgUiIssueRemoteBreakin.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-07-05 17:42:04 +02:00
Jacek Caban
4c2afc8ad9
ntdll: Implement _snprintf_s and _vsnprintf_s.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-07-03 23:44:24 +02:00
Jacek Caban
b350095b76
ntdll: Move null terminating result to pf_vsnprintf callers.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-07-03 23:44:24 +02:00
Hans Leidekker
5252d76003
ntdll: Use the machine ID for the system UUID on Linux.
...
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-07-02 20:03:20 +02:00
Hans Leidekker
16e5c78bfe
ntdll: Use a common structure for the SMBIOS table entry header.
...
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-07-02 20:02:32 +02:00
Hans Leidekker
bd8ce4c1b1
ntdll: Fix sysfs path for the product name.
...
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-07-02 20:02:27 +02:00
Alexandre Julliard
21d91ef04b
ntdll: Initialize filesystem redirects before kernel32 is loaded.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-07-02 12:36:05 +02:00
Zebediah Figura
bf891f34af
ntdll: Correctly fill DataTransferLength in SCSI_PASS_THROUGH and SCSI_PASS_THROUGH_DIRECT.
...
DataTransferLength specifies the number of bytes transferred, but
sg_io_hdr_t.resid gives the number of bytes *not* transferred:
https://www.tldp.org/HOWTO/SCSI-Generic-HOWTO/x356.html
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47424
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-07-02 08:00:13 +02:00
Hans Leidekker
a8745d1211
ntdll: Support NtQuerySystemInformation(SystemFirmwareTableInformation) on macOS.
...
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-07-01 14:41:47 +02:00
Dmitry Timoshkov
84a46a27e7
ntdll: Add '-norelay' flag for _vsnprintf().
...
Otherwise for instance +relay,+ver log has ver: traces completely messed up.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-07-01 14:41:25 +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
Alexandre Julliard
d5249c0f6d
advapi32: Move MD5 implementation to ntdll.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-06-24 15:00:29 +02:00
Alexandre Julliard
5768fd6dd2
advapi32: Move MD4 implementation to ntdll.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-06-24 15:00:29 +02:00
Alexandre Julliard
45e0f91de1
advapi32: Move SHA1 implementation to ntdll.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-06-24 14:52:10 +02:00
Alexandre Julliard
f535bcb2e6
advapi32: Move more event log stubs to ntdll.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-06-24 14:52:08 +02:00
Fabian Maurer
6525a16673
ntdll: Check the activation context before looking for the module basename.
...
Signed-off-by: Fabian Maurer <dark.shadow4@web.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-06-24 10:50:53 +02:00
Alexandre Julliard
91bbc46c99
ntdll: Try to use the name of the PE file also when loading .so builtin.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-06-24 10:50:53 +02:00
Rémi Bernon
4c750a35c3
ntdll: Pass the alignment parameter down to map_view instead of mask.
...
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-20 22:32:42 +02:00
Rémi Bernon
be48a56e70
ntdll: Clarify NtMapViewOfSection zero_bits parameter semantics.
...
See 00451d5edf
.
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-20 22:32:42 +02:00
Rémi Bernon
bec9a63f7a
ntdll/tests: Add more NtMapViewOfSection tests with zero_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-20 22:32:42 +02:00
Rémi Bernon
d1b7e01e5e
ntdll/tests: Move NtMapViewOfSection tests from kernel32/tests.
...
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-20 22:32:40 +02:00
Rémi Bernon
3acc123ed3
ntdll/tests: Cleanup NtAllocateVirtualMemory related tests.
...
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-20 22:23:03 +02:00
Alexandre Julliard
a226e2b7a9
ntdll: Use .so builtin if found instead of falling back to the installed PE file.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-06-19 11:47:34 +02:00
Alexandre Julliard
bdd48b41d3
ntdll: Make the standard C functions available for importing.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-06-18 23:51:51 +02:00