Notes:
- kept byte_code as a 'DWORD *'. Alternative: use 'uint32_t *' instead, but would
require larger changes:
+ internally in wined3d
+ requiring also to typecast from 'DWORD *' (the type in D3D* interfaces), to
'uint32_t*' (to be decided where: either is every client, or inside wined3d)
- except in view.c, as most of definitions in wined3d_shader.h use uint32_t
(and using cast to store in wined3d_shader_desc)
// I'm not happy with this inconsistency. But even less happy with larger changes.
- kept state_id as DWORD (ditto previous commits)
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/1757
--
v2: vbscript: Implement SID_GetCaller for QueryService.
vbscript: Add a ServiceProvider stub.
jscript: Implement SID_GetCaller for QueryService.
mshtml: Set SCRIPTPROP_ABBREVIATE_GLOBALNAME_RESOLUTION properly.
mshtml: Implement location props when there's no URI.
https://gitlab.winehq.org/wine/wine/-/merge_requests/1733
> (The TlsIndex field in the LDR_DATA_TABLE_ENTRY structure appears to be unused except as a flag that the module has TLS (being always set to -1), at least as far back as Windows XP. It is worth mentioning that the WINE implementation of implicit TLS incorrectly uses TlsIndex as the real module TLS index, so it may be unreliable to assume that it is always -1 if you care about working on WINE.)
>
> \- http://www.nynaeve.net/?p=186
and the "links to that article but still doesn't work in wine" award goes to... [the D runtime](https://github.com/dlang/dmd/blob/6bf60ea0eb174631ede0074a77d3898d…! (Admittedly, there aren't too many ways to do what they're trying to do.)
With this, the D runtime will now work in Wine, even if in a dll loaded into an exe with no tls (which gets it the tls index 0)
The changes to the debugger are a bit icky, a possible alternative is to find some other easily-debugger-accessible place to stuff the tls index.
--
v5: ntdll: TlsIndex should not actually contain tls indices
winedbg: Don't expect TlsIndex to contain tls indices
https://gitlab.winehq.org/wine/wine/-/merge_requests/1578
Valgrind support requires a fork, which I've published to https://gitlab.winehq.org/rbernon/valgrind. The fork implements loading DWARF debug info from PE files, instead of the old and broken upstream PDB support. I've tried to upstream these changes a long time ago but didn't receive any feedback.
I think we could maybe consider keeping a fork, which I'm happy to maintain, as the changes aren't too large. We may want to investigate adding 32-on-64 support, which may require a bit more changes (to VEX specifically, because its amd64 guest doesn't support segment register manipulation).
The changes here are not all related to Valgrind, and I'll create separate MR for those which may make sense independently from Valgrind / GDB.
Also included is a suppression file to silent some annoying false positives, many of which are coming from the cross-stack accesses during syscalls, which are confusing Valgrind's stack heuristics. One can try this out with something like:
`WINELOADERNOEXEC=1 valgrind --suppressions=tools/valgrind.supp wine64/loader/wine64 wine64/programs/winecfg/winecfg.exe`
--
v3: ntdll: Tweak KeUserModeCallback to please Valgrind and GDB.
ntdll: Introduce a new ntdll_dispatch_syscall helper.
tools: Add suppressions from third party libraries.
ntdll: Fix valgrind notifications from ntdll.so.
ntdll: Import valgrind headers for PE side ntdll.
ntdll: Allocate a truly separate stack for the kernel stack.
ntdll: Maintain a PE module link map and expose it to GDB.
ntdll: Pass a UNICODE_STRING to load_builtin and virtual_map_image.
loader: Expose a shadow copy of ld.so link map to GDB.
ntdll: Add .cfi_signal_frame to __wine_syscall_dispatcher.
https://gitlab.winehq.org/wine/wine/-/merge_requests/1074
The glMapBuffer and al. functions are all duplicated between EXT/ARB and
core functions, and we reduced code duplication by redirecting the EXT
to the core functions.
The internal function table is only filled as the functions are queried,
and it causes crahes when games are using the EXT functions without
querying the core function first.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=53990
--
v2: opengl32: Avoid calling functions that have not been queried yet.
https://gitlab.winehq.org/wine/wine/-/merge_requests/1760