winehq.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
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
List overview
wine-commits
March 2024
----- 2025 -----
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
1 participants
775 discussions
Start a n
N
ew thread
Rémi Bernon : win32u: Move vkGet(Instance|Device)ProcAddr out the drivers.
by Alexandre Julliard
22 Mar '24
22 Mar '24
Module: wine Branch: master Commit: 9ee2adba14a9761c7ca5d893d83ecd8dc45cfbb3 URL:
https://gitlab.winehq.org/wine/wine/-/commit/9ee2adba14a9761c7ca5d893d83ecd…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Thu Mar 21 17:40:34 2024 +0100 win32u: Move vkGet(Instance|Device)ProcAddr out the drivers. --- dlls/win32u/vulkan.c | 42 ++++++++++++++++++++++++++++++++++++++++++ dlls/winemac.drv/vulkan.c | 32 ++------------------------------ dlls/winewayland.drv/vulkan.c | 30 ------------------------------ dlls/winex11.drv/vulkan.c | 32 ++------------------------------ 4 files changed, 46 insertions(+), 90 deletions(-)
1
0
0
0
Rémi Bernon : win32u: Move vulkan loading and init guard out of the drivers.
by Alexandre Julliard
22 Mar '24
22 Mar '24
Module: wine Branch: master Commit: 28873ce8c426f696ceb16e3f5d98d5f5c5ed3b79 URL:
https://gitlab.winehq.org/wine/wine/-/commit/28873ce8c426f696ceb16e3f5d98d5…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Mon Feb 12 22:12:11 2024 +0100 win32u: Move vulkan loading and init guard out of the drivers. --- dlls/win32u/driver.c | 12 +++--- dlls/win32u/vulkan.c | 58 +++++++++++++++++++++++++- dlls/winemac.drv/gdi.c | 2 +- dlls/winemac.drv/macdrv.h | 2 +- dlls/winemac.drv/vulkan.c | 71 ++++++++++--------------------- dlls/winewayland.drv/vulkan.c | 71 +++++++++++-------------------- dlls/winewayland.drv/waylanddrv.h | 2 +- dlls/winewayland.drv/waylanddrv_main.c | 2 +- dlls/winex11.drv/init.c | 10 +---- dlls/winex11.drv/vulkan.c | 76 ++++++++++++---------------------- dlls/winex11.drv/x11drv.h | 2 +- dlls/winex11.drv/x11drv_main.c | 6 +-- dlls/winex11.drv/xrandr.c | 2 +- include/wine/gdi_driver.h | 4 +- 14 files changed, 150 insertions(+), 170 deletions(-)
1
0
0
0
Rémi Bernon : winemac: Use SONAME_LIBVULKAN as an alias for MoltenVK.
by Alexandre Julliard
22 Mar '24
22 Mar '24
Module: wine Branch: master Commit: 1ddaa1d385c804f2af9bb16d2c5082122132f09b URL:
https://gitlab.winehq.org/wine/wine/-/commit/1ddaa1d385c804f2af9bb16d2c5082…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Thu Mar 21 17:13:48 2024 +0100 winemac: Use SONAME_LIBVULKAN as an alias for MoltenVK. --- configure | 1 + configure.ac | 2 +- dlls/winemac.drv/vulkan.c | 8 ++++---- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/configure b/configure index 91b272c4aea..b3cc4815aa6 100755 --- a/configure +++ b/configure @@ -19167,6 +19167,7 @@ printf "%s\n" "$ac_cv_lib_soname_MoltenVK" >&6; } printf "%s\n" "#define SONAME_LIBMOLTENVK \"$ac_cv_lib_soname_MoltenVK\"" >>confdefs.h + printf "%s\n" "#define SONAME_LIBVULKAN $ac_cv_lib_soname_MoltenVK" >>confdefs.h fi fi diff --git a/configure.ac b/configure.ac index 16f8ea99691..5398e4b1785 100644 --- a/configure.ac +++ b/configure.ac @@ -1827,7 +1827,7 @@ then WINE_CHECK_SONAME(vulkan, vkGetInstanceProcAddr) if test "x$ac_cv_lib_soname_vulkan" = "x" then - WINE_CHECK_SONAME(MoltenVK, vkGetInstanceProcAddr) + WINE_CHECK_SONAME(MoltenVK, vkGetInstanceProcAddr, [AC_DEFINE_UNQUOTED(SONAME_LIBVULKAN,[$ac_cv_lib_soname_MoltenVK])]) fi fi WINE_NOTICE_WITH(vulkan,[test "x$ac_cv_lib_soname_vulkan" = "x" -a "x$ac_cv_lib_soname_MoltenVK" = "x"], diff --git a/dlls/winemac.drv/vulkan.c b/dlls/winemac.drv/vulkan.c index 472b2885b10..6c4ab646021 100644 --- a/dlls/winemac.drv/vulkan.c +++ b/dlls/winemac.drv/vulkan.c @@ -42,7 +42,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(vulkan); -#ifdef SONAME_LIBMOLTENVK +#ifdef SONAME_LIBVULKAN WINE_DECLARE_DEBUG_CHANNEL(fps); @@ -100,9 +100,9 @@ static void *vulkan_handle; static void wine_vk_init(void) { - if (!(vulkan_handle = dlopen(SONAME_LIBMOLTENVK, RTLD_NOW))) + if (!(vulkan_handle = dlopen(SONAME_LIBVULKAN, RTLD_NOW))) { - ERR("Failed to load %s\n", SONAME_LIBMOLTENVK); + ERR("Failed to load %s\n", SONAME_LIBVULKAN); return; } @@ -523,7 +523,7 @@ static const struct vulkan_funcs *get_vulkan_driver(UINT version) return NULL; } -#endif /* SONAME_LIBMOLTENVK */ +#endif /* SONAME_LIBVULKAN */ const struct vulkan_funcs *macdrv_wine_get_vulkan_driver(UINT version) {
1
0
0
0
Rémi Bernon : user32/tests: Add some LoadKeyboardLayoutEx tests.
by Alexandre Julliard
22 Mar '24
22 Mar '24
Module: wine Branch: master Commit: 737e4411d9a6bcc161bd0a842c9dd647ec1c2ee0 URL:
https://gitlab.winehq.org/wine/wine/-/commit/737e4411d9a6bcc161bd0a842c9dd6…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Fri Mar 22 11:57:14 2024 +0100 user32/tests: Add some LoadKeyboardLayoutEx tests. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=28170
--- dlls/user32/tests/input.c | 124 +++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 116 insertions(+), 8 deletions(-) diff --git a/dlls/user32/tests/input.c b/dlls/user32/tests/input.c index 95683e4afe4..b92e59396ac 100644 --- a/dlls/user32/tests/input.c +++ b/dlls/user32/tests/input.c @@ -376,6 +376,7 @@ static UINT (WINAPI *pGetRawInputDeviceList) (PRAWINPUTDEVICELIST, PUINT, UINT); static UINT (WINAPI *pGetRawInputDeviceInfoW) (HANDLE, UINT, void *, UINT *); static UINT (WINAPI *pGetRawInputDeviceInfoA) (HANDLE, UINT, void *, UINT *); static BOOL (WINAPI *pIsWow64Process)(HANDLE, PBOOL); +static HKL (WINAPI *pLoadKeyboardLayoutEx)(HKL, const WCHAR *, UINT); /**********************adapted from input.c **********************************/ @@ -401,6 +402,7 @@ static void init_function_pointers(void) GET_PROC(GetRawInputDeviceList); GET_PROC(GetRawInputDeviceInfoW); GET_PROC(GetRawInputDeviceInfoA); + GET_PROC(LoadKeyboardLayoutEx); hdll = GetModuleHandleA("kernel32"); GET_PROC(IsWow64Process); @@ -3025,13 +3027,28 @@ static void test_get_async_key_state(void) ok(0 == GetAsyncKeyState(-1000000), "GetAsyncKeyState did not return 0\n"); } +static HKL *get_keyboard_layouts( UINT *count ) +{ + HKL *layouts; + + *count = GetKeyboardLayoutList( 0, NULL ); + ok_ne( 0, *count, UINT, "%u" ); + layouts = malloc( *count * sizeof(HKL) ); + ok_ne( NULL, layouts, void *, "%p" ); + *count = GetKeyboardLayoutList( *count, layouts ); + ok_ne( 0, *count, UINT, "%u" ); + + return layouts; +} + static void test_keyboard_layout_name(void) { WCHAR klid[KL_NAMELENGTH], tmpklid[KL_NAMELENGTH], layout_path[MAX_PATH], value[5]; HKL layout, tmplayout, *layouts, *layouts_preload; DWORD status, value_size, klid_size, type, id; - int i, j, len; + int i, j; HKEY hkey; + UINT len; BOOL ret; if (0) /* crashes on native system */ @@ -3054,15 +3071,9 @@ static void test_keyboard_layout_name(void) return; } - len = GetKeyboardLayoutList(0, NULL); - ok(len > 0, "GetKeyboardLayoutList returned %d\n", len); - - layouts = malloc(len * sizeof(HKL)); + layouts = get_keyboard_layouts( &len ); ok(layouts != NULL, "Could not allocate memory\n"); - len = GetKeyboardLayoutList(len, layouts); - ok(len > 0, "GetKeyboardLayoutList returned %d\n", len); - layouts_preload = calloc(1, sizeof(HKL)); ok(layouts_preload != NULL, "Could not allocate memory\n"); @@ -5531,6 +5542,101 @@ static void test_keyboard_ll_hook_blocking(void) ok_ret( 1, DestroyWindow( hwnd ) ); } +static void test_LoadKeyboardLayoutEx(void) +{ + static const WCHAR test_layout_name[] = L"00000429"; + static const HKL test_hkl = (HKL)0x04290429; + + HKL *new_layouts, *layouts, old_hkl, hkl; + UINT i, j, len, new_len; + WCHAR layout_name[64]; + + old_hkl = GetKeyboardLayout( 0 ); + ok_ne( 0, old_hkl, HKL, "%p" ); + + hkl = pLoadKeyboardLayoutEx( NULL, test_layout_name, 0 ); + ok_eq( 0, hkl, HKL, "%p" ); + + layouts = get_keyboard_layouts( &len ); + for (i = 0; i < len; i++) if (layouts[i] == test_hkl) break; + if (i != len) + { + skip( "Test HKL is already loaded, skipping tests\n" ); + free( layouts ); + return; + } + + /* LoadKeyboardLayoutEx replaces loaded layouts, but will lose mixed layout / locale */ + for (i = 0, j = len; i < len; i++) + { + if (HIWORD(layouts[i]) != LOWORD(layouts[i])) continue; + if (j == len) j = i; + else break; + } + if (i == len) i = j; + if (i == len) + { + skip( "Failed to find appropriate layouts, skipping tests\n" ); + free( layouts ); + return; + } + + trace( "using layouts %p / %p\n", layouts[i], layouts[j] ); + + ActivateKeyboardLayout( layouts[i], 0 ); + ok_eq( layouts[i], GetKeyboardLayout( 0 ), HKL, "%p" ); + ok_ret( 1, GetKeyboardLayoutNameW( layout_name ) ); + + /* LoadKeyboardLayoutEx replaces a currently loaded layout */ + hkl = pLoadKeyboardLayoutEx( layouts[i], test_layout_name, 0 ); + todo_wine + ok_eq( test_hkl, hkl, HKL, "%p" ); + new_layouts = get_keyboard_layouts( &new_len ); + ok_eq( len, new_len, UINT, "%u" ); + todo_wine + ok_eq( test_hkl, new_layouts[i], HKL, "%p" ); + new_layouts[i] = layouts[i]; + ok( !memcmp( new_layouts, layouts, len * sizeof(*layouts) ), "keyboard layouts changed\n" ); + free( new_layouts ); + + hkl = pLoadKeyboardLayoutEx( test_hkl, layout_name, 0 ); + ok_eq( layouts[i], hkl, HKL, "%p" ); + new_layouts = get_keyboard_layouts( &new_len ); + ok_eq( len, new_len, UINT, "%u" ); + ok( !memcmp( new_layouts, layouts, len * sizeof(*layouts) ), "keyboard layouts changed\n" ); + free( new_layouts ); + + if (j == i) skip( "Only one layout found, skipping tests\n" ); + else + { + /* it also works if a different layout is active */ + ActivateKeyboardLayout( layouts[j], 0 ); + ok_eq( layouts[j], GetKeyboardLayout( 0 ), HKL, "%p" ); + + hkl = pLoadKeyboardLayoutEx( layouts[i], test_layout_name, 0 ); + todo_wine + ok_eq( test_hkl, hkl, HKL, "%p" ); + new_layouts = get_keyboard_layouts( &new_len ); + ok_eq( len, new_len, UINT, "%u" ); + todo_wine + ok_eq( test_hkl, new_layouts[i], HKL, "%p" ); + new_layouts[i] = layouts[i]; + ok( !memcmp( new_layouts, layouts, len * sizeof(*layouts) ), "keyboard layouts changed\n" ); + free( new_layouts ); + + hkl = pLoadKeyboardLayoutEx( test_hkl, layout_name, 0 ); + ok_eq( layouts[i], hkl, HKL, "%p" ); + new_layouts = get_keyboard_layouts( &new_len ); + ok_eq( len, new_len, UINT, "%u" ); + ok( !memcmp( new_layouts, layouts, len * sizeof(*layouts) ), "keyboard layouts changed\n" ); + free( new_layouts ); + } + + free( layouts ); + ActivateKeyboardLayout( old_hkl, 0 ); + ok_eq( old_hkl, GetKeyboardLayout( 0 ), HKL, "%p" ); +} + /* run the tests in a separate desktop to avoid interaction with other * tests, current desktop state, or user actions. */ static void test_input_desktop( char **argv ) @@ -5555,6 +5661,8 @@ static void test_input_desktop( char **argv ) test_GetRawInputData(); test_GetRawInputBuffer(); + test_LoadKeyboardLayoutEx(); + ok_ret( 1, SetCursorPos( pos.x, pos.y ) ); }
1
0
0
0
Rémi Bernon : user32/tests: Add missing winetest_pop_context.
by Alexandre Julliard
22 Mar '24
22 Mar '24
Module: wine Branch: master Commit: be62646098116f6876fed8d4759933f5a878361a URL:
https://gitlab.winehq.org/wine/wine/-/commit/be62646098116f6876fed8d4759933…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Fri Mar 22 12:09:10 2024 +0100 user32/tests: Add missing winetest_pop_context. --- dlls/user32/tests/input.c | 1 + 1 file changed, 1 insertion(+) diff --git a/dlls/user32/tests/input.c b/dlls/user32/tests/input.c index a78ea3b7c43..95683e4afe4 100644 --- a/dlls/user32/tests/input.c +++ b/dlls/user32/tests/input.c @@ -3953,6 +3953,7 @@ static void test_SendInput_mouse_messages(void) if (broken(!ret)) /* broken on Win7 probably because of the separate desktop */ { win_skip("Skipping broken SetLayeredWindowAttributes tests\n"); + winetest_pop_context(); DestroyWindow( other ); break; }
1
0
0
0
Vijay Kiran Kamuju : user32: Add LoadKeyboardLayoutEx stub.
by Alexandre Julliard
22 Mar '24
22 Mar '24
Module: wine Branch: master Commit: a71223eed9c09733178012cb762cbfef1ea86b7c URL:
https://gitlab.winehq.org/wine/wine/-/commit/a71223eed9c09733178012cb762cbf…
Author: Vijay Kiran Kamuju <infyquest(a)gmail.com> Date: Wed Mar 20 00:22:21 2024 +0100 user32: Add LoadKeyboardLayoutEx stub. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=28170
--- dlls/user32/input.c | 11 +++++++++++ dlls/user32/user32.spec | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/dlls/user32/input.c b/dlls/user32/input.c index 1fff29c7f87..00337aa72b7 100644 --- a/dlls/user32/input.c +++ b/dlls/user32/input.c @@ -476,6 +476,17 @@ HKL WINAPI LoadKeyboardLayoutA(LPCSTR pwszKLID, UINT Flags) } +/*********************************************************************** + * LoadKeyboardLayoutEx (USER32.@) + */ +HKL WINAPI LoadKeyboardLayoutEx( HKL layout, const WCHAR *name, UINT flags ) +{ + FIXME_(keyboard)( "layout %p, name %s, flags %x, semi-stub!\n", layout, debugstr_w( name ), flags ); + + if (!layout) return NULL; + return LoadKeyboardLayoutW( name, flags ); +} + /*********************************************************************** * UnloadKeyboardLayout (USER32.@) */ diff --git a/dlls/user32/user32.spec b/dlls/user32/user32.spec index 14246b3e3e0..21fa904082c 100644 --- a/dlls/user32/user32.spec +++ b/dlls/user32/user32.spec @@ -507,7 +507,7 @@ @ stdcall LoadImageA(long str long long long long) @ stdcall LoadImageW(long wstr long long long long) @ stdcall LoadKeyboardLayoutA(str long) -# @ stub LoadKeyboardLayoutEx +@ stdcall LoadKeyboardLayoutEx(long wstr long) @ stdcall LoadKeyboardLayoutW(wstr long) @ stdcall LoadLocalFonts() @ stdcall LoadMenuA(long str)
1
0
0
0
Alexandre Julliard : server: Add a helper to trace uint64 arrays.
by Alexandre Julliard
22 Mar '24
22 Mar '24
Module: wine Branch: master Commit: 84d5614b11e3fbf7005d916e39300f97b0821551 URL:
https://gitlab.winehq.org/wine/wine/-/commit/84d5614b11e3fbf7005d916e39300f…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Fri Mar 22 16:54:09 2024 +0100 server: Add a helper to trace uint64 arrays. --- server/trace.c | 32 ++++++++++++-------------------- 1 file changed, 12 insertions(+), 20 deletions(-) diff --git a/server/trace.c b/server/trace.c index fea0f2b3784..a94b535bd5d 100644 --- a/server/trace.c +++ b/server/trace.c @@ -119,6 +119,14 @@ static void dump_uint128( const char *prefix, const unsigned __int64 val[2] ) fprintf( stderr, "%s%x", prefix, (unsigned int)low ); } +static void dump_uints64( const char *prefix, const unsigned __int64 *ptr, int len ) +{ + fprintf( stderr, "%s{", prefix ); + if (len-- > 0) dump_uint64( "", ptr++ ); + while (len-- > 0) dump_uint64( ",", ptr++ ); + fputc( '}', stderr ); +} + static void dump_rectangle( const char *prefix, const rectangle_t *rect ) { fprintf( stderr, "%s{%d,%d;%d,%d}", prefix, @@ -173,10 +181,7 @@ static void dump_apc_call( const char *prefix, const apc_call_t *call ) break; case APC_USER: dump_uint64( "APC_USER,func=", &call->user.func ); - dump_uint64( ",args={", &call->user.args[0] ); - dump_uint64( ",", &call->user.args[1] ); - dump_uint64( ",", &call->user.args[2] ); - fputc( '}', stderr ); + dump_uints64( ",args=", call->user.args, 3 ); break; case APC_ASYNC_IO: dump_uint64( "APC_ASYNC_IO,user=", &call->async_io.user ); @@ -499,15 +504,8 @@ static void dump_varargs_uints( const char *prefix, data_size_t size ) static void dump_varargs_uints64( const char *prefix, data_size_t size ) { const unsigned __int64 *data = cur_data; - data_size_t len = size / sizeof(*data); - fprintf( stderr,"%s{", prefix ); - while (len > 0) - { - dump_uint64( "", data++ ); - if (--len) fputc( ',', stderr ); - } - fputc( '}', stderr ); + dump_uints64( prefix, data, size / sizeof(*data) ); remove_data( size ); } @@ -846,7 +844,6 @@ static void dump_varargs_contexts( const char *prefix, data_size_t size ) static void dump_varargs_debug_event( const char *prefix, data_size_t size ) { debug_event_t event; - unsigned int i; if (!size) { @@ -895,14 +892,9 @@ static void dump_varargs_debug_event( const char *prefix, data_size_t size ) event.exception.first, event.exception.exc_code, event.exception.flags ); dump_uint64( ",record=", &event.exception.record ); dump_uint64( ",address=", &event.exception.address ); - fprintf( stderr, ",params={" ); event.exception.nb_params = min( event.exception.nb_params, EXCEPTION_MAXIMUM_PARAMETERS ); - for (i = 0; i < event.exception.nb_params; i++) - { - dump_uint64( "", &event.exception.params[i] ); - if (i < event.exception.nb_params) fputc( ',', stderr ); - } - fprintf( stderr, "}}" ); + dump_uints64( ",params=", event.exception.params, event.exception.nb_params ); + fputc( '}', stderr ); break; case DbgLoadDllStateChange: fprintf( stderr, "%s{load_dll,file=%04x", prefix, event.load_dll.handle );
1
0
0
0
Alexandre Julliard : wow64: Use setjmp/longjmp from ntdll.
by Alexandre Julliard
22 Mar '24
22 Mar '24
Module: wine Branch: master Commit: 117fefa274fca045c9c1dc19fb2563d9e8261c25 URL:
https://gitlab.winehq.org/wine/wine/-/commit/117fefa274fca045c9c1dc19fb2563…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Fri Mar 22 13:08:50 2024 +0100 wow64: Use setjmp/longjmp from ntdll. --- dlls/wow64/syscall.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/dlls/wow64/syscall.c b/dlls/wow64/syscall.c index a1c6fbaac5a..40eb5327934 100644 --- a/dlls/wow64/syscall.c +++ b/dlls/wow64/syscall.c @@ -19,6 +19,7 @@ */ #include <stdarg.h> +#include <setjmp.h> #include "ntstatus.h" #define WIN32_NO_STATUS @@ -26,7 +27,7 @@ #include "winbase.h" #include "winnt.h" #include "winternl.h" -#include "wine/exception.h" +#include "rtlsupportapi.h" #include "wine/unixlib.h" #include "wine/asm.h" #include "wow64_private.h" @@ -77,7 +78,7 @@ struct user_callback_frame void **ret_ptr; ULONG *ret_len; NTSTATUS status; - __wine_jmp_buf jmpbuf; + jmp_buf jmpbuf; }; /* stack frame for user APCs */ @@ -114,8 +115,6 @@ NTSTATUS (WINAPI *pBTCpuResetToConsistentState)( EXCEPTION_POINTERS * ) = NULL; void (WINAPI *pBTCpuUpdateProcessorInformation)( SYSTEM_CPU_INFORMATION * ) = NULL; void (WINAPI *pBTCpuThreadTerm)( HANDLE ) = NULL; -void *dummy = RtlUnwind; - BOOL WINAPI DllMain( HINSTANCE inst, DWORD reason, void *reserved ) { if (reason == DLL_PROCESS_ATTACH) LdrDisableThreadCalloutsForDll( inst ); @@ -465,7 +464,8 @@ NTSTATUS WINAPI wow64_NtCallbackReturn( UINT *args ) *frame->ret_ptr = ret_ptr; *frame->ret_len = ret_len; frame->status = status; - __wine_longjmp( &frame->jmpbuf, 1 ); + longjmp( frame->jmpbuf, 1 ); + return STATUS_SUCCESS; } @@ -1232,7 +1232,7 @@ NTSTATUS WINAPI Wow64KiUserCallbackDispatcher( ULONG id, void *args, ULONG len, ctx.Eip = pLdrSystemDllInitBlock->pKiUserCallbackDispatcher; pBTCpuSetContext( GetCurrentThread(), GetCurrentProcess(), NULL, &ctx ); - if (!__wine_setjmpex( &frame.jmpbuf, NULL )) + if (!setjmp( frame.jmpbuf )) cpu_simulate(); else pBTCpuSetContext( GetCurrentThread(), GetCurrentProcess(), NULL, &orig_ctx ); @@ -1257,7 +1257,7 @@ NTSTATUS WINAPI Wow64KiUserCallbackDispatcher( ULONG id, void *args, ULONG len, ctx.Pc = pLdrSystemDllInitBlock->pKiUserCallbackDispatcher; pBTCpuSetContext( GetCurrentThread(), GetCurrentProcess(), NULL, &ctx ); - if (!__wine_setjmpex( &frame.jmpbuf, NULL )) + if (!setjmp( frame.jmpbuf )) cpu_simulate(); else pBTCpuSetContext( GetCurrentThread(), GetCurrentProcess(), NULL, &orig_ctx );
1
0
0
0
Alexandre Julliard : wow64cpu: Save non-volatile registers before switching to 32-bit code.
by Alexandre Julliard
22 Mar '24
22 Mar '24
Module: wine Branch: master Commit: 567b31d7f35c045a4640f5a7319ec4d41f22e0f2 URL:
https://gitlab.winehq.org/wine/wine/-/commit/567b31d7f35c045a4640f5a7319ec4…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Fri Mar 22 13:06:40 2024 +0100 wow64cpu: Save non-volatile registers before switching to 32-bit code. To make it possible to unwind the stack. --- dlls/wow64cpu/cpu.c | 41 +++++++++++++++++++++++++++-------------- 1 file changed, 27 insertions(+), 14 deletions(-) diff --git a/dlls/wow64cpu/cpu.c b/dlls/wow64cpu/cpu.c index 84f863b8e31..c574315ec7d 100644 --- a/dlls/wow64cpu/cpu.c +++ b/dlls/wow64cpu/cpu.c @@ -175,9 +175,12 @@ static void copy_context_64to32( I386_CONTEXT *ctx32, DWORD flags, AMD64_CONTEXT extern void WINAPI syscall_32to64(void); __ASM_GLOBAL_FUNC( syscall_32to64, /* cf. BTCpuSimulate prolog */ - __ASM_SEH(".seh_stackalloc 0x28\n\t") - __ASM_SEH(".seh_endprologue\n\t") - __ASM_CFI(".cfi_adjust_cfa_offset 0x28\n\t") + ".seh_pushreg %rbp\n\t" + ".seh_pushreg %rbx\n\t" + ".seh_pushreg %rsi\n\t" + ".seh_pushreg %rdi\n\t" + ".seh_stackalloc 0x28\n\t" + ".seh_endprologue\n\t" "xchgq %r14,%rsp\n\t" "movl %edi,0x9c(%r13)\n\t" /* context->Edi */ "movl %esi,0xa0(%r13)\n\t" /* context->Esi */ @@ -238,9 +241,12 @@ __ASM_GLOBAL_FUNC( syscall_32to64, extern void WINAPI unix_call_32to64(void); __ASM_GLOBAL_FUNC( unix_call_32to64, /* cf. BTCpuSimulate prolog */ - __ASM_SEH(".seh_stackalloc 0x28\n\t") - __ASM_SEH(".seh_endprologue\n\t") - __ASM_CFI(".cfi_adjust_cfa_offset 0x28\n\t") + ".seh_pushreg %rbp\n\t" + ".seh_pushreg %rbx\n\t" + ".seh_pushreg %rsi\n\t" + ".seh_pushreg %rdi\n\t" + ".seh_stackalloc 0x28\n\t" + ".seh_endprologue\n\t" "xchgq %r14,%rsp\n\t" "movl %edi,0x9c(%r13)\n\t" /* context->Edi */ "movl %esi,0xa0(%r13)\n\t" /* context->Esi */ @@ -269,14 +275,21 @@ __ASM_GLOBAL_FUNC( unix_call_32to64, * BTCpuSimulate (wow64cpu.@) */ __ASM_GLOBAL_FUNC( BTCpuSimulate, - "subq $0x28,%rsp\n" - __ASM_SEH(".seh_stackalloc 0x28\n\t") - __ASM_SEH(".seh_endprologue\n\t") - __ASM_CFI(".cfi_adjust_cfa_offset 0x28\n\t") - "movq %gs:0x30,%r12\n\t" - "movq 0x1488(%r12),%rcx\n\t" /* NtCurrentTeb()->TlsSlots[WOW64_TLS_CPURESERVED] */ - "leaq 4(%rcx),%r13\n" /* cpu->Context */ - "jmp syscall_32to64_return\n" ) + "pushq %rbp\n\t" + ".seh_pushreg %rbp\n\t" + "pushq %rbx\n\t" + ".seh_pushreg %rbx\n\t" + "pushq %rsi\n\t" + ".seh_pushreg %rsi\n\t" + "pushq %rdi\n\t" + ".seh_pushreg %rdi\n\t" + "subq $0x28,%rsp\n" + ".seh_stackalloc 0x28\n\t" + ".seh_endprologue\n\t" + "movq %gs:0x30,%r12\n\t" + "movq 0x1488(%r12),%rcx\n\t" /* NtCurrentTeb()->TlsSlots[WOW64_TLS_CPURESERVED] */ + "leaq 4(%rcx),%r13\n" /* cpu->Context */ + "jmp syscall_32to64_return\n" ) /**********************************************************************
1
0
0
0
Alexandre Julliard : wow64: Use a .seh handler for system calls.
by Alexandre Julliard
22 Mar '24
22 Mar '24
Module: wine Branch: master Commit: d91f16a24a95ac6116dd498211d22ca7f48e39d5 URL:
https://gitlab.winehq.org/wine/wine/-/commit/d91f16a24a95ac6116dd498211d22c…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Fri Mar 22 13:05:25 2024 +0100 wow64: Use a .seh handler for system calls. --- dlls/wow64/syscall.c | 85 ++++++++++++++++++++++++++++++++++++++-------------- 1 file changed, 62 insertions(+), 23 deletions(-) diff --git a/dlls/wow64/syscall.c b/dlls/wow64/syscall.c index 0087a684d47..a1c6fbaac5a 100644 --- a/dlls/wow64/syscall.c +++ b/dlls/wow64/syscall.c @@ -298,7 +298,7 @@ static void __attribute__((used)) call_user_exception_dispatcher( EXCEPTION_RECO /********************************************************************** * call_raise_user_exception_dispatcher */ -static void call_raise_user_exception_dispatcher( ULONG code ) +static void __attribute__((used)) call_raise_user_exception_dispatcher( ULONG code ) { TEB32 *teb32 = (TEB32 *)((char *)NtCurrentTeb() + NtCurrentTeb()->WowTebOffset); @@ -927,18 +927,66 @@ static void free_temp_data(void) /********************************************************************** - * syscall_filter + * wow64_syscall */ -static LONG CALLBACK syscall_filter( EXCEPTION_POINTERS *ptrs ) -{ - switch (ptrs->ExceptionRecord->ExceptionCode) - { - case STATUS_INVALID_HANDLE: - call_raise_user_exception_dispatcher( ptrs->ExceptionRecord->ExceptionCode ); - break; - } - return EXCEPTION_EXECUTE_HANDLER; -} +#ifdef __aarch64__ +NTSTATUS wow64_syscall( UINT *args, ULONG_PTR thunk ); +__ASM_GLOBAL_FUNC( wow64_syscall, + "stp x29, x30, [sp, #-16]!\n\t" + ".seh_save_fplr_x 16\n\t" + ".seh_endprologue\n\t" + ".seh_handler wow64_syscall_handler, @except\n" + "blr x1\n\t" + "b 1f\n" + "wow64_syscall_ret:\n\t" + "eor w1, w0, #0xc0000000\n\t" + "cmp w1, #8\n\t" /* STATUS_INVALID_HANDLE */ + "b.ne 1f\n\t" + "bl call_raise_user_exception_dispatcher\n" + "1:\tldp x29, x30, [sp], #16\n\t" + "ret" ) +__ASM_GLOBAL_FUNC( wow64_syscall_handler, + "stp x29, x30, [sp, #-16]!\n\t" + ".seh_save_fplr_x 16\n\t" + ".seh_endprologue\n\t" + "ldr w4, [x0, #4]\n\t" /* record->ExceptionFlags */ + "tst w4, #6\n\t" /* EXCEPTION_UNWINDING | EXCEPTION_EXIT_UNWIND */ + "b.ne 1f\n\t" + "mov x2, x0\n\t" /* record */ + "mov x0, x1\n\t" /* frame */ + "adr x1, wow64_syscall_ret\n\t" /* target */ + "ldr w3, [x2]\n\t" /* retval = record->ExceptionCode */ + "bl RtlUnwind\n\t" + "1:\tmov w0, #1\n\t" /* ExceptionContinueSearch */ + "ldp x29, x30, [sp], #16\n\t" + "ret" ) +#else +NTSTATUS wow64_syscall( UINT *args, ULONG_PTR thunk ); +__ASM_GLOBAL_FUNC( wow64_syscall, + "subq $0x28, %rsp\n\t" + ".seh_stackalloc 0x28\n\t" + ".seh_endprologue\n\t" + ".seh_handler wow64_syscall_handler, @except\n\t" + "call *%rdx\n\t" + "jmp 1f\n" + "wow64_syscall_ret:\n\t" + "cmpl $0xc0000008,%eax\n\t" /* STATUS_INVALID_HANDLE */ + "jne 1f\n\t" + "movl %eax,%ecx\n\t" + "call call_raise_user_exception_dispatcher\n" + "1:\taddq $0x28, %rsp\n\t" + "ret" ) +__ASM_GLOBAL_FUNC( wow64_syscall_handler, + "subq $0x28,%rsp\n\t" + ".seh_stackalloc 0x28\n\t" + ".seh_endprologue\n\t" + "movl (%rcx),%r9d\n\t" /* retval = rec->ExceptionCode */ + "movq %rcx,%r8\n\t" /* rec */ + "movq %rdx,%rcx\n\t" /* frame */ + "leaq wow64_syscall_ret(%rip),%rdx\n\t" + "call RtlUnwind\n\t" + "int3" ) +#endif /********************************************************************** @@ -950,21 +998,12 @@ NTSTATUS WINAPI Wow64SystemServiceEx( UINT num, UINT *args ) UINT id = num & 0xfff; const SYSTEM_SERVICE_TABLE *table = &syscall_tables[(num >> 12) & 3]; - if (id >= table->ServiceLimit || !table->ServiceTable[id]) + if (id >= table->ServiceLimit) { ERR( "unsupported syscall %04x\n", num ); return STATUS_INVALID_SYSTEM_SERVICE; } - __TRY - { - syscall_thunk thunk = (syscall_thunk)table->ServiceTable[id]; - status = thunk( args ); - } - __EXCEPT( syscall_filter ) - { - status = GetExceptionCode(); - } - __ENDTRY + status = wow64_syscall( args, table->ServiceTable[id] ); free_temp_data(); return status; }
1
0
0
0
← Newer
1
...
13
14
15
16
17
18
19
...
78
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
Results per page:
10
25
50
100
200