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
August 2019
----- 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
2 participants
703 discussions
Start a n
N
ew thread
Alistair Leslie-Hughes : include: Complete dbgeng interfaces.
by Alexandre Julliard
15 Aug '19
15 Aug '19
Module: wine Branch: master Commit: a135e14790eda3aad66c0d51dc4667f4d82120bf URL:
https://source.winehq.org/git/wine.git/?a=commit;h=a135e14790eda3aad66c0d51…
Author: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> Date: Wed Aug 14 00:30:11 2019 +0000 include: Complete dbgeng interfaces. Signed-off-by: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- include/dbgeng.h | 67 +++++++++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 64 insertions(+), 3 deletions(-) diff --git a/include/dbgeng.h b/include/dbgeng.h index aad4383..3eeb670 100644 --- a/include/dbgeng.h +++ b/include/dbgeng.h @@ -229,6 +229,16 @@ typedef struct _DEBUG_MODULE_PARAMETERS ULONG64 Reserved[2]; } DEBUG_MODULE_PARAMETERS, *PDEBUG_MODULE_PARAMETERS; +typedef struct _DEBUG_SYMBOL_PARAMETERS +{ + ULONG64 Module; + ULONG TypeId; + ULONG ParentSymbol; + ULONG SubElements; + ULONG Flags; + ULONG64 Reserved; +} DEBUG_SYMBOL_PARAMETERS, *PDEBUG_SYMBOL_PARAMETERS; + typedef struct _DEBUG_STACK_FRAME { ULONG64 InstructionOffset; @@ -372,7 +382,27 @@ DECLARE_INTERFACE_(IDebugBreakpoint, IUnknown) STDMETHOD_(ULONG, AddRef)(THIS) PURE; STDMETHOD_(ULONG, Release)(THIS) PURE; /* IDebugBreakpoint */ - /* FIXME */ + STDMETHOD(GetId)(THIS_ PULONG id) PURE; + STDMETHOD(GetType)(THIS_ PULONG breaktype, PULONG proc) PURE; + STDMETHOD(GetAdder)(THIS_ IDebugClient **adder) PURE; + STDMETHOD(GetFlags)(THIS_ PULONG flags) PURE; + STDMETHOD(AddFlags)(THIS_ ULONG flags) PURE; + STDMETHOD(RemoveFlags)(THIS_ ULONG flags) PURE; + STDMETHOD(SetFlags)(THIS_ ULONG flags) PURE; + STDMETHOD(GetOffset)(THIS_ PULONG64 offset) PURE; + STDMETHOD(SetOffset)(THIS_ ULONG64 offset) PURE; + STDMETHOD(GetDataParameters)(THIS_ PULONG size, PULONG access) PURE; + STDMETHOD(SetDataParameters)(THIS_ ULONG size, ULONG access) PURE; + STDMETHOD(GetPassCount)(THIS_ PULONG count) PURE; + STDMETHOD(SetPassCount)(THIS_ ULONG count) PURE; + STDMETHOD(GetCurrentPassCount)(THIS_ PULONG count) PURE; + STDMETHOD(GetMatchThreadId)(THIS_ PULONG id) PURE; + STDMETHOD(SetMatchThreadId)(THIS_ ULONG thread) PURE; + STDMETHOD(GetCommand)(THIS_ PSTR buffer, ULONG buf_size, PULONG command) PURE; + STDMETHOD(SetCommand)(THIS_ PCSTR command) PURE; + STDMETHOD(GetOffsetExpression)(THIS_ PSTR buffer, ULONG buf_size, PULONG expression) PURE; + STDMETHOD(SetOffsetExpression)(THIS_ PCSTR expression) PURE; + STDMETHOD(GetParameters)(THIS_ PDEBUG_BREAKPOINT_PARAMETERS params) PURE; }; #undef INTERFACE @@ -422,7 +452,16 @@ DECLARE_INTERFACE_(IDebugSymbolGroup, IUnknown) STDMETHOD_(ULONG, AddRef)(THIS) PURE; STDMETHOD_(ULONG, Release)(THIS) PURE; /* IDebugSymbolGroup */ - /* FIXME */ + STDMETHOD(GetNumberSymbols)(THIS_ PULONG number) PURE; + STDMETHOD(AddSymbol)(THIS_ PCSTR name, PULONG index) PURE; + STDMETHOD(RemoveSymbolByName)(THIS_ PCSTR name) PURE; + STDMETHOD(RemoveSymbolByIndex)(THIS_ ULONG index) PURE; + STDMETHOD(GetSymbolName)(THIS_ ULONG index, PSTR buffer, ULONG buf_size, PULONG name_size) PURE; + STDMETHOD(GetSymbolParameters)(THIS_ ULONG start, ULONG count, PDEBUG_SYMBOL_PARAMETERS params) PURE; + STDMETHOD(ExpandSymbol)(THIS_ ULONG index, BOOL expand) PURE; + STDMETHOD(OutputSymbols)(THIS_ ULONG control, ULONG flags, ULONG start, ULONG count) PURE; + STDMETHOD(WriteSymbol)(THIS_ ULONG index, PCSTR value) PURE; + STDMETHOD(OutputAsType)(THIS_ ULONG index, PCSTR type) PURE; }; #undef INTERFACE @@ -434,8 +473,30 @@ DECLARE_INTERFACE_(IDebugSymbolGroup2, IUnknown) STDMETHOD_(ULONG, AddRef)(THIS) PURE; STDMETHOD_(ULONG, Release)(THIS) PURE; /* IDebugSymbolGroup */ + STDMETHOD(GetNumberSymbols)(THIS_ PULONG number) PURE; + STDMETHOD(AddSymbol)(THIS_ PCSTR name, PULONG index) PURE; + STDMETHOD(RemoveSymbolByName)(THIS_ PCSTR name) PURE; + STDMETHOD(RemoveSymbolByIndex)(THIS_ ULONG index) PURE; + STDMETHOD(GetSymbolName)(THIS_ ULONG index, PSTR buffer, ULONG buf_size, PULONG name_size) PURE; + STDMETHOD(GetSymbolParameters)(THIS_ ULONG start, ULONG count, PDEBUG_SYMBOL_PARAMETERS params) PURE; + STDMETHOD(ExpandSymbol)(THIS_ ULONG index, BOOL expand) PURE; + STDMETHOD(OutputSymbols)(THIS_ ULONG control, ULONG flags, ULONG start, ULONG count) PURE; + STDMETHOD(WriteSymbol)(THIS_ ULONG index, PCSTR value) PURE; + STDMETHOD(OutputAsType)(THIS_ ULONG index, PCSTR type) PURE; /* IDebugSymbolGroup2 */ - /* FIXME */ + STDMETHOD(AddSymbolWide)(THIS_ PCWSTR name, PULONG index) PURE; + STDMETHOD(RemoveSymbolByNameWide)(THIS_ PCWSTR name) PURE; + STDMETHOD(GetSymbolNameWide)(THIS_ ULONG index, PWSTR buffer, ULONG buf_size, PULONG size) PURE; + STDMETHOD(WriteSymbolWide)(THIS_ ULONG index, PCWSTR value) PURE; + STDMETHOD(OutputAsTypeWide)(THIS_ ULONG index, PCWSTR type) PURE; + STDMETHOD(GetSymbolTypeName)(THIS_ ULONG index, PSTR buffer, ULONG buf_size, PULONG size) PURE; + STDMETHOD(GetSymbolTypeNameWide)(THIS_ ULONG index, PWSTR buffer, ULONG buf_size, PULONG size) PURE; + STDMETHOD(GetSymbolSize)(THIS_ ULONG index, PULONG size) PURE; + STDMETHOD(GetSymbolOffset)(THIS_ ULONG index, PULONG64 offset) PURE; + STDMETHOD(GetSymbolRegister)(THIS_ ULONG index, PULONG reg) PURE; + STDMETHOD(GetSymbolValueText)(THIS_ ULONG index, PSTR buffer, ULONG buf_size, PULONG size) PURE; + STDMETHOD(GetSymbolValueTextWide)(THIS_ ULONG index, PWSTR buffer, ULONG buf_size, PULONG size) PURE; + STDMETHOD(GetSymbolEntryInformation)(THIS_ ULONG index, PDEBUG_SYMBOL_ENTRY entry) PURE; }; #undef INTERFACE
1
0
0
0
Akihiro Sagawa : shell32: Fix return value for DragQueryPoint.
by Alexandre Julliard
13 Aug '19
13 Aug '19
Module: wine Branch: master Commit: 4c6aa8b2fa1678c39aa5a89d9b26cfc4002e744e URL:
https://source.winehq.org/git/wine.git/?a=commit;h=4c6aa8b2fa1678c39aa5a89d…
Author: Akihiro Sagawa <sagawa.aki(a)gmail.com> Date: Wed Aug 7 22:48:46 2019 +0900 shell32: Fix return value for DragQueryPoint. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=47514
Signed-off-by: Akihiro Sagawa <sagawa.aki(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/shell32/shellole.c | 2 +- dlls/shell32/tests/shellole.c | 2 +- dlls/winemac.drv/dragdrop.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dlls/shell32/shellole.c b/dlls/shell32/shellole.c index 1ab8f38..e84402d 100644 --- a/dlls/shell32/shellole.c +++ b/dlls/shell32/shellole.c @@ -556,7 +556,7 @@ BOOL WINAPI DragQueryPoint(HDROP hDrop, POINT *p) lpDropFileStruct = GlobalLock(hDrop); *p = lpDropFileStruct->pt; - bRet = lpDropFileStruct->fNC; + bRet = !lpDropFileStruct->fNC; GlobalUnlock(hDrop); return bRet; diff --git a/dlls/shell32/tests/shellole.c b/dlls/shell32/tests/shellole.c index a96e869..a4158aa 100644 --- a/dlls/shell32/tests/shellole.c +++ b/dlls/shell32/tests/shellole.c @@ -777,7 +777,7 @@ static LRESULT WINAPI drop_window_proc(HWND hwnd, UINT msg, WPARAM wparam, LPARA ok(num == strlen(DROPTEST_FILENAME), "got %u\n", num); ok(!strcmp(filename, DROPTEST_FILENAME), "got %s\n", filename); r = DragQueryPoint(hDrop, &pt); - todo_wine ok(r == expected, "expected %d, got %d\n", expected, r); + ok(r == expected, "expected %d, got %d\n", expected, r); ok(pt.x == 10, "expected 10, got %d\n", pt.x); ok(pt.y == 20, "expected 20, got %d\n", pt.y); DragFinish(hDrop); diff --git a/dlls/winemac.drv/dragdrop.c b/dlls/winemac.drv/dragdrop.c index c1f542f..788cb00 100644 --- a/dlls/winemac.drv/dragdrop.c +++ b/dlls/winemac.drv/dragdrop.c @@ -455,7 +455,7 @@ BOOL query_drag_drop(macdrv_query* query) { dropfiles->pt.x = pt.x; dropfiles->pt.y = pt.y; - dropfiles->fNC = TRUE; + dropfiles->fNC = FALSE; TRACE("sending WM_DROPFILES: hwnd %p pt %s %s\n", hwnd, wine_dbgstr_point(&pt), debugstr_w((WCHAR*)((char*)dropfiles + dropfiles->pFiles)));
1
0
0
0
Akihiro Sagawa : shell32/tests: Add DragQueryPoint tests.
by Alexandre Julliard
13 Aug '19
13 Aug '19
Module: wine Branch: master Commit: 865fe9cf971adf95b35c9712e7ff2cb3e09578f3 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=865fe9cf971adf95b35c9712…
Author: Akihiro Sagawa <sagawa.aki(a)gmail.com> Date: Wed Aug 7 22:46:37 2019 +0900 shell32/tests: Add DragQueryPoint tests. Signed-off-by: Akihiro Sagawa <sagawa.aki(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/shell32/tests/shellole.c | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/dlls/shell32/tests/shellole.c b/dlls/shell32/tests/shellole.c index 4b91302..a96e869 100644 --- a/dlls/shell32/tests/shellole.c +++ b/dlls/shell32/tests/shellole.c @@ -745,6 +745,7 @@ static void test_SHCreateQueryCancelAutoPlayMoniker(void) IMoniker_Release(mon); } +#define WM_EXPECTED_VALUE WM_APP #define DROPTEST_FILENAME "c:\\wintest.bin" struct DragParam { HWND hwnd; @@ -753,11 +754,20 @@ struct DragParam { static LRESULT WINAPI drop_window_proc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam) { + static BOOL expected; + switch (msg) { + case WM_EXPECTED_VALUE: + { + expected = lparam; + break; + } case WM_DROPFILES: { HDROP hDrop = (HDROP)wparam; char filename[MAX_PATH] = "dummy"; + POINT pt; + BOOL r; UINT num; num = DragQueryFileA(hDrop, 0xffffffff, NULL, 0); ok(num == 1, "expected 1, got %u\n", num); @@ -766,6 +776,10 @@ static LRESULT WINAPI drop_window_proc(HWND hwnd, UINT msg, WPARAM wparam, LPARA num = DragQueryFileA(hDrop, 0, filename, sizeof(filename)); ok(num == strlen(DROPTEST_FILENAME), "got %u\n", num); ok(!strcmp(filename, DROPTEST_FILENAME), "got %s\n", filename); + r = DragQueryPoint(hDrop, &pt); + todo_wine ok(r == expected, "expected %d, got %d\n", expected, r); + ok(pt.x == 10, "expected 10, got %d\n", pt.x); + ok(pt.y == 20, "expected 20, got %d\n", pt.y); DragFinish(hDrop); return 0; } @@ -820,7 +834,7 @@ static DWORD WINAPI drop_window_therad(void *arg) return 0; } -static void test_DragQueryFile(void) +static void test_DragQueryFile(BOOL non_client_flag) { struct DragParam param; HANDLE hThread; @@ -839,6 +853,9 @@ static void test_DragQueryFile(void) hDrop = GlobalAlloc(GHND, sizeof(DROPFILES) + (strlen(DROPTEST_FILENAME) + 2) * sizeof(WCHAR)); pDrop = GlobalLock(hDrop); + pDrop->pt.x = 10; + pDrop->pt.y = 20; + pDrop->fNC = non_client_flag; pDrop->pFiles = sizeof(DROPFILES); ret = MultiByteToWideChar(CP_ACP, 0, DROPTEST_FILENAME, -1, (LPWSTR)(pDrop + 1), strlen(DROPTEST_FILENAME) + 1); @@ -846,6 +863,9 @@ static void test_DragQueryFile(void) pDrop->fWide = TRUE; GlobalUnlock(hDrop); + r = PostMessageA(param.hwnd, WM_EXPECTED_VALUE, 0, !non_client_flag); + ok(r, "got %d\n", r); + r = PostMessageA(param.hwnd, WM_DROPFILES, (WPARAM)hDrop, 0); ok(r, "got %d\n", r); @@ -858,6 +878,7 @@ static void test_DragQueryFile(void) CloseHandle(param.ready); CloseHandle(hThread); } +#undef WM_EXPECTED_VALUE #undef DROPTEST_FILENAME static void test_SHCreateSessionKey(void) @@ -936,7 +957,8 @@ START_TEST(shellole) test_SHPropStg_functions(); test_SHCreateQueryCancelAutoPlayMoniker(); - test_DragQueryFile(); + test_DragQueryFile(TRUE); + test_DragQueryFile(FALSE); test_SHCreateSessionKey(); test_dragdrophelper();
1
0
0
0
Huw Davies : user32: Don' t query the nonclient metrics unless the font info is required.
by Alexandre Julliard
13 Aug '19
13 Aug '19
Module: wine Branch: master Commit: ef26257f6f81557199d969ba681bbcbba6edc601 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=ef26257f6f81557199d969ba…
Author: Huw Davies <huw(a)codeweavers.com> Date: Tue Aug 13 13:52:13 2019 +0100 user32: Don't query the nonclient metrics unless the font info is required. This is an optimization that is particularly helpful for scrollbar code. Signed-off-by: Huw Davies <huw(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/user32/sysparams.c | 74 +++++++++++++++++++++---------------------------- 1 file changed, 32 insertions(+), 42 deletions(-) diff --git a/dlls/user32/sysparams.c b/dlls/user32/sysparams.c index 3f93f9c..cdeea65 100644 --- a/dlls/user32/sysparams.c +++ b/dlls/user32/sysparams.c @@ -2646,9 +2646,8 @@ INT WINAPI GetSystemMetrics( INT index ) { case SM_CXVSCROLL: case SM_CYHSCROLL: - ncm.cbSize = sizeof(ncm); - SystemParametersInfoW( SPI_GETNONCLIENTMETRICS, 0, &ncm, 0 ); - return ncm.iScrollWidth; + get_entry( &entry_SCROLLWIDTH, 0, &ret ); + return max( ret, 8 ); case SM_CYCAPTION: ncm.cbSize = sizeof(ncm); SystemParametersInfoW( SPI_GETNONCLIENTMETRICS, 0, &ncm, 0 ); @@ -2664,9 +2663,8 @@ INT WINAPI GetSystemMetrics( INT index ) case SM_CXHTHUMB: case SM_CYVSCROLL: case SM_CXHSCROLL: - ncm.cbSize = sizeof(ncm); - SystemParametersInfoW( SPI_GETNONCLIENTMETRICS, 0, &ncm, 0 ); - return ncm.iScrollHeight; + get_entry( &entry_SCROLLHEIGHT, 0, &ret ); + return max( ret, 8 ); case SM_CXICON: case SM_CYICON: return map_to_dpi( 32, GetDpiForSystem() ); @@ -2712,21 +2710,20 @@ INT WINAPI GetSystemMetrics( INT index ) case SM_CYMIN: return GetSystemMetrics( SM_CYCAPTION) + 2 * GetSystemMetrics( SM_CYFRAME); case SM_CXSIZE: - ncm.cbSize = sizeof(ncm); - SystemParametersInfoW( SPI_GETNONCLIENTMETRICS, 0, &ncm, 0 ); - return ncm.iCaptionWidth; + get_entry( &entry_CAPTIONWIDTH, 0, &ret ); + return max( ret, 8 ); case SM_CYSIZE: ncm.cbSize = sizeof(ncm); SystemParametersInfoW( SPI_GETNONCLIENTMETRICS, 0, &ncm, 0 ); return ncm.iCaptionHeight; case SM_CXFRAME: - ncm.cbSize = sizeof(ncm); - SystemParametersInfoW( SPI_GETNONCLIENTMETRICS, 0, &ncm, 0 ); - return GetSystemMetrics(SM_CXDLGFRAME) + ncm.iBorderWidth; + get_entry( &entry_BORDER, 0, &ret ); + ret = max( ret, 1 ); + return GetSystemMetrics(SM_CXDLGFRAME) + ret; case SM_CYFRAME: - ncm.cbSize = sizeof(ncm); - SystemParametersInfoW( SPI_GETNONCLIENTMETRICS, 0, &ncm, 0 ); - return GetSystemMetrics(SM_CYDLGFRAME) + ncm.iBorderWidth; + get_entry( &entry_BORDER, 0, &ret ); + ret = max( ret, 1 ); + return GetSystemMetrics(SM_CYDLGFRAME) + ret; case SM_CXMINTRACK: return GetSystemMetrics(SM_CXMIN); case SM_CYMINTRACK: @@ -2780,17 +2777,15 @@ INT WINAPI GetSystemMetrics( INT index ) SystemParametersInfoW( SPI_GETNONCLIENTMETRICS, 0, &ncm, 0 ); return ncm.iSmCaptionHeight + 1; case SM_CXSMSIZE: - ncm.cbSize = sizeof(ncm); - SystemParametersInfoW( SPI_GETNONCLIENTMETRICS, 0, &ncm, 0 ); - return ncm.iSmCaptionWidth; + get_entry( &entry_SMCAPTIONWIDTH, 0, &ret ); + return ret; case SM_CYSMSIZE: ncm.cbSize = sizeof(ncm); SystemParametersInfoW( SPI_GETNONCLIENTMETRICS, 0, &ncm, 0 ); return ncm.iSmCaptionHeight; case SM_CXMENUSIZE: - ncm.cbSize = sizeof(ncm); - SystemParametersInfoW( SPI_GETNONCLIENTMETRICS, 0, &ncm, 0 ); - return ncm.iMenuWidth; + get_entry( &entry_MENUWIDTH, 0, &ret ); + return ret; case SM_CYMENUSIZE: ncm.cbSize = sizeof(ncm); SystemParametersInfoW( SPI_GETNONCLIENTMETRICS, 0, &ncm, 0 ); @@ -2901,9 +2896,8 @@ INT WINAPI GetSystemMetricsForDpi( INT index, UINT dpi ) { case SM_CXVSCROLL: case SM_CYHSCROLL: - ncm.cbSize = sizeof(ncm); - SystemParametersInfoForDpi( SPI_GETNONCLIENTMETRICS, 0, &ncm, 0, dpi ); - return ncm.iScrollWidth; + get_entry_dpi( &entry_SCROLLWIDTH, 0, &ret, dpi ); + return max( ret, 8 ); case SM_CYCAPTION: ncm.cbSize = sizeof(ncm); SystemParametersInfoForDpi( SPI_GETNONCLIENTMETRICS, 0, &ncm, 0, dpi ); @@ -2912,9 +2906,8 @@ INT WINAPI GetSystemMetricsForDpi( INT index, UINT dpi ) case SM_CXHTHUMB: case SM_CYVSCROLL: case SM_CXHSCROLL: - ncm.cbSize = sizeof(ncm); - SystemParametersInfoForDpi( SPI_GETNONCLIENTMETRICS, 0, &ncm, 0, dpi ); - return ncm.iScrollHeight; + get_entry_dpi( &entry_SCROLLHEIGHT, 0, &ret, dpi ); + return max( ret, 8 ); case SM_CXICON: case SM_CYICON: return map_to_dpi( 32, dpi ); @@ -2929,21 +2922,20 @@ INT WINAPI GetSystemMetricsForDpi( INT index, UINT dpi ) SystemParametersInfoForDpi( SPI_GETNONCLIENTMETRICS, 0, &ncm, 0, dpi ); return ncm.iMenuHeight + 1; case SM_CXSIZE: - ncm.cbSize = sizeof(ncm); - SystemParametersInfoForDpi( SPI_GETNONCLIENTMETRICS, 0, &ncm, 0, dpi ); - return ncm.iCaptionWidth; + get_entry_dpi( &entry_CAPTIONWIDTH, 0, &ret, dpi ); + return max( ret, 8 ); case SM_CYSIZE: ncm.cbSize = sizeof(ncm); SystemParametersInfoForDpi( SPI_GETNONCLIENTMETRICS, 0, &ncm, 0, dpi ); return ncm.iCaptionHeight; case SM_CXFRAME: - ncm.cbSize = sizeof(ncm); - SystemParametersInfoForDpi( SPI_GETNONCLIENTMETRICS, 0, &ncm, 0, dpi ); - return GetSystemMetricsForDpi( SM_CXDLGFRAME, dpi ) + ncm.iBorderWidth; + get_entry_dpi( &entry_BORDER, 0, &ret, dpi ); + ret = max( ret, 1 ); + return GetSystemMetricsForDpi( SM_CXDLGFRAME, dpi ) + ret; case SM_CYFRAME: - ncm.cbSize = sizeof(ncm); - SystemParametersInfoForDpi( SPI_GETNONCLIENTMETRICS, 0, &ncm, 0, dpi ); - return GetSystemMetricsForDpi( SM_CYDLGFRAME, dpi ) + ncm.iBorderWidth; + get_entry_dpi( &entry_BORDER, 0, &ret, dpi ); + ret = max( ret, 1 ); + return GetSystemMetricsForDpi( SM_CYDLGFRAME, dpi ) + ret; case SM_CXICONSPACING: im.cbSize = sizeof(im); SystemParametersInfoForDpi( SPI_GETICONMETRICS, sizeof(im), &im, 0, dpi ); @@ -2960,17 +2952,15 @@ INT WINAPI GetSystemMetricsForDpi( INT index, UINT dpi ) SystemParametersInfoForDpi( SPI_GETNONCLIENTMETRICS, 0, &ncm, 0, dpi ); return ncm.iSmCaptionHeight + 1; case SM_CXSMSIZE: - ncm.cbSize = sizeof(ncm); - SystemParametersInfoForDpi( SPI_GETNONCLIENTMETRICS, 0, &ncm, 0, dpi ); - return ncm.iSmCaptionWidth; + get_entry_dpi( &entry_SMCAPTIONWIDTH, 0, &ret, dpi ); + return ret; case SM_CYSMSIZE: ncm.cbSize = sizeof(ncm); SystemParametersInfoForDpi( SPI_GETNONCLIENTMETRICS, 0, &ncm, 0, dpi ); return ncm.iSmCaptionHeight; case SM_CXMENUSIZE: - ncm.cbSize = sizeof(ncm); - SystemParametersInfoForDpi( SPI_GETNONCLIENTMETRICS, 0, &ncm, 0, dpi ); - return ncm.iMenuWidth; + get_entry_dpi( &entry_MENUWIDTH, 0, &ret, dpi ); + return ret; case SM_CYMENUSIZE: ncm.cbSize = sizeof(ncm); SystemParametersInfoForDpi( SPI_GETNONCLIENTMETRICS, 0, &ncm, 0, dpi );
1
0
0
0
Naveen Narayanan : ntdll: Set pthread stack guard size to 0 for NetBSD.
by Alexandre Julliard
13 Aug '19
13 Aug '19
Module: wine Branch: master Commit: de5392bfe7919c180d6650eec7b57b5386a4796f URL:
https://source.winehq.org/git/wine.git/?a=commit;h=de5392bfe7919c180d6650ee…
Author: Naveen Narayanan <zerous(a)nocebo.space> Date: Mon Aug 12 19:29:22 2019 +0200 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(a)nocebo.space> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ntdll/thread.c | 1 + 1 file changed, 1 insertion(+) diff --git a/dlls/ntdll/thread.c b/dlls/ntdll/thread.c index 126bf76..97bd4bf 100644 --- a/dlls/ntdll/thread.c +++ b/dlls/ntdll/thread.c @@ -525,6 +525,7 @@ NTSTATUS WINAPI RtlCreateUserThread( HANDLE process, SECURITY_DESCRIPTOR *descr, pthread_attr_init( &attr ); pthread_attr_setstack( &attr, teb->DeallocationStack, (char *)teb->Tib.StackBase + extra_stack - (char *)teb->DeallocationStack ); + pthread_attr_setguardsize( &attr, 0 ); pthread_attr_setscope( &attr, PTHREAD_SCOPE_SYSTEM ); /* force creating a kernel thread */ interlocked_xchg_add( &nb_threads, 1 ); if (pthread_create( &pthread_id, &attr, (void * (*)(void *))start_thread, info ))
1
0
0
0
Chip Davis : configure: Add a missing comma.
by Alexandre Julliard
13 Aug '19
13 Aug '19
Module: wine Branch: master Commit: 594c64543f616ba805b782608798d27da2111622 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=594c64543f616ba805b78260…
Author: Chip Davis <cdavis(a)codeweavers.com> Date: Tue Aug 13 11:52:41 2019 -0500 configure: Add a missing comma. Signed-off-by: Chip Davis <cdavis(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- configure | 5 ++--- configure.ac | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/configure b/configure index 2103658..702023b 100755 --- a/configure +++ b/configure @@ -14252,10 +14252,9 @@ $as_echo "#define HAVE_PPDEV 1" >>confdefs.h fi ac_wine_check_funcs_save_LIBS="$LIBS" -LIBS="$LIBS " +LIBS="$LIBS $PTHREAD_LIBS" for ac_func in \ - pthread_getthreadid_np \ - $PTHREAD_LIBS + pthread_getthreadid_np do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" diff --git a/configure.ac b/configure.ac index 59d5fa6..499c4f3 100644 --- a/configure.ac +++ b/configure.ac @@ -1564,7 +1564,7 @@ fi dnl **** Check for pthread functions **** WINE_CHECK_LIB_FUNCS(\ - pthread_getthreadid_np \ + pthread_getthreadid_np, [$PTHREAD_LIBS]) dnl **** Check for zlib ****
1
0
0
0
Alexandre Julliard : wineboot: Only use cpuid on platforms where it makes sense.
by Alexandre Julliard
13 Aug '19
13 Aug '19
Module: wine Branch: master Commit: 44ee1c47ff8c76a64ac8760d53a483749f9bb1fb URL:
https://source.winehq.org/git/wine.git/?a=commit;h=44ee1c47ff8c76a64ac8760d…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Tue Aug 13 20:24:48 2019 +0200 wineboot: Only use cpuid on platforms where it makes sense. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- programs/wineboot/wineboot.c | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/programs/wineboot/wineboot.c b/programs/wineboot/wineboot.c index 55f2c6c..add8c47 100644 --- a/programs/wineboot/wineboot.c +++ b/programs/wineboot/wineboot.c @@ -185,6 +185,8 @@ static DWORD set_reg_value( HKEY hkey, const WCHAR *name, const WCHAR *value ) return RegSetValueExW( hkey, name, 0, REG_SZ, (const BYTE *)value, (lstrlenW(value) + 1) * sizeof(WCHAR) ); } +#if defined(__i386__) || defined(__x86_64__) + #if defined(_MSC_VER) static void do_cpuid( unsigned int ax, unsigned int *p ) { @@ -205,7 +207,7 @@ __ASM_GLOBAL_FUNC( do_cpuid, "popl %ebx\n\t" "popl %esi\n\t" "ret" ) -#elif defined(__x86_64__) +#else extern void __cdecl do_cpuid( unsigned int ax, unsigned int *p ); __ASM_GLOBAL_FUNC( do_cpuid, "pushq %rsi\n\t" @@ -220,11 +222,6 @@ __ASM_GLOBAL_FUNC( do_cpuid, "popq %rbx\n\t" "popq %rsi\n\t" "ret" ) -#else -static void do_cpuid( unsigned int ax, unsigned int *p ) -{ - FIXME("\n"); -} #endif static void regs_to_str( unsigned int *regs, unsigned int len, WCHAR *buffer ) @@ -291,6 +288,14 @@ static void get_namestring( WCHAR *buf ) for (i = lstrlenW(buf) - 1; i >= 0 && buf[i] == ' '; i--) buf[i] = 0; } +#else /* __i386__ || __x86_64__ */ + +static void get_identifier( WCHAR *buf, size_t size, const WCHAR *arch ) { } +static void get_vendorid( WCHAR *buf ) { } +static void get_namestring( WCHAR *buf ) { } + +#endif /* __i386__ || __x86_64__ */ + /* create the volatile hardware registry keys */ static void create_hardware_registry_keys(void) {
1
0
0
0
Alexandre Julliard : ntdll: Fix support for breakpoint exceptions on ARM64.
by Alexandre Julliard
13 Aug '19
13 Aug '19
Module: wine Branch: master Commit: fc97373f6202c8fef8d070f8b3cc5671baa6b6c0 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=fc97373f6202c8fef8d070f8…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Tue Aug 13 15:41:55 2019 +0200 ntdll: Fix support for breakpoint exceptions on ARM64. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ntdll/signal_arm64.c | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/dlls/ntdll/signal_arm64.c b/dlls/ntdll/signal_arm64.c index 4ebccd2..e405c90 100644 --- a/dlls/ntdll/signal_arm64.c +++ b/dlls/ntdll/signal_arm64.c @@ -506,6 +506,17 @@ done: } /********************************************************************** + * raise_trap_exception + */ +static void WINAPI raise_trap_exception( EXCEPTION_RECORD *rec, CONTEXT *context ) +{ + NTSTATUS status; + if (rec->ExceptionCode == EXCEPTION_BREAKPOINT) context->Pc += 4; + status = NtRaiseException( rec, context, TRUE ); + raise_status( status, rec ); +} + +/********************************************************************** * raise_generic_exception */ static void WINAPI raise_generic_exception( EXCEPTION_RECORD *rec, CONTEXT *context ) @@ -704,7 +715,7 @@ static void segv_handler( int signal, siginfo_t *info, void *ucontext ) static void trap_handler( int signal, siginfo_t *info, void *ucontext ) { ucontext_t *context = ucontext; - EXCEPTION_RECORD *rec = setup_exception( context, raise_generic_exception ); + EXCEPTION_RECORD *rec = setup_exception( context, raise_trap_exception ); switch (info->si_code) { @@ -1208,18 +1219,12 @@ void signal_exit_process( int status ) /********************************************************************** * DbgBreakPoint (NTDLL.@) */ -void WINAPI DbgBreakPoint(void) -{ - kill(getpid(), SIGTRAP); -} +__ASM_STDCALL_FUNC( DbgBreakPoint, 0, "brk #0; ret") /********************************************************************** * DbgUserBreakPoint (NTDLL.@) */ -void WINAPI DbgUserBreakPoint(void) -{ - kill(getpid(), SIGTRAP); -} +__ASM_STDCALL_FUNC( DbgUserBreakPoint, 0, "brk #0; ret") /********************************************************************** * NtCurrentTeb (NTDLL.@)
1
0
0
0
Alexandre Julliard : ntdll: Don' t run exception handlers on the signal stack on ARM64.
by Alexandre Julliard
13 Aug '19
13 Aug '19
Module: wine Branch: master Commit: 3027c266fc02b650378cb083a18e82fb9c7cba19 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=3027c266fc02b650378cb083…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Tue Aug 13 15:41:25 2019 +0200 ntdll: Don't run exception handlers on the signal stack on ARM64. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ntdll/signal_arm64.c | 95 ++++++++++++++++------------------------------- 1 file changed, 31 insertions(+), 64 deletions(-) diff --git a/dlls/ntdll/signal_arm64.c b/dlls/ntdll/signal_arm64.c index 1531a0e..4ebccd2 100644 --- a/dlls/ntdll/signal_arm64.c +++ b/dlls/ntdll/signal_arm64.c @@ -470,6 +470,7 @@ static EXCEPTION_RECORD *setup_exception( ucontext_t *sigcontext, raise_func fun stack->rec.NumberParameters = 0; save_context( &stack->context, sigcontext ); + save_fpu( &stack->context, sigcontext ); /* now modify the sigcontext to return to the raise function */ SP_sig(sigcontext) = (ULONG_PTR)stack; @@ -499,12 +500,21 @@ static void WINAPI raise_segv_exception( EXCEPTION_RECORD *rec, CONTEXT *context break; } status = NtRaiseException( rec, context, TRUE ); - if (status) raise_status( status, rec ); + raise_status( status, rec ); done: set_cpu_context( context ); } /********************************************************************** + * raise_generic_exception + */ +static void WINAPI raise_generic_exception( EXCEPTION_RECORD *rec, CONTEXT *context ) +{ + NTSTATUS status = NtRaiseException( rec, context, TRUE ); + raise_status( status, rec ); +} + +/********************************************************************** * call_stack_handlers * * Call the stack handlers chain. @@ -693,29 +703,19 @@ static void segv_handler( int signal, siginfo_t *info, void *ucontext ) */ static void trap_handler( int signal, siginfo_t *info, void *ucontext ) { - EXCEPTION_RECORD rec; - CONTEXT context; - NTSTATUS status; + ucontext_t *context = ucontext; + EXCEPTION_RECORD *rec = setup_exception( context, raise_generic_exception ); - switch ( info->si_code ) + switch (info->si_code) { case TRAP_TRACE: - rec.ExceptionCode = EXCEPTION_SINGLE_STEP; + rec->ExceptionCode = EXCEPTION_SINGLE_STEP; break; case TRAP_BRKPT: default: - rec.ExceptionCode = EXCEPTION_BREAKPOINT; + rec->ExceptionCode = EXCEPTION_BREAKPOINT; break; } - - save_context( &context, ucontext ); - rec.ExceptionFlags = EXCEPTION_CONTINUABLE; - rec.ExceptionRecord = NULL; - rec.ExceptionAddress = (LPVOID)context.Pc; - rec.NumberParameters = 0; - status = raise_exception( &rec, &context, TRUE ); - if (status) raise_status( status, &rec ); - restore_context( &context, ucontext ); } /********************************************************************** @@ -725,66 +725,52 @@ static void trap_handler( int signal, siginfo_t *info, void *ucontext ) */ static void fpe_handler( int signal, siginfo_t *siginfo, void *sigcontext ) { - EXCEPTION_RECORD rec; - CONTEXT context; - NTSTATUS status; - - save_fpu( &context, sigcontext ); - save_context( &context, sigcontext ); + EXCEPTION_RECORD *rec = setup_exception( sigcontext, raise_generic_exception ); switch (siginfo->si_code & 0xffff ) { #ifdef FPE_FLTSUB case FPE_FLTSUB: - rec.ExceptionCode = EXCEPTION_ARRAY_BOUNDS_EXCEEDED; + rec->ExceptionCode = EXCEPTION_ARRAY_BOUNDS_EXCEEDED; break; #endif #ifdef FPE_INTDIV case FPE_INTDIV: - rec.ExceptionCode = EXCEPTION_INT_DIVIDE_BY_ZERO; + rec->ExceptionCode = EXCEPTION_INT_DIVIDE_BY_ZERO; break; #endif #ifdef FPE_INTOVF case FPE_INTOVF: - rec.ExceptionCode = EXCEPTION_INT_OVERFLOW; + rec->ExceptionCode = EXCEPTION_INT_OVERFLOW; break; #endif #ifdef FPE_FLTDIV case FPE_FLTDIV: - rec.ExceptionCode = EXCEPTION_FLT_DIVIDE_BY_ZERO; + rec->ExceptionCode = EXCEPTION_FLT_DIVIDE_BY_ZERO; break; #endif #ifdef FPE_FLTOVF case FPE_FLTOVF: - rec.ExceptionCode = EXCEPTION_FLT_OVERFLOW; + rec->ExceptionCode = EXCEPTION_FLT_OVERFLOW; break; #endif #ifdef FPE_FLTUND case FPE_FLTUND: - rec.ExceptionCode = EXCEPTION_FLT_UNDERFLOW; + rec->ExceptionCode = EXCEPTION_FLT_UNDERFLOW; break; #endif #ifdef FPE_FLTRES case FPE_FLTRES: - rec.ExceptionCode = EXCEPTION_FLT_INEXACT_RESULT; + rec->ExceptionCode = EXCEPTION_FLT_INEXACT_RESULT; break; #endif #ifdef FPE_FLTINV case FPE_FLTINV: #endif default: - rec.ExceptionCode = EXCEPTION_FLT_INVALID_OPERATION; + rec->ExceptionCode = EXCEPTION_FLT_INVALID_OPERATION; break; } - rec.ExceptionFlags = EXCEPTION_CONTINUABLE; - rec.ExceptionRecord = NULL; - rec.ExceptionAddress = (LPVOID)context.Pc; - rec.NumberParameters = 0; - status = raise_exception( &rec, &context, TRUE ); - if (status) raise_status( status, &rec ); - - restore_context( &context, sigcontext ); - restore_fpu( &context, sigcontext ); } /********************************************************************** @@ -796,19 +782,9 @@ static void int_handler( int signal, siginfo_t *siginfo, void *sigcontext ) { if (!dispatch_signal(SIGINT)) { - EXCEPTION_RECORD rec; - CONTEXT context; - NTSTATUS status; - - save_context( &context, sigcontext ); - rec.ExceptionCode = CONTROL_C_EXIT; - rec.ExceptionFlags = EXCEPTION_CONTINUABLE; - rec.ExceptionRecord = NULL; - rec.ExceptionAddress = (LPVOID)context.Pc; - rec.NumberParameters = 0; - status = raise_exception( &rec, &context, TRUE ); - if (status) raise_status( status, &rec ); - restore_context( &context, sigcontext ); + EXCEPTION_RECORD *rec = setup_exception( sigcontext, raise_generic_exception ); + + rec->ExceptionCode = CONTROL_C_EXIT; } } @@ -820,19 +796,10 @@ static void int_handler( int signal, siginfo_t *siginfo, void *sigcontext ) */ static void abrt_handler( int signal, siginfo_t *siginfo, void *sigcontext ) { - EXCEPTION_RECORD rec; - CONTEXT context; - NTSTATUS status; + EXCEPTION_RECORD *rec = setup_exception( sigcontext, raise_generic_exception ); - save_context( &context, sigcontext ); - rec.ExceptionCode = EXCEPTION_WINE_ASSERTION; - rec.ExceptionFlags = EH_NONCONTINUABLE; - rec.ExceptionRecord = NULL; - rec.ExceptionAddress = (LPVOID)context.Pc; - rec.NumberParameters = 0; - status = raise_exception( &rec, &context, TRUE ); - if (status) raise_status( status, &rec ); - restore_context( &context, sigcontext ); + rec->ExceptionCode = EXCEPTION_WINE_ASSERTION; + rec->ExceptionFlags = EH_NONCONTINUABLE; }
1
0
0
0
Alexandre Julliard : ntdll: Implement setting the thread context on ARM64.
by Alexandre Julliard
13 Aug '19
13 Aug '19
Module: wine Branch: master Commit: 94a98cf5a23e38824384a3412687b840c9d6b5c8 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=94a98cf5a23e38824384a341…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Tue Aug 13 14:53:07 2019 +0200 ntdll: Implement setting the thread context on ARM64. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ntdll/signal_arm64.c | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/dlls/ntdll/signal_arm64.c b/dlls/ntdll/signal_arm64.c index 648a140..1531a0e 100644 --- a/dlls/ntdll/signal_arm64.c +++ b/dlls/ntdll/signal_arm64.c @@ -252,7 +252,8 @@ __ASM_STDCALL_FUNC( RtlCaptureContext, 8, */ static void set_cpu_context( const CONTEXT *context ) { - FIXME( "Not implemented on ARM64\n" ); + interlocked_xchg_ptr( (void **)&arm64_thread_data()->context, (void *)context ); + raise( SIGUSR2 ); } /*********************************************************************** @@ -861,6 +862,21 @@ static void usr1_handler( int signal, siginfo_t *siginfo, void *sigcontext ) } +/********************************************************************** + * usr2_handler + * + * Handler for SIGUSR2, used to set a thread context. + */ +static void usr2_handler( int signal, siginfo_t *siginfo, void *sigcontext ) +{ + CONTEXT *context = interlocked_xchg_ptr( (void **)&arm64_thread_data()->context, NULL ); + if (!context) return; + if ((context->ContextFlags & ~CONTEXT_ARM64) & CONTEXT_FLOATING_POINT) + restore_fpu( context, sigcontext ); + restore_context( context, sigcontext ); +} + + /*********************************************************************** * __wine_set_signal_handler (NTDLL.@) */ @@ -955,6 +971,8 @@ void signal_init_process(void) if (sigaction( SIGQUIT, &sig_act, NULL ) == -1) goto error; sig_act.sa_sigaction = usr1_handler; if (sigaction( SIGUSR1, &sig_act, NULL ) == -1) goto error; + sig_act.sa_sigaction = usr2_handler; + if (sigaction( SIGUSR2, &sig_act, NULL ) == -1) goto error; sig_act.sa_sigaction = segv_handler; if (sigaction( SIGSEGV, &sig_act, NULL ) == -1) goto error;
1
0
0
0
← Newer
1
...
39
40
41
42
43
44
45
...
71
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
Results per page:
10
25
50
100
200