Wine-Devel
By thread
wine-devel@list.winehq.org
By month
Messages by month
- ----- 2026 -----
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2005 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2004 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2003 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2002 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2001 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
November 2021
- 83 participants
- 2620 messages
[PATCH v2] ntdll: Don't constraint TEB address to 2GB for native x64 process.
by Paul Gofman
Signed-off-by: Paul Gofman <pgofman(a)codeweavers.com>
---
v2:
- don't change virtual_alloc_first_teb().
dlls/ntdll/unix/virtual.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/dlls/ntdll/unix/virtual.c b/dlls/ntdll/unix/virtual.c
index 756a7388a22..f62ca1f5f01 100644
--- a/dlls/ntdll/unix/virtual.c
+++ b/dlls/ntdll/unix/virtual.c
@@ -3021,6 +3021,7 @@ NTSTATUS virtual_alloc_teb( TEB **ret_teb )
void *ptr = NULL;
NTSTATUS status = STATUS_SUCCESS;
SIZE_T block_size = signal_stack_mask + 1;
+ BOOL is_wow = !!NtCurrentTeb()->WowTebOffset;
server_enter_uninterrupted_section( &virtual_mutex, &sigset );
if (next_free_teb)
@@ -3035,7 +3036,7 @@ NTSTATUS virtual_alloc_teb( TEB **ret_teb )
{
SIZE_T total = 32 * block_size;
- if ((status = NtAllocateVirtualMemory( NtCurrentProcess(), &ptr, is_win64 ? 0x7fffffff : 0,
+ if ((status = NtAllocateVirtualMemory( NtCurrentProcess(), &ptr, is_win64 && is_wow ? 0x7fffffff : 0,
&total, MEM_RESERVE, PAGE_READWRITE )))
{
server_leave_uninterrupted_section( &virtual_mutex, &sigset );
@@ -3048,7 +3049,7 @@ NTSTATUS virtual_alloc_teb( TEB **ret_teb )
NtAllocateVirtualMemory( NtCurrentProcess(), (void **)&ptr, 0, &block_size,
MEM_COMMIT, PAGE_READWRITE );
}
- *ret_teb = teb = init_teb( ptr, !!NtCurrentTeb()->WowTebOffset );
+ *ret_teb = teb = init_teb( ptr, is_wow );
server_leave_uninterrupted_section( &virtual_mutex, &sigset );
if ((status = signal_alloc_thread( teb )))
--
2.33.1
Nov. 4, 2021
[PATCH 2/2] d3dx10: Implement D3DX10CreateTextureFromResource{A,W}.
by Ziqing Hui
Signed-off-by: Ziqing Hui <zhui(a)codeweavers.com>
---
dlls/d3dx10_43/tests/d3dx10.c | 7 ++----
dlls/d3dx10_43/texture.c | 46 ++++++++++++++++++++++++++++++++---
2 files changed, 44 insertions(+), 9 deletions(-)
diff --git a/dlls/d3dx10_43/tests/d3dx10.c b/dlls/d3dx10_43/tests/d3dx10.c
index 50128260b3e..55a4d057fdf 100644
--- a/dlls/d3dx10_43/tests/d3dx10.c
+++ b/dlls/d3dx10_43/tests/d3dx10.c
@@ -2076,8 +2076,6 @@ static void test_create_texture(void)
/* D3DX10CreateTextureFromResource tests */
- todo_wine
- {
hr = D3DX10CreateTextureFromResourceW(device, NULL, NULL, NULL, NULL, &resource, NULL);
ok(hr == D3DX10_ERR_INVALID_DATA, "Got unexpected hr %#x.\n", hr);
hr = D3DX10CreateTextureFromResourceW(device, NULL, L"deadbeef", NULL, NULL, &resource, NULL);
@@ -2086,7 +2084,6 @@ static void test_create_texture(void)
ok(hr == D3DX10_ERR_INVALID_DATA, "Got unexpected hr %#x.\n", hr);
hr = D3DX10CreateTextureFromResourceA(device, NULL, "deadbeef", NULL, NULL, &resource, NULL);
ok(hr == D3DX10_ERR_INVALID_DATA, "Got unexpected hr %#x.\n", hr);
- }
for (i = 0; i < ARRAY_SIZE(test_image); ++i)
{
@@ -2095,7 +2092,7 @@ static void test_create_texture(void)
hr = D3DX10CreateTextureFromResourceW(device, resource_module,
test_resource_name, NULL, NULL, &resource, NULL);
- todo_wine
+ todo_wine_if(test_image[i].expected_info.MiscFlags & D3D10_RESOURCE_MISC_TEXTURECUBE)
ok(hr == S_OK || broken(hr == E_FAIL && test_image[i].expected_info.ImageFileFormat == D3DX10_IFF_WMP),
"Got unexpected hr %#x.\n", hr);
if (hr == S_OK)
@@ -2107,7 +2104,7 @@ static void test_create_texture(void)
hr = D3DX10CreateTextureFromResourceA(device, resource_module,
get_str_a(test_resource_name), NULL, NULL, &resource, NULL);
- todo_wine
+ todo_wine_if(test_image[i].expected_info.MiscFlags & D3D10_RESOURCE_MISC_TEXTURECUBE)
ok(hr == S_OK || broken(hr == E_FAIL && test_image[i].expected_info.ImageFileFormat == D3DX10_IFF_WMP),
"Got unexpected hr %#x.\n", hr);
if (hr == S_OK)
diff --git a/dlls/d3dx10_43/texture.c b/dlls/d3dx10_43/texture.c
index 62baed0ca23..3488c80ab29 100644
--- a/dlls/d3dx10_43/texture.c
+++ b/dlls/d3dx10_43/texture.c
@@ -626,17 +626,55 @@ HRESULT WINAPI D3DX10CreateTextureFromFileW(ID3D10Device *device, const WCHAR *s
HRESULT WINAPI D3DX10CreateTextureFromResourceA(ID3D10Device *device, HMODULE module, const char *resource,
D3DX10_IMAGE_LOAD_INFO *load_info, ID3DX10ThreadPump *pump, ID3D10Resource **texture, HRESULT *hresult)
{
- FIXME("device %p, module %p, resource %s, load_info %p, pump %p, texture %p, hresult %p stub!\n",
+ HRSRC res_info;
+ void *buffer;
+ DWORD size;
+ HRESULT hr;
+
+ TRACE("device %p, module %p, resource %s, load_info %p, pump %p, texture %p, hresult %p.\n",
device, module, debugstr_a(resource), load_info, pump, texture, hresult);
- return E_NOTIMPL;
+
+ if (!resource || !texture)
+ return D3DX10_ERR_INVALID_DATA;
+
+ if (!(res_info = FindResourceA(module, resource, (const char *)RT_RCDATA)))
+ {
+ /* Try loading the resource as bitmap data */
+ if (!(res_info = FindResourceA(module, resource, (const char *)RT_BITMAP)))
+ return D3DX10_ERR_INVALID_DATA;
+ }
+
+ if (FAILED(hr = load_resource(module, res_info, &buffer, &size)))
+ return D3DX10_ERR_INVALID_DATA;
+
+ return D3DX10CreateTextureFromMemory(device, buffer, size, load_info, pump, texture, hresult);
}
HRESULT WINAPI D3DX10CreateTextureFromResourceW(ID3D10Device *device, HMODULE module, const WCHAR *resource,
D3DX10_IMAGE_LOAD_INFO *load_info, ID3DX10ThreadPump *pump, ID3D10Resource **texture, HRESULT *hresult)
{
- FIXME("device %p, module %p, resource %s, load_info %p, pump %p, texture %p, hresult %p stub!\n",
+ HRSRC res_info;
+ void *buffer;
+ DWORD size;
+ HRESULT hr;
+
+ TRACE("device %p, module %p, resource %s, load_info %p, pump %p, texture %p, hresult %p.\n",
device, module, debugstr_w(resource), load_info, pump, texture, hresult);
- return E_NOTIMPL;
+
+ if (!resource || !texture)
+ return D3DX10_ERR_INVALID_DATA;
+
+ if (!(res_info = FindResourceW(module, resource, (const WCHAR *)RT_RCDATA)))
+ {
+ /* Try loading the resource as bitmap data */
+ if (!(res_info = FindResourceW(module, resource, (const WCHAR *)RT_BITMAP)))
+ return D3DX10_ERR_INVALID_DATA;
+ }
+
+ if (FAILED(hr = load_resource(module, res_info, &buffer, &size)))
+ return D3DX10_ERR_INVALID_DATA;
+
+ return D3DX10CreateTextureFromMemory(device, buffer, size, load_info, pump, texture, hresult);
}
HRESULT WINAPI D3DX10CreateTextureFromMemory(ID3D10Device *device, const void *src_data, SIZE_T src_data_size,
--
2.25.1
Nov. 4, 2021
[PATCH 1/2] d3dx10: Implement D3DX10CreateTextureFromFile{A,W}.
by Ziqing Hui
Signed-off-by: Ziqing Hui <zhui(a)codeweavers.com>
---
dlls/d3dx10_43/tests/d3dx10.c | 7 ++----
dlls/d3dx10_43/texture.c | 42 +++++++++++++++++++++++++++++++----
2 files changed, 40 insertions(+), 9 deletions(-)
diff --git a/dlls/d3dx10_43/tests/d3dx10.c b/dlls/d3dx10_43/tests/d3dx10.c
index 13f70f34f96..50128260b3e 100644
--- a/dlls/d3dx10_43/tests/d3dx10.c
+++ b/dlls/d3dx10_43/tests/d3dx10.c
@@ -2034,8 +2034,6 @@ static void test_create_texture(void)
/* D3DX10CreateTextureFromFile tests */
- todo_wine
- {
hr = D3DX10CreateTextureFromFileW(device, NULL, NULL, NULL, &resource, NULL);
ok(hr == E_FAIL, "Got unexpected hr %#x.\n", hr);
hr = D3DX10CreateTextureFromFileW(device, L"deadbeef", NULL, NULL, &resource, NULL);
@@ -2044,7 +2042,6 @@ static void test_create_texture(void)
ok(hr == E_FAIL, "Got unexpected hr %#x.\n", hr);
hr = D3DX10CreateTextureFromFileA(device, "deadbeef", NULL, NULL, &resource, NULL);
ok(hr == D3D10_ERROR_FILE_NOT_FOUND, "Got unexpected hr %#x.\n", hr);
- }
for (i = 0; i < ARRAY_SIZE(test_image); ++i)
{
@@ -2052,7 +2049,7 @@ static void test_create_texture(void)
create_file(test_filename, test_image[i].data, test_image[i].size, path);
hr = D3DX10CreateTextureFromFileW(device, path, NULL, NULL, &resource, NULL);
- todo_wine
+ todo_wine_if(test_image[i].expected_info.MiscFlags & D3D10_RESOURCE_MISC_TEXTURECUBE)
ok(hr == S_OK || broken(hr == E_FAIL && test_image[i].expected_info.ImageFileFormat == D3DX10_IFF_WMP),
"Got unexpected hr %#x.\n", hr);
if (hr == S_OK)
@@ -2063,7 +2060,7 @@ static void test_create_texture(void)
}
hr = D3DX10CreateTextureFromFileA(device, get_str_a(path), NULL, NULL, &resource, NULL);
- todo_wine
+ todo_wine_if(test_image[i].expected_info.MiscFlags & D3D10_RESOURCE_MISC_TEXTURECUBE)
ok(hr == S_OK || broken(hr == E_FAIL && test_image[i].expected_info.ImageFileFormat == D3DX10_IFF_WMP),
"Got unexpected hr %#x.\n", hr);
if (hr == S_OK)
diff --git a/dlls/d3dx10_43/texture.c b/dlls/d3dx10_43/texture.c
index 0568bc2316c..62baed0ca23 100644
--- a/dlls/d3dx10_43/texture.c
+++ b/dlls/d3dx10_43/texture.c
@@ -576,17 +576,51 @@ end:
HRESULT WINAPI D3DX10CreateTextureFromFileA(ID3D10Device *device, const char *src_file,
D3DX10_IMAGE_LOAD_INFO *load_info, ID3DX10ThreadPump *pump, ID3D10Resource **texture, HRESULT *hresult)
{
- FIXME("device %p, src_file %s, load_info %p, pump %p, texture %p, hresult %p stub!\n",
+ WCHAR *buffer;
+ int str_len;
+ HRESULT hr;
+
+ TRACE("device %p, src_file %s, load_info %p, pump %p, texture %p, hresult %p.\n",
device, debugstr_a(src_file), load_info, pump, texture, hresult);
- return E_NOTIMPL;
+
+ if (!src_file || !texture)
+ return E_FAIL;
+
+ if (!(str_len = MultiByteToWideChar(CP_ACP, 0, src_file, -1, NULL, 0)))
+ return HRESULT_FROM_WIN32(GetLastError());
+
+ if (!(buffer = heap_alloc(str_len * sizeof(*buffer))))
+ return E_OUTOFMEMORY;
+
+ MultiByteToWideChar(CP_ACP, 0, src_file, -1, buffer, str_len);
+ hr = D3DX10CreateTextureFromFileW(device, buffer, load_info, pump, texture, hresult);
+
+ heap_free(buffer);
+
+ return hr;
}
HRESULT WINAPI D3DX10CreateTextureFromFileW(ID3D10Device *device, const WCHAR *src_file,
D3DX10_IMAGE_LOAD_INFO *load_info, ID3DX10ThreadPump *pump, ID3D10Resource **texture, HRESULT *hresult)
{
- FIXME("device %p, src_file %s, load_info %p, pump %p, texture %p, hresult %p stub!\n",
+ void *buffer = NULL;
+ DWORD size = 0;
+ HRESULT hr;
+
+ TRACE("device %p, src_file %s, load_info %p, pump %p, texture %p, hresult %p.\n",
device, debugstr_w(src_file), load_info, pump, texture, hresult);
- return E_NOTIMPL;
+
+ if (!src_file || !texture)
+ return E_FAIL;
+
+ if (FAILED(load_file(src_file, &buffer, &size)))
+ return D3D10_ERROR_FILE_NOT_FOUND;
+
+ hr = D3DX10CreateTextureFromMemory(device, buffer, size, load_info, pump, texture, hresult);
+
+ heap_free(buffer);
+
+ return hr;
}
HRESULT WINAPI D3DX10CreateTextureFromResourceA(ID3D10Device *device, HMODULE module, const char *resource,
--
2.25.1
Nov. 4, 2021
Re: [PATCH] ntdll: Don't constraint TEB address to 2GB for native x64 process.
by Marvin
Hi,
While running your changed tests, I think I found new failures.
Being a bot and all I'm not very good at pattern recognition, so I might be
wrong, but could you please double-check?
Full results can be found at:
https://testbot.winehq.org/JobDetails.pl?Key=101286
Your paranoid android.
=== debiant2 (64 bit WoW report) ===
ntdll:
env.c:461: Test failed: wrong end ptr 000000000024195C/0000000000241960
Nov. 4, 2021
[PATCH] ntdll: Don't constraint TEB address to 2GB for native x64 process.
by Paul Gofman
Signed-off-by: Paul Gofman <pgofman(a)codeweavers.com>
---
dlls/ntdll/unix/virtual.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/dlls/ntdll/unix/virtual.c b/dlls/ntdll/unix/virtual.c
index 756a7388a22..3dc06d520dd 100644
--- a/dlls/ntdll/unix/virtual.c
+++ b/dlls/ntdll/unix/virtual.c
@@ -2985,6 +2985,7 @@ static TEB *init_teb( void *ptr, BOOL is_wow )
*/
TEB *virtual_alloc_first_teb(void)
{
+ static const BOOL is_wow = FALSE;
void *ptr;
NTSTATUS status;
SIZE_T data_size = page_size;
@@ -3000,14 +3001,14 @@ TEB *virtual_alloc_first_teb(void)
exit(1);
}
- NtAllocateVirtualMemory( NtCurrentProcess(), &teb_block, is_win64 ? 0x7fffffff : 0, &total,
+ NtAllocateVirtualMemory( NtCurrentProcess(), &teb_block, is_win64 && is_wow ? 0x7fffffff : 0, &total,
MEM_RESERVE | MEM_TOP_DOWN, PAGE_READWRITE );
teb_block_pos = 30;
ptr = (char *)teb_block + 30 * block_size;
data_size = 2 * block_size;
NtAllocateVirtualMemory( NtCurrentProcess(), (void **)&ptr, 0, &data_size, MEM_COMMIT, PAGE_READWRITE );
peb = (PEB *)((char *)teb_block + 31 * block_size + (is_win64 ? 0 : page_size));
- return init_teb( ptr, FALSE );
+ return init_teb( ptr, is_wow );
}
@@ -3021,6 +3022,7 @@ NTSTATUS virtual_alloc_teb( TEB **ret_teb )
void *ptr = NULL;
NTSTATUS status = STATUS_SUCCESS;
SIZE_T block_size = signal_stack_mask + 1;
+ BOOL is_wow = !!NtCurrentTeb()->WowTebOffset;
server_enter_uninterrupted_section( &virtual_mutex, &sigset );
if (next_free_teb)
@@ -3035,7 +3037,7 @@ NTSTATUS virtual_alloc_teb( TEB **ret_teb )
{
SIZE_T total = 32 * block_size;
- if ((status = NtAllocateVirtualMemory( NtCurrentProcess(), &ptr, is_win64 ? 0x7fffffff : 0,
+ if ((status = NtAllocateVirtualMemory( NtCurrentProcess(), &ptr, is_win64 && is_wow ? 0x7fffffff : 0,
&total, MEM_RESERVE, PAGE_READWRITE )))
{
server_leave_uninterrupted_section( &virtual_mutex, &sigset );
@@ -3048,7 +3050,7 @@ NTSTATUS virtual_alloc_teb( TEB **ret_teb )
NtAllocateVirtualMemory( NtCurrentProcess(), (void **)&ptr, 0, &block_size,
MEM_COMMIT, PAGE_READWRITE );
}
- *ret_teb = teb = init_teb( ptr, !!NtCurrentTeb()->WowTebOffset );
+ *ret_teb = teb = init_teb( ptr, is_wow );
server_leave_uninterrupted_section( &virtual_mutex, &sigset );
if ((status = signal_alloc_thread( teb )))
--
2.33.1
Nov. 4, 2021
Re: [PATCH v2 2/3] ntdll: Allow loading system DLLs from a path specified at configure time.
by Alexandre Julliard
Zebediah Figura <zfigura(a)codeweavers.com> writes:
> @@ -36,6 +36,8 @@ AC_ARG_ENABLE(maintainer-mode, AS_HELP_STRING([--enable-maintainer-mode],[enable
> AC_ARG_ENABLE(silent-rules, AS_HELP_STRING([--enable-silent-rules],[use silent build rules (override: "make V=1")]))
> AC_ARG_ENABLE(werror, AS_HELP_STRING([--enable-werror],[treat compilation warnings as errors]))
>
> +AC_ARG_VAR([SYSTEMDLLDIR], [path containing system dependency shared libraries])
I'd suggest to make this a --with option, along the lines of --with-wine-tools.
Also the resulting variable should probably be set through the makefile,
similarly to BINDIR etc.
--
Alexandre Julliard
julliard(a)winehq.org
Nov. 4, 2021
[PATCH] comctl32: Fix 'pszHeaderTitle' copypasta.
by Serge Gautherie
Signed-off-by: Serge Gautherie <winehq-git_serge_180711(a)gautherie.fr>
---
Addendum to
https://source.winehq.org/git/wine.git/commit/335983ed9172e1a985c5b237676cf…
Part of
ReactOS-Bug: https://jira.reactos.org/browse/CORE-12912
---
dlls/comctl32/propsheet.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/comctl32/propsheet.c b/dlls/comctl32/propsheet.c
index 1604b9e..556d63f 100644
--- a/dlls/comctl32/propsheet.c
+++ b/dlls/comctl32/propsheet.c
@@ -3372,7 +3372,7 @@ static LRESULT PROPSHEET_Paint(HWND hwnd, HDC hdcParam)
if (ppshpage->dwFlags & PSP_USEHEADERSUBTITLE) {
SelectObject(hdc, psInfo->hFont);
SetRect(&r, 40, 25, rzone.right - 69, rzone.bottom);
- if (!IS_INTRESOURCE(ppshpage->pszHeaderTitle))
+ if (!IS_INTRESOURCE(ppshpage->pszHeaderSubTitle))
DrawTextW(hdc, ppshpage->pszHeaderSubTitle, -1, &r, DT_LEFT | DT_WORDBREAK);
else
{
--
2.10.0.windows.1
Nov. 4, 2021
Feedback requested / dwarf4
by Eric Pouech
Background
----------
Wine has been using dwarf2 debug format for years, and hasn't updated to
dwarf4 yet (gcc and most of distros switched more than 10 years ago).
As gcc & distros have switched to dwarf5 for 6 months to a year, it's time
to catch up.
Status
------
As of today, support for reading and managing dwarf4 debug info is included
in dbghelp (as well as dwarf2 and dwarf3) and is available through winedbg.
However, by default all Wine components are still compiled with dwarf2.
Since most system shared libraries are now shipped with dwarf5, it means
that no modules with dwarf4 debug information are crunched.
Need for help
-------------
Before enabling dwarf4 as wine's default debug format, feedback is
requested on all those changes.
How can you help:
1) Setup the dwarf4 debug format for wine compilation using:
> ./configure CFLAGS="-gdwarf-4 -O2" CROSSCFLAGS="-gdwarf-4 -O2"
> make -B
The two options to configure are needed to configure both the compiler for
ELF parts, and the cross compiler for PE parts.
And you need to recompile everything to generate correct debug information.
2) Report any strange / unexpected behavior
Given the magnitude of change, I'd be surprised if everything would be
perfect. So, your contribution here for testing and
shaking would be much appreciated.
Improvements (dwarf4 over dwarf2)
------------
Here's a typical debugging session (wine compiles with dwarf2):
[eric:~/work/output-wine/wine64]$ ./wine programs/winedbg/winedbg.exe.so
notepad
WineDbg starting on pid 0100
RtlDefaultNpAcl () at Z:\home\eric\work\wine\dlls\ntdll\sec.c:1731
0x000000007bc50679 RtlDefaultNpAcl+0x2b9
[Z:\home\eric\work\wine\dlls\ntdll\sec.c:1731] in ntdll: ret
1731 }
Wine-dbg>b CreateWindowExW
Breakpoint 1 at 0x000000006eb91448 CreateWindowExW
[Z:\home\eric\work\wine\dlls\user32\win.c:1913] in user32
Wine-dbg>c
Stopped on breakpoint 1 at 0x000000006eb91448 CreateWindowExW
[Z:\home\eric\work\wine\dlls\user32\win.c:1913] in user32
CreateWindowExW () at Z:\home\eric\work\wine\dlls\user32\win.c:1913
1913 {
Wine-dbg>bt
Backtrace:
=>0 0x000000006eb91448 CreateWindowExW(exStyle=<is not available>,
className=<is not available>, windowName=<is not available>, style=<is not
available>, x=<is not available>, y=<is not available>, width=<is not
available>, height=<is not available>, parent=<is not available>, menu=<is
not available>, instance=<is no
t available>, data=<is not available>)
[Z:\home\eric\work\wine\dlls\user32\win.c:1913] in user32
(0x0000000000000559)
1 0x0000000000405008 WinMain+0x3a7(hInstance=0x400000, prev=<is not
available>, cmdline=<is not available>, show=0x1)
[Z:\home\eric\work\wine\programs\notepad\main.c:792] in notepad
(0x0000000000000559)
2 0x0000000000406326 main+0xa5(argc=<is not available>, argv=<is not
available>) [Z:\home\eric\work\wine\dlls\msvcrt\crt_winmain.c:53] in
notepad (0x0000000000000000)
3 0x0000000000406155 mainCRTStartup+0x64()
[Z:\home\eric\work\wine\dlls\msvcrt\crt_main.c:58] in notepad
(0x0000000000000000)
4 0x000000007b62c679 BaseThreadInitThunk+0x8(unknown=<is not available>,
entry=<is not available>, arg=<is not available>)
[Z:\home\eric\work\wine\dlls\kernel32\thread.c:61] in kernel32
(0x0000000000000000)
5 0x000000007bc56c73 RtlUserThreadStart+0x82(entry=0x4060f0,
arg=0x3f0000) [Z:\home\eric\work\wine\dlls\ntdll\thread.c:241] in ntdll
(0x0000000000000000)
Wine-dbg>
Note that most of variables in stack trace are not useful.
With Wine recompiled with dwarf 4 support, you get:
[eric:~/work/output-wine/winedw4-64]$ ./wine programs/winedbg/winedbg.exe.so
notepad
WineDbg starting on pid 0104
0100:fixme:dbghelp_dwarf:compute_location Only supporting one breg (rcx/330
-> r14/342)
RtlDefaultNpAcl () at Z:\home\eric\work\wine\dlls\ntdll\sec.c:1731
0x000000007bc50679 RtlDefaultNpAcl+0x2b9
[Z:\home\eric\work\wine\dlls\ntdll\sec.c:1731] in ntdll: ret
1731 }
Wine-dbg>b CreateWindowExW
0100:fixme:dbghelp_dwarf:dwarf2_read_range no entry found
0100:fixme:dbghelp_dwarf:dwarf2_read_range no entry found
0100:fixme:dbghelp_dwarf:compute_location Only supporting one breg (r8/336
-> r10/338)
0100:fixme:dbghelp_dwarf:compute_location Only supporting one breg (rdx/331
-> rcx/330)
0100:fixme:dbghelp_dwarf:compute_location Only supporting one breg (r10/338
-> r8/336)
0100:fixme:dbghelp_dwarf:compute_location Only supporting one breg (rbx/329
-> r12/340)
0100:fixme:dbghelp_dwarf:dwarf2_read_range no entry found
Breakpoint 1 at 0x000000006eb91448 CreateWindowExW
[Z:\home\eric\work\wine\dlls\user32\win.c:1913] in user32
Wine-dbg>c
Stopped on breakpoint 1 at 0x000000006eb91448 CreateWindowExW
[Z:\home\eric\work\wine\dlls\user32\win.c:1913] in user32
CreateWindowExW () at Z:\home\eric\work\wine\dlls\user32\win.c:1913
1913 {
Wine-dbg>bt
Backtrace:
=>0 0x000000006eb91448 CreateWindowExW(exStyle=0, className="Notepad",
windowName="Notepad", style=0xcf0000, x=0x1, y=0x25, width=0x558,
height=0x402, parent=(nil), menu=(nil), instance=0x400000, data=0x0(nil))
[Z:\home\eric\work\wine\dlls\user32\win.c:1913] in user32
(0x0000000000000559)
1 0x0000000000405008 WinMain+0x3a7(hInstance=0x400000, prev=<is not
available>, cmdline=<is not available>, show=0x1)
[Z:\home\eric\work\wine\programs\notepad\main.c:792] in notepad
(0x0000000000000559)
2 0x0000000000406326 main+0xa5(argc=<is not available>, argv=<is not
available>) [Z:\home\eric\work\wine\dlls\msvcrt\crt_winmain.c:53] in
notepad (0x0000000000000000)
3 0x0000000000406155 mainCRTStartup+0x64()
[Z:\home\eric\work\wine\dlls\msvcrt\crt_main.c:58] in notepad
(0x0000000000000000)
4 0x000000007b62c679 BaseThreadInitThunk+0x8(unknown=<is not available>,
entry=<is not available>, arg=<is not available>)
[Z:\home\eric\work\wine\dlls\kernel32\thread.c:61] in kernel32
(0x0000000000000000)
5 0x000000007bc56c73 RtlUserThreadStart+0x82(entry=0x4060f0,
arg=0x3f0000) [Z:\home\eric\work\wine\dlls\ntdll\thread.c:241] in ntdll
(0x0000000000000000)
Wine-dbg>
and a much nicer backtrace regarding parameters.
Note that the same improvements are also available with winedbg in gdb
proxy mode:
- same lack of values on parameters/local variables in dwarf-2
- provides (in this example) the same information as winedbg/dbghelp does
There are quite a couple of other things available with dwarf4 (split .dwo
files, inlined functions...).
----------
Thanks in advance
--
Eric Pouech
Nov. 4, 2021
Feedback requested / dwarf4
by Eric Pouech
Hi all,
Since yesterday, dwarf4 debug format support is included in dbghelp.
background
----------
Wine has been using dwarf2 for years, and hasn't updated to dwarf4 (gcc and
most of distros switched more than 10 years ago).
As distros have been switching to dwarf5 for 6 months to a year now, it's
time to be back on track.
status
------
As of today, support for reading and managing dwarf4 debug info is included
in dbghelp (as well as dwarf2 and dwarf3).
However, by default Wine is still compiled with dwarf2.
need for help
-------------
Before enabling dwa, feedback is requested on dwarf4.
How can you help:
Setup the dwarf4 debug format for wine compilation using:
> ./configure CFLAGS="-gdwarf-4 -O2" CROSSCFLAGS="-gdwarf-4 -O2"
> make -B
We need to configure both gcc for ELF compilation, and the cross compiler
(hence the two options to configure).
And we need to recompile everything.
improvements
------------
Here's a typical debugging session (compiled with dwarf2):
[eric:~/work/output-wine/wine64]$ ./wine programs/winedbg/winedbg.exe.so
notepad
WineDbg starting on pid 0100
RtlDefaultNpAcl () at Z:\home\eric\work\wine\dlls\ntdll\sec.c:1731
0x000000007bc50679 RtlDefaultNpAcl+0x2b9
[Z:\home\eric\work\wine\dlls\ntdll\sec.c:1731] in ntdll: ret
1731 }
Wine-dbg>b CreateWindowExW
Breakpoint 1 at 0x000000006eb91448 CreateWindowExW
[Z:\home\eric\work\wine\dlls\user32\win.c:1913] in user32
Wine-dbg>c
Stopped on breakpoint 1 at 0x000000006eb91448 CreateWindowExW
[Z:\home\eric\work\wine\dlls\user32\win.c:1913] in user32
CreateWindowExW () at Z:\home\eric\work\wine\dlls\user32\win.c:1913
1913 {
Wine-dbg>bt
Backtrace:
=>0 0x000000006eb91448 CreateWindowExW(exStyle=<is not available>,
className=<is not available>, windowName=<is not available>, style=<is not
available>, x=<is not available>, y=<is not available>, width=<is not
available>, height=<is not available>, parent=<is not available>, menu=<is
not available>, instance=<is no
t available>, data=<is not available>)
[Z:\home\eric\work\wine\dlls\user32\win.c:1913] in user32
(0x0000000000000559)
1 0x0000000000405008 WinMain+0x3a7(hInstance=0x400000, prev=<is not
available>, cmdline=<is not available>, show=0x1)
[Z:\home\eric\work\wine\programs\notepad\main.c:792] in notepad
(0x0000000000000559)
2 0x0000000000406326 main+0xa5(argc=<is not available>, argv=<is not
available>) [Z:\home\eric\work\wine\dlls\msvcrt\crt_winmain.c:53] in
notepad (0x0000000000000000)
3 0x0000000000406155 mainCRTStartup+0x64()
[Z:\home\eric\work\wine\dlls\msvcrt\crt_main.c:58] in notepad
(0x0000000000000000)
4 0x000000007b62c679 BaseThreadInitThunk+0x8(unknown=<is not available>,
entry=<is not available>, arg=<is not available>)
[Z:\home\eric\work\wine\dlls\kernel32\thread.c:61] in kernel32
(0x0000000000000000)
5 0x000000007bc56c73 RtlUserThreadStart+0x82(entry=0x4060f0,
arg=0x3f0000) [Z:\home\eric\work\wine\dlls\ntdll\thread.c:241] in ntdll
(0x0000000000000000)
Wine-dbg>
Note that most of variables in stack trace are not useful.
With Wine recompiled with dwarf 4 support, you get:
[eric:~/work/output-wine/winedw4-64]$ ./wine programs/winedbg/winedbg.exe.so
notepad
WineDbg starting on pid 0104
0100:fixme:dbghelp_dwarf:compute_location Only supporting one breg (rcx/330
-> r14/342)
RtlDefaultNpAcl () at Z:\home\eric\work\wine\dlls\ntdll\sec.c:1731
0x000000007bc50679 RtlDefaultNpAcl+0x2b9
[Z:\home\eric\work\wine\dlls\ntdll\sec.c:1731] in ntdll: ret
1731 }
Wine-dbg>b CreateWindowExW
0100:fixme:dbghelp_dwarf:dwarf2_read_range no entry found
0100:fixme:dbghelp_dwarf:dwarf2_read_range no entry found
0100:fixme:dbghelp_dwarf:compute_location Only supporting one breg (r8/336
-> r10/338)
0100:fixme:dbghelp_dwarf:compute_location Only supporting one breg (rdx/331
-> rcx/330)
0100:fixme:dbghelp_dwarf:compute_location Only supporting one breg (r10/338
-> r8/336)
0100:fixme:dbghelp_dwarf:compute_location Only supporting one breg (rbx/329
-> r12/340)
0100:fixme:dbghelp_dwarf:dwarf2_read_range no entry found
Breakpoint 1 at 0x000000006eb91448 CreateWindowExW
[Z:\home\eric\work\wine\dlls\user32\win.c:1913] in user32
Wine-dbg>c
Stopped on breakpoint 1 at 0x000000006eb91448 CreateWindowExW
[Z:\home\eric\work\wine\dlls\user32\win.c:1913] in user32
CreateWindowExW () at Z:\home\eric\work\wine\dlls\user32\win.c:1913
1913 {
Wine-dbg>bt
Backtrace:
=>0 0x000000006eb91448 CreateWindowExW(exStyle=0, className="Notepad",
windowName="Notepad", style=0xcf0000, x=0x1, y=0x25, width=0x558,
height=0x402, parent=(nil), menu=(nil), instance=0x400000, data=0x0(nil))
[Z:\home\eric\work\wine\dlls\user32\win.c:1913] in user32
(0x0000000000000559)
1 0x0000000000405008 WinMain+0x3a7(hInstance=0x400000, prev=<is not
available>, cmdline=<is not available>, show=0x1)
[Z:\home\eric\work\wine\programs\notepad\main.c:792] in notepad
(0x0000000000000559)
2 0x0000000000406326 main+0xa5(argc=<is not available>, argv=<is not
available>) [Z:\home\eric\work\wine\dlls\msvcrt\crt_winmain.c:53] in
notepad (0x0000000000000000)
3 0x0000000000406155 mainCRTStartup+0x64()
[Z:\home\eric\work\wine\dlls\msvcrt\crt_main.c:58] in notepad
(0x0000000000000000)
4 0x000000007b62c679 BaseThreadInitThunk+0x8(unknown=<is not available>,
entry=<is not available>, arg=<is not available>)
[Z:\home\eric\work\wine\dlls\kernel32\thread.c:61] in kernel32
(0x0000000000000000)
5 0x000000007bc56c73 RtlUserThreadStart+0x82(entry=0x4060f0,
arg=0x3f0000) [Z:\home\eric\work\wine\dlls\ntdll\thread.c:241] in ntdll
(0x0000000000000000)
Wine-dbg>
and a much nicer backtrace regarding parameters.
When using winedbg's gdb proxy mode:
- same lack of values on parameters/local variables in dwarf-2
- provides (in this example) the same information as winedbg
--
--
Eric Pouech
Nov. 4, 2021
[PATCH] kerberos: Fix expiry time conversion.
by Dmitry Timoshkov
This got broken during transition to unixlib interface.
Signed-off-by: Dmitry Timoshkov <dmitry(a)baikal.ru>
---
dlls/kerberos/unixlib.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/dlls/kerberos/unixlib.c b/dlls/kerberos/unixlib.c
index a735a1c6a47..c66557efcca 100644
--- a/dlls/kerberos/unixlib.c
+++ b/dlls/kerberos/unixlib.c
@@ -477,6 +477,7 @@ static void expirytime_gss_to_sspi( OM_uint32 expirytime, TimeStamp *timestamp )
NtQuerySystemTime( &time );
RtlSystemTimeToLocalTime( &time, &time );
+ time.QuadPart += expirytime;
timestamp->LowPart = time.QuadPart;
timestamp->HighPart = time.QuadPart >> 32;
}
--
2.33.1
Nov. 4, 2021