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
November 2018
----- 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
951 discussions
Start a n
N
ew thread
Zhiyi Zhang : kernelbase: Implement PathAllocCombine.
by Alexandre Julliard
26 Nov '18
26 Nov '18
Module: wine Branch: master Commit: abcfcb1d7eadabc67fd6d13989ebcae587d1dd34 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=abcfcb1d7eadabc67fd6d139…
Author: Zhiyi Zhang <zzhang(a)codeweavers.com> Date: Mon Nov 26 10:31:03 2018 +0800 kernelbase: Implement PathAllocCombine. Signed-off-by: Zhiyi Zhang <zzhang(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- .../api-ms-win-core-path-l1-1-0.spec | 2 +- dlls/kernelbase/kernelbase.spec | 2 +- dlls/kernelbase/path.c | 57 ++++++++++ dlls/kernelbase/tests/path.c | 117 +++++++++++++++++++-- include/pathcch.h | 1 + 5 files changed, 166 insertions(+), 13 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=abcfcb1d7eadabc67fd6…
1
0
0
0
Dmitry Timoshkov : user32/tests: Add a message test for group of radio buttons.
by Alexandre Julliard
26 Nov '18
26 Nov '18
Module: wine Branch: master Commit: af88297f4a5452673d8dccbd7eb956e5f9ce4577 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=af88297f4a5452673d8dccbd…
Author: Dmitry Timoshkov <dmitry(a)baikal.ru> Date: Sun Nov 25 20:58:08 2018 +0300 user32/tests: Add a message test for group of radio buttons. Signed-off-by: Dmitry Timoshkov <dmitry(a)baikal.ru> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/user32/tests/msg.c | 125 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 125 insertions(+) diff --git a/dlls/user32/tests/msg.c b/dlls/user32/tests/msg.c index 28b58b6..b39d0b2 100644 --- a/dlls/user32/tests/msg.c +++ b/dlls/user32/tests/msg.c @@ -6670,6 +6670,130 @@ static void test_button_bm_get_set_image(void) ReleaseDC(0, hdc); } +#define ID_RADIO1 0x00e1 +#define ID_RADIO2 0x00e2 + +static const struct message auto_radio_button_WM_CLICK[] = +{ + { BM_CLICK, sent|wparam|lparam, 0, 0 }, + { WM_LBUTTONDOWN, sent|wparam|lparam|defwinproc, 0, 0 }, + { EVENT_SYSTEM_CAPTURESTART, winevent_hook|wparam|lparam, 0, 0 }, + { BM_SETSTATE, sent|wparam|lparam|defwinproc, BST_CHECKED, 0 }, + { WM_CTLCOLORSTATIC, sent|parent }, + { EVENT_OBJECT_STATECHANGE, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, + { WM_LBUTTONUP, sent|wparam|lparam|defwinproc, 0, 0 }, + { BM_SETSTATE, sent|wparam|lparam|defwinproc, BST_UNCHECKED, 0 }, + { WM_CTLCOLORSTATIC, sent|parent }, + { EVENT_OBJECT_STATECHANGE, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, + { WM_GETDLGCODE, sent|wparam|lparam|defwinproc, 0, 0 }, + { BM_SETCHECK, sent|wparam|lparam|defwinproc, BST_CHECKED, 0 }, + { WM_GETDLGCODE, sent|wparam|lparam|defwinproc, 0, 0 }, + { BM_SETCHECK, sent|wparam|lparam|defwinproc, 0, 0 }, + { WM_CTLCOLORSTATIC, sent|parent }, + { EVENT_OBJECT_STATECHANGE, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, + { WM_GETDLGCODE, sent|wparam|lparam|defwinproc, 0, 0 }, + { BM_SETCHECK, sent|wparam|lparam|defwinproc, 0, 0 }, + { WM_CTLCOLORSTATIC, sent|parent }, + { EVENT_OBJECT_STATECHANGE, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, + { WM_GETDLGCODE, sent|wparam|lparam|defwinproc, 0, 0 }, + { EVENT_SYSTEM_CAPTUREEND, winevent_hook|wparam|lparam, 0, 0 }, + { WM_CAPTURECHANGED, sent|wparam|lparam|defwinproc, 0, 0 }, + { WM_COMMAND, sent|wparam|parent, MAKEWPARAM(ID_RADIO2, BN_CLICKED) }, + { WM_NCHITTEST, sent|optional, 0, 0 }, /* FIXME: Wine doesn't send it */ + { WM_SETCURSOR, sent|optional, 0, 0 }, /* FIXME: Wine doesn't send it */ + { WM_MOUSEMOVE, sent|optional, 0, 0 }, /* FIXME: Wine doesn't send it */ + { 0 } +}; + +static void test_autoradio_messages(void) +{ + HWND parent, radio1, radio2, radio3, child; + RECT rc; + MSG msg; + DWORD ret; + + subclass_button(); + + parent = CreateWindowExA(0, "TestParentClass", "Test parent", WS_OVERLAPPEDWINDOW | WS_VISIBLE, + 100, 100, 200, 200, 0, 0, 0, NULL); + ok(parent != 0, "failed to create parent window\n"); + radio1 = CreateWindowExA(0, "my_button_class", "radio1", WS_VISIBLE | WS_CHILD | WS_GROUP | BS_AUTORADIOBUTTON | BS_NOTIFY, + 0, 0, 70, 18, parent, (HMENU)ID_RADIO1, 0, NULL); + ok(radio1 != 0, "failed to create child window\n"); + radio3 = CreateWindowExA(0, "my_button_class", "radio3", WS_VISIBLE | WS_CHILD | BS_RADIOBUTTON | BS_NOTIFY, + 0, 25, 70, 18, parent, (HMENU)-1, 0, NULL); + ok(radio3 != 0, "failed to create child window\n"); + child = CreateWindowExA(0, "my_button_class", "text", WS_VISIBLE | WS_CHILD | BS_PUSHBUTTON | BS_NOTIFY, + 0, 50, 70, 18, parent, (HMENU)-1, 0, NULL); + ok(child != 0, "failed to create child window\n"); + radio2 = CreateWindowExA(0, "my_button_class", "radio2", WS_VISIBLE | WS_CHILD | BS_AUTORADIOBUTTON | BS_NOTIFY, + 0, 75, 70, 18, parent, (HMENU)ID_RADIO2, 0, NULL); + ok(radio2 != 0, "failed to create child window\n"); + + /* this avoids focus messages in the generated sequence */ + SetFocus(radio2); + + flush_events(); + flush_sequence(); + + ret = SendMessageA(radio1, BM_GETCHECK, 0, 0); + ok(ret == BST_UNCHECKED, "got %08x\n", ret); + ret = SendMessageA(radio2, BM_GETCHECK, 0, 0); + ok(ret == BST_UNCHECKED, "got %08x\n", ret); + ret = SendMessageA(radio3, BM_GETCHECK, 0, 0); + ok(ret == BST_UNCHECKED, "got %08x\n", ret); + + SendMessageA(radio1, BM_SETCHECK, BST_CHECKED, 0); + + ret = SendMessageA(radio1, BM_GETCHECK, 0, 0); + ok(ret == BST_CHECKED, "got %08x\n", ret); + ret = SendMessageA(radio2, BM_GETCHECK, 0, 0); + ok(ret == BST_UNCHECKED, "got %08x\n", ret); + ret = SendMessageA(radio3, BM_GETCHECK, 0, 0); + ok(ret == BST_UNCHECKED, "got %08x\n", ret); + + SendMessageA(radio2, BM_SETCHECK, BST_CHECKED, 0); + + ret = SendMessageA(radio1, BM_GETCHECK, 0, 0); + ok(ret == BST_CHECKED, "got %08x\n", ret); + ret = SendMessageA(radio2, BM_GETCHECK, 0, 0); + ok(ret == BST_CHECKED, "got %08x\n", ret); + ret = SendMessageA(radio3, BM_GETCHECK, 0, 0); + ok(ret == BST_UNCHECKED, "got %08x\n", ret); + + SendMessageA(radio3, BM_SETCHECK, BST_CHECKED, 0); + + ret = SendMessageA(radio1, BM_GETCHECK, 0, 0); + ok(ret == BST_CHECKED, "got %08x\n", ret); + ret = SendMessageA(radio2, BM_GETCHECK, 0, 0); + ok(ret == BST_CHECKED, "got %08x\n", ret); + ret = SendMessageA(radio3, BM_GETCHECK, 0, 0); + ok(ret == BST_CHECKED, "got %08x\n", ret); + + GetWindowRect(radio2, &rc); + SetCursorPos(rc.left+1, rc.top+1); + + flush_events(); + flush_sequence(); + + log_all_parent_messages++; + + SendMessageA(radio2, BM_CLICK, 0, 0); + while (PeekMessageA(&msg, 0, 0, 0, PM_REMOVE)) DispatchMessageA(&msg); + ok_sequence(auto_radio_button_WM_CLICK, "BM_CLICK on auto-radio button", FALSE); + + log_all_parent_messages--; + + ret = SendMessageA(radio1, BM_GETCHECK, 0, 0); + ok(ret == BST_UNCHECKED, "got %08x\n", ret); + ret = SendMessageA(radio2, BM_GETCHECK, 0, 0); + ok(ret == BST_CHECKED, "got %08x\n", ret); + ret = SendMessageA(radio3, BM_GETCHECK, 0, 0); + ok(ret == BST_UNCHECKED, "got %08x\n", ret); + + DestroyWindow(parent); +} + /****************** static message test *************************/ static const struct message WmSetFontStaticSeq2[] = { @@ -17130,6 +17254,7 @@ START_TEST(msg) test_mdi_messages(); test_button_messages(); test_button_bm_get_set_image(); + test_autoradio_messages(); test_static_messages(); test_listbox_messages(); test_combobox_messages();
1
0
0
0
Dmitry Timoshkov : user32: Move the auto radio button group logic from BM_SETCHECK to WM_LBUTTONUP handler.
by Alexandre Julliard
26 Nov '18
26 Nov '18
Module: wine Branch: master Commit: 96d0af52eb0d14084397647b974c5efebb59d0f0 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=96d0af52eb0d14084397647b…
Author: Dmitry Timoshkov <dmitry(a)baikal.ru> Date: Sun Nov 25 20:58:00 2018 +0300 user32: Move the auto radio button group logic from BM_SETCHECK to WM_LBUTTONUP handler. This patch also changes the logic to get the control style with WM_GETDLGCODE instead of GetWindowLong to make the message test pass. Signed-off-by: Dmitry Timoshkov <dmitry(a)baikal.ru> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/user32/button.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/dlls/user32/button.c b/dlls/user32/button.c index 9255a46..9a011ba 100644 --- a/dlls/user32/button.c +++ b/dlls/user32/button.c @@ -309,7 +309,7 @@ LRESULT ButtonWndProc_common(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam, SendMessageW( hWnd, BM_SETCHECK, !(state & BST_CHECKED), 0 ); break; case BS_AUTORADIOBUTTON: - SendMessageW( hWnd, BM_SETCHECK, TRUE, 0 ); + BUTTON_CheckAutoRadioButton( hWnd ); break; case BS_AUTO3STATE: SendMessageW( hWnd, BM_SETCHECK, @@ -475,8 +475,6 @@ LRESULT ButtonWndProc_common(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam, set_button_state( hWnd, (state & ~3) | wParam ); paint_button( hWnd, btn_type, ODA_SELECT ); } - if ((btn_type == BS_AUTORADIOBUTTON) && (wParam == BST_CHECKED) && (style & WS_CHILD)) - BUTTON_CheckAutoRadioButton( hWnd ); break; case BM_GETSTATE: @@ -961,13 +959,12 @@ static void BUTTON_CheckAutoRadioButton( HWND hwnd ) parent = GetParent(hwnd); /* make sure that starting control is not disabled or invisible */ - start = sibling = GetNextDlgGroupItem( parent, hwnd, TRUE ); + start = sibling = hwnd; do { if (!sibling) break; - if ((hwnd != sibling) && - ((GetWindowLongW( sibling, GWL_STYLE) & BS_TYPEMASK) == BS_AUTORADIOBUTTON)) - SendMessageW( sibling, BM_SETCHECK, BST_UNCHECKED, 0 ); + if (SendMessageW( sibling, WM_GETDLGCODE, 0, 0 ) == (DLGC_BUTTON | DLGC_RADIOBUTTON)) + SendMessageW( sibling, BM_SETCHECK, sibling == hwnd ? BST_CHECKED : BST_UNCHECKED, 0 ); sibling = GetNextDlgGroupItem( parent, sibling, FALSE ); } while (sibling != start); }
1
0
0
0
Dmitry Timoshkov : user32: Don't force a combobox repaint on WM_SIZE.
by Alexandre Julliard
26 Nov '18
26 Nov '18
Module: wine Branch: master Commit: 2d9e3236ea8ae752184b8a285f9d616ec94afb8f URL:
https://source.winehq.org/git/wine.git/?a=commit;h=2d9e3236ea8ae752184b8a28…
Author: Dmitry Timoshkov <dmitry(a)baikal.ru> Date: Sun Nov 25 20:57:53 2018 +0300 user32: Don't force a combobox repaint on WM_SIZE. This breaks z-order based painting and causes side effects for applications that during the WM_PAINT processing reference internal data associated with a not fully initialized window. Signed-off-by: Dmitry Timoshkov <dmitry(a)baikal.ru> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/user32/combo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/user32/combo.c b/dlls/user32/combo.c index 31ec6af..59c2e64 100644 --- a/dlls/user32/combo.c +++ b/dlls/user32/combo.c @@ -1536,7 +1536,7 @@ static void COMBO_Size( LPHEADCOMBO lphc ) &lphc->buttonRect, &lphc->droppedRect); - CBResetPos( lphc, &lphc->textRect, &lphc->droppedRect, TRUE ); + CBResetPos( lphc, &lphc->textRect, &lphc->droppedRect, FALSE ); }
1
0
0
0
Zebediah Figura : setupapi/tests: Remove workarounds in test_SetupDiOpenClassRegKeyExA().
by Alexandre Julliard
26 Nov '18
26 Nov '18
Module: wine Branch: master Commit: 48be2832504dc0d9f15c58af79e729f8524783f8 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=48be2832504dc0d9f15c58af…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Sun Nov 25 23:20:24 2018 -0600 setupapi/tests: Remove workarounds in test_SetupDiOpenClassRegKeyExA(). Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/setupapi/tests/devinst.c | 75 +++++++++++++------------------------------ 1 file changed, 23 insertions(+), 52 deletions(-) diff --git a/dlls/setupapi/tests/devinst.c b/dlls/setupapi/tests/devinst.c index 164df2b..0e6a1c0 100644 --- a/dlls/setupapi/tests/devinst.c +++ b/dlls/setupapi/tests/devinst.c @@ -33,22 +33,10 @@ #include "wine/heap.h" #include "wine/test.h" -/* function pointers */ -static BOOL (WINAPI *pSetupDiCallClassInstaller)(DI_FUNCTION, HDEVINFO, PSP_DEVINFO_DATA); -static HKEY (WINAPI *pSetupDiOpenClassRegKeyExA)(GUID*,REGSAM,DWORD,PCSTR,PVOID); - /* This is a unique guid for testing purposes */ static GUID guid = {0x6a55b5a4, 0x3f65, 0x11db, {0xb7,0x04,0x00,0x11,0x95,0x5c,0x2b,0xdb}}; static GUID guid2 = {0x6a55b5a5, 0x3f65, 0x11db, {0xb7,0x04,0x00,0x11,0x95,0x5c,0x2b,0xdb}}; -static void init_function_pointers(void) -{ - HMODULE hSetupAPI = GetModuleHandleA("setupapi.dll"); - - pSetupDiCallClassInstaller = (void *)GetProcAddress(hSetupAPI, "SetupDiCallClassInstaller"); - pSetupDiOpenClassRegKeyExA = (void *)GetProcAddress(hSetupAPI, "SetupDiOpenClassRegKeyExA"); -} - static LSTATUS devinst_RegDeleteTreeW(HKEY hKey, LPCWSTR lpszSubKey) { LONG ret; @@ -149,42 +137,32 @@ static void test_create_device_list_ex(void) ok(ret, "Failed to destroy device list, error %#x.\n", GetLastError()); } -static void test_SetupDiOpenClassRegKeyExA(void) +static void test_open_class_key(void) { - static const CHAR guidString[] = "{6a55b5a4-3f65-11db-b704-0011955c2bdb}"; - HKEY hkey; + static const char guidstr[] = "{6a55b5a4-3f65-11db-b704-0011955c2bdb}"; + HKEY root_key, class_key; + LONG res; - /* Check return value for nonexistent key */ - hkey = pSetupDiOpenClassRegKeyExA(&guid, KEY_ALL_ACCESS, - DIOCR_INSTALLER, NULL, NULL); - ok(hkey == INVALID_HANDLE_VALUE, - "returned %p (expected INVALID_HANDLE_VALUE)\n", hkey); + SetLastError(0xdeadbeef); + class_key = SetupDiOpenClassRegKeyExA(&guid, KEY_ALL_ACCESS, DIOCR_INSTALLER, NULL, NULL); + ok(class_key == INVALID_HANDLE_VALUE, "Expected failure.\n"); +todo_wine + ok(GetLastError() == ERROR_INVALID_CLASS, "Got unexpected error %#x.\n", GetLastError()); - /* Test it for a key that exists */ - hkey = SetupDiOpenClassRegKey(NULL, KEY_ALL_ACCESS); - if (hkey != INVALID_HANDLE_VALUE) - { - HKEY classKey; - if (RegCreateKeyA(hkey, guidString, &classKey) == ERROR_SUCCESS) - { - RegCloseKey(classKey); - SetLastError(0xdeadbeef); - classKey = pSetupDiOpenClassRegKeyExA(&guid, KEY_ALL_ACCESS, - DIOCR_INSTALLER, NULL, NULL); - ok(classKey != INVALID_HANDLE_VALUE, - "opening class registry key failed with error %d\n", - GetLastError()); - if (classKey != INVALID_HANDLE_VALUE) - RegCloseKey(classKey); - RegDeleteKeyA(hkey, guidString); - } - else - trace("failed to create registry key for test\n"); + root_key = SetupDiOpenClassRegKey(NULL, KEY_ALL_ACCESS); + ok(root_key != INVALID_HANDLE_VALUE, "Failed to open root key, error %#x.\n", GetLastError()); - RegCloseKey(hkey); - } - else - trace("failed to open classes key %u\n", GetLastError()); + res = RegCreateKeyA(root_key, guidstr, &class_key); + ok(!res, "Failed to create class key, error %#x.\n", GetLastError()); + RegCloseKey(class_key); + + SetLastError(0xdeadbeef); + class_key = SetupDiOpenClassRegKeyExA(&guid, KEY_ALL_ACCESS, DIOCR_INSTALLER, NULL, NULL); + ok(class_key != INVALID_HANDLE_VALUE, "Failed to open class key, error %#x.\n", GetLastError()); + RegCloseKey(class_key); + + RegDeleteKeyA(root_key, guidstr); + RegCloseKey(root_key); } static void create_inf_file(LPCSTR filename) @@ -1357,8 +1335,6 @@ START_TEST(devinst) { HKEY hkey; - init_function_pointers(); - if ((hkey = SetupDiOpenClassRegKey(NULL, KEY_ALL_ACCESS)) == INVALID_HANDLE_VALUE) { skip("needs admin rights\n"); @@ -1367,12 +1343,7 @@ START_TEST(devinst) RegCloseKey(hkey); test_create_device_list_ex(); - - if (pSetupDiOpenClassRegKeyExA) - test_SetupDiOpenClassRegKeyExA(); - else - win_skip("SetupDiOpenClassRegKeyExA is not available\n"); - + test_open_class_key(); test_install_class(); test_device_info(); test_get_device_instance_id();
1
0
0
0
Zebediah Figura : setupapi/tests: Remove workarounds in test_SetupDiCreateDeviceInfoListEx().
by Alexandre Julliard
26 Nov '18
26 Nov '18
Module: wine Branch: master Commit: bc8a117747f91f229a5e0ac7c72f3b0d48623dd6 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=bc8a117747f91f229a5e0ac7…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Sun Nov 25 23:20:23 2018 -0600 setupapi/tests: Remove workarounds in test_SetupDiCreateDeviceInfoListEx(). Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/setupapi/tests/devinst.c | 70 ++++++++++++++----------------------------- 1 file changed, 22 insertions(+), 48 deletions(-) diff --git a/dlls/setupapi/tests/devinst.c b/dlls/setupapi/tests/devinst.c index b24480c..164df2b 100644 --- a/dlls/setupapi/tests/devinst.c +++ b/dlls/setupapi/tests/devinst.c @@ -34,9 +34,7 @@ #include "wine/test.h" /* function pointers */ -static HDEVINFO (WINAPI *pSetupDiCreateDeviceInfoListExW)(GUID*,HWND,PCWSTR,PVOID); static BOOL (WINAPI *pSetupDiCallClassInstaller)(DI_FUNCTION, HDEVINFO, PSP_DEVINFO_DATA); -static BOOL (WINAPI *pSetupDiDestroyDeviceInfoList)(HDEVINFO); static HKEY (WINAPI *pSetupDiOpenClassRegKeyExA)(GUID*,REGSAM,DWORD,PCSTR,PVOID); /* This is a unique guid for testing purposes */ @@ -47,8 +45,6 @@ static void init_function_pointers(void) { HMODULE hSetupAPI = GetModuleHandleA("setupapi.dll"); - pSetupDiCreateDeviceInfoListExW = (void *)GetProcAddress(hSetupAPI, "SetupDiCreateDeviceInfoListExW"); - pSetupDiDestroyDeviceInfoList = (void *)GetProcAddress(hSetupAPI, "SetupDiDestroyDeviceInfoList"); pSetupDiCallClassInstaller = (void *)GetProcAddress(hSetupAPI, "SetupDiCallClassInstaller"); pSetupDiOpenClassRegKeyExA = (void *)GetProcAddress(hSetupAPI, "SetupDiOpenClassRegKeyExA"); } @@ -119,57 +115,38 @@ cleanup: return ret; } -static void test_SetupDiCreateDeviceInfoListEx(void) +static void test_create_device_list_ex(void) { - HDEVINFO devlist; - BOOL ret; - DWORD error; - static CHAR notnull[] = "NotNull"; static const WCHAR machine[] = { 'd','u','m','m','y',0 }; static const WCHAR empty[] = { 0 }; + static char notnull[] = "NotNull"; + HDEVINFO set; + BOOL ret; SetLastError(0xdeadbeef); - /* create empty DeviceInfoList, but set Reserved to a value, which is not NULL */ - devlist = pSetupDiCreateDeviceInfoListExW(NULL, NULL, NULL, notnull); - - error = GetLastError(); - if (error == ERROR_CALL_NOT_IMPLEMENTED) - { - win_skip("SetupDiCreateDeviceInfoListExW is not implemented\n"); - return; - } - ok(devlist == INVALID_HANDLE_VALUE, "SetupDiCreateDeviceInfoListExW failed : %p %d (expected %p)\n", devlist, error, INVALID_HANDLE_VALUE); - ok(error == ERROR_INVALID_PARAMETER, "GetLastError returned wrong value : %d, (expected %d)\n", error, ERROR_INVALID_PARAMETER); + set = SetupDiCreateDeviceInfoListExW(NULL, NULL, NULL, notnull); + ok(set == INVALID_HANDLE_VALUE, "Expected failure.\n"); + ok(GetLastError() == ERROR_INVALID_PARAMETER, "Got unexpected error %#x.\n", GetLastError()); SetLastError(0xdeadbeef); - /* create empty DeviceInfoList, but set MachineName to something */ - devlist = pSetupDiCreateDeviceInfoListExW(NULL, NULL, machine, NULL); + set = SetupDiCreateDeviceInfoListExW(NULL, NULL, machine, NULL); + ok(set == INVALID_HANDLE_VALUE, "Expected failure.\n"); + ok(GetLastError() == ERROR_INVALID_MACHINENAME + || GetLastError() == ERROR_MACHINE_UNAVAILABLE + || GetLastError() == ERROR_CALL_NOT_IMPLEMENTED, + "Got unexpected error %#x.\n", GetLastError()); - error = GetLastError(); - if (error == ERROR_CALL_NOT_IMPLEMENTED) - { - /* win10 reports ERROR_CALL_NOT_IMPLEMENTED at first here */ - win_skip("SetupDiCreateDeviceInfoListExW is not implemented\n"); - return; - } - ok(devlist == INVALID_HANDLE_VALUE, "SetupDiCreateDeviceInfoListExW failed : %p %d (expected %p)\n", devlist, error, INVALID_HANDLE_VALUE); - ok(error == ERROR_INVALID_MACHINENAME || error == ERROR_MACHINE_UNAVAILABLE, "GetLastError returned wrong value : %d, (expected %d or %d)\n", error, ERROR_INVALID_MACHINENAME, ERROR_MACHINE_UNAVAILABLE); + set = SetupDiCreateDeviceInfoListExW(NULL, NULL, NULL, NULL); + ok(set && set != INVALID_HANDLE_VALUE, "Failed to create device list, error %#x.", GetLastError()); - /* create empty DeviceInfoList */ - devlist = pSetupDiCreateDeviceInfoListExW(NULL, NULL, NULL, NULL); - ok(devlist && devlist != INVALID_HANDLE_VALUE, "SetupDiCreateDeviceInfoListExW failed : %p %d (expected != %p)\n", devlist, error, INVALID_HANDLE_VALUE); - - /* destroy DeviceInfoList */ - ret = pSetupDiDestroyDeviceInfoList(devlist); - ok(ret, "SetupDiDestroyDeviceInfoList failed : %d\n", error); + ret = SetupDiDestroyDeviceInfoList(set); + ok(ret, "Failed to destroy device list, error %#x.\n", GetLastError()); - /* create empty DeviceInfoList with empty machine name */ - devlist = pSetupDiCreateDeviceInfoListExW(NULL, NULL, empty, NULL); - ok(devlist && devlist != INVALID_HANDLE_VALUE, "SetupDiCreateDeviceInfoListExW failed : %p %d (expected != %p)\n", devlist, error, INVALID_HANDLE_VALUE); + set = SetupDiCreateDeviceInfoListExW(NULL, NULL, empty, NULL); + ok(set && set != INVALID_HANDLE_VALUE, "Failed to create device list, error %#x.", GetLastError()); - /* destroy DeviceInfoList */ - ret = pSetupDiDestroyDeviceInfoList(devlist); - ok(ret, "SetupDiDestroyDeviceInfoList failed : %d\n", error); + ret = SetupDiDestroyDeviceInfoList(set); + ok(ret, "Failed to destroy device list, error %#x.\n", GetLastError()); } static void test_SetupDiOpenClassRegKeyExA(void) @@ -1389,10 +1366,7 @@ START_TEST(devinst) } RegCloseKey(hkey); - if (pSetupDiCreateDeviceInfoListExW) - test_SetupDiCreateDeviceInfoListEx(); - else - win_skip("SetupDiCreateDeviceInfoListExW is not available\n"); + test_create_device_list_ex(); if (pSetupDiOpenClassRegKeyExA) test_SetupDiOpenClassRegKeyExA();
1
0
0
0
Zebediah Figura : setupapi/tests: Remove workarounds in testSetupDiGetINFClassA().
by Alexandre Julliard
26 Nov '18
26 Nov '18
Module: wine Branch: master Commit: 3fef0ace1661f609f41fa38d7af09030208b0884 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=3fef0ace1661f609f41fa38d…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Sun Nov 25 23:20:22 2018 -0600 setupapi/tests: Remove workarounds in testSetupDiGetINFClassA(). Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/setupapi/tests/devinst.c | 55 ++++++++++--------------------------------- 1 file changed, 12 insertions(+), 43 deletions(-) diff --git a/dlls/setupapi/tests/devinst.c b/dlls/setupapi/tests/devinst.c index c58e35f..b24480c 100644 --- a/dlls/setupapi/tests/devinst.c +++ b/dlls/setupapi/tests/devinst.c @@ -37,7 +37,6 @@ static HDEVINFO (WINAPI *pSetupDiCreateDeviceInfoListExW)(GUID*,HWND,PCWSTR,PVOID); static BOOL (WINAPI *pSetupDiCallClassInstaller)(DI_FUNCTION, HDEVINFO, PSP_DEVINFO_DATA); static BOOL (WINAPI *pSetupDiDestroyDeviceInfoList)(HDEVINFO); -static BOOL (WINAPI *pSetupDiGetINFClassA)(PCSTR, LPGUID, PSTR, DWORD, PDWORD); static HKEY (WINAPI *pSetupDiOpenClassRegKeyExA)(GUID*,REGSAM,DWORD,PCSTR,PVOID); /* This is a unique guid for testing purposes */ @@ -52,7 +51,6 @@ static void init_function_pointers(void) pSetupDiDestroyDeviceInfoList = (void *)GetProcAddress(hSetupAPI, "SetupDiDestroyDeviceInfoList"); pSetupDiCallClassInstaller = (void *)GetProcAddress(hSetupAPI, "SetupDiCallClassInstaller"); pSetupDiOpenClassRegKeyExA = (void *)GetProcAddress(hSetupAPI, "SetupDiOpenClassRegKeyExA"); - pSetupDiGetINFClassA = (void *)GetProcAddress(hSetupAPI, "SetupDiGetINFClassA"); } static LSTATUS devinst_RegDeleteTreeW(HKEY hKey, LPCWSTR lpszSubKey) @@ -1157,7 +1155,7 @@ todo_wine } } -static void testSetupDiGetINFClassA(void) +static void test_get_inf_class(void) { static const char inffile[] = "winetest.inf"; static const char content[] = "[Version]\r\n\r\n"; @@ -1171,19 +1169,7 @@ static void testSetupDiGetINFClassA(void) HANDLE h; int i; - if(!pSetupDiGetINFClassA) - { - win_skip("SetupDiGetINFClassA not present\n"); - return; - } - - count = GetTempPathA(MAX_PATH, filename); - if(!count) - { - win_skip("GetTempPathA failed\n"); - return; - } - + GetTempPathA(MAX_PATH, filename); strcat(filename, inffile); DeleteFileA(filename); @@ -1191,11 +1177,6 @@ static void testSetupDiGetINFClassA(void) SetLastError(0xdeadbeef); retval = SetupDiGetINFClassA(filename, &guid, cn, MAX_PATH, &count); ok(!retval, "expected SetupDiGetINFClassA to fail!\n"); - if (ERROR_CALL_NOT_IMPLEMENTED == GetLastError()) - { - skip("SetupDiGetINFClassA is not implemented\n"); - return; - } ok(ERROR_FILE_NOT_FOUND == GetLastError(), "expected error ERROR_FILE_NOT_FOUND, got %u\n", GetLastError()); @@ -1227,12 +1208,8 @@ static void testSetupDiGetINFClassA(void) /* test file content */ h = CreateFileA(filename, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL); - if(h == INVALID_HANDLE_VALUE) - { - win_skip("failed to create file %s (error %u)\n", filename, GetLastError()); - return; - } - CloseHandle( h); + ok(h != INVALID_HANDLE_VALUE, "Failed to create file, error %#x.\n", GetLastError()); + CloseHandle(h); retval = SetupDiGetINFClassA(filename, &guid, cn, MAX_PATH, &count); ok(!retval, "expected SetupDiGetINFClassA to fail!\n"); @@ -1242,13 +1219,9 @@ static void testSetupDiGetINFClassA(void) trace("testing signature %s\n", signatures[i]); h = CreateFileA(filename, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL); - if(h == INVALID_HANDLE_VALUE) - { - win_skip("failed to create file %s (error %u)\n", filename, GetLastError()); - return; - } - WriteFile( h, content, sizeof(content), &count, NULL); - CloseHandle( h); + ok(h != INVALID_HANDLE_VALUE, "Failed to create file, error %#x.\n", GetLastError()); + WriteFile(h, content, sizeof(content), &count, NULL); + CloseHandle(h); retval = SetupDiGetINFClassA(filename, &guid, cn, MAX_PATH, &count); ok(!retval, "expected SetupDiGetINFClassA to fail!\n"); @@ -1300,10 +1273,8 @@ static void testSetupDiGetINFClassA(void) SetLastError(0xdeadbeef); retval = SetupDiGetINFClassA(filename, &guid, cn, 0, &count); ok(!retval, "expected SetupDiGetINFClassA to fail!\n"); - ok(ERROR_INSUFFICIENT_BUFFER == GetLastError() || - ERROR_INVALID_PARAMETER == GetLastError(), - "expected error ERROR_INSUFFICIENT_BUFFER or ERROR_INVALID_PARAMETER, " - "got %u\n", GetLastError()); + ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER || GetLastError() == ERROR_INVALID_PARAMETER /* 2k3+ */, + "Got unexpected error %#x.\n", GetLastError()); DeleteFileA(filename); @@ -1313,10 +1284,8 @@ static void testSetupDiGetINFClassA(void) SetLastError(0xdeadbeef); retval = SetupDiGetINFClassA(filename, &guid, cn, MAX_PATH, &count); ok(!retval, "expected SetupDiGetINFClassA to fail!\n"); - ok(RPC_S_INVALID_STRING_UUID == GetLastError() || - ERROR_INVALID_PARAMETER == GetLastError(), - "expected error RPC_S_INVALID_STRING_UUID or ERROR_INVALID_PARAMETER, " - "got %u\n", GetLastError()); + ok(GetLastError() == RPC_S_INVALID_STRING_UUID || GetLastError() == ERROR_INVALID_PARAMETER /* 7+ */, + "Got unexpected error %#x.\n", GetLastError()); /* network adapter guid */ WritePrivateProfileStringA("Version", "ClassGUID", @@ -1440,7 +1409,7 @@ START_TEST(devinst) test_register_device_iface(); test_registry_property_a(); test_registry_property_w(); - testSetupDiGetINFClassA(); + test_get_inf_class(); test_devnode(); test_device_interface_key(); }
1
0
0
0
Andreas Maier : dbghelp: SymFromAddr: Handle 2 or more symbols at the same address correct.
by Alexandre Julliard
26 Nov '18
26 Nov '18
Module: wine Branch: master Commit: d614ac46718311f49541b32ac726c17a06077ae1 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=d614ac46718311f49541b32a…
Author: Andreas Maier <staubim(a)quantentunnel.de> Date: Sun Nov 25 10:15:50 2018 +0100 dbghelp: SymFromAddr: Handle 2 or more symbols at the same address correct. Signed-off-by: Andreas Maier <staubim(a)quantentunnel.de> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/dbghelp/symbol.c | 54 +++++++++++++++++++++++++++++++++------------------ 1 file changed, 35 insertions(+), 19 deletions(-) diff --git a/dlls/dbghelp/symbol.c b/dlls/dbghelp/symbol.c index 05aea05..c9585c5 100644 --- a/dlls/dbghelp/symbol.c +++ b/dlls/dbghelp/symbol.c @@ -850,6 +850,33 @@ static void symt_get_length(struct module* module, const struct symt* symt, ULON *size = 0x1000; /* arbitrary value */ } +/* neede by symt_find_nearest */ +int symt_get_best_at(struct module* module, int idx_sorttab) +{ + ULONG64 ref_addr; + int idx_sorttab_orig = idx_sorttab; + if (module->addr_sorttab[idx_sorttab]->symt.tag == SymTagPublicSymbol) + { + symt_get_address(&module->addr_sorttab[idx_sorttab]->symt, &ref_addr); + while (idx_sorttab > 0 && + module->addr_sorttab[idx_sorttab]->symt.tag == SymTagPublicSymbol && + !cmp_sorttab_addr(module, idx_sorttab - 1, ref_addr)) + idx_sorttab--; + if (module->addr_sorttab[idx_sorttab]->symt.tag == SymTagPublicSymbol) + { + idx_sorttab = idx_sorttab_orig; + while (idx_sorttab < module->num_sorttab - 1 && + module->addr_sorttab[idx_sorttab]->symt.tag == SymTagPublicSymbol && + !cmp_sorttab_addr(module, idx_sorttab + 1, ref_addr)) + idx_sorttab++; + } + /* if no better symbol fond restore original */ + if (module->addr_sorttab[idx_sorttab]->symt.tag == SymTagPublicSymbol) + idx_sorttab = idx_sorttab_orig; + } + return idx_sorttab; +} + /* assume addr is in module */ struct symt_ht* symt_find_nearest(struct module* module, DWORD_PTR addr) { @@ -868,7 +895,12 @@ struct symt_ht* symt_find_nearest(struct module* module, DWORD_PTR addr) high = module->num_sorttab; symt_get_address(&module->addr_sorttab[0]->symt, &ref_addr); - if (addr < ref_addr) return NULL; + if (addr <= ref_addr) + { + low = symt_get_best_at(module, 0); + return module->addr_sorttab[low]; + } + if (high) { symt_get_address(&module->addr_sorttab[high - 1]->symt, &ref_addr); @@ -891,23 +923,7 @@ struct symt_ht* symt_find_nearest(struct module* module, DWORD_PTR addr) /* If found symbol is a public symbol, check if there are any other entries that * might also have the same address, but would get better information */ - if (module->addr_sorttab[low]->symt.tag == SymTagPublicSymbol) - { - symt_get_address(&module->addr_sorttab[low]->symt, &ref_addr); - if (low > 0 && - module->addr_sorttab[low - 1]->symt.tag != SymTagPublicSymbol && - !cmp_sorttab_addr(module, low - 1, ref_addr)) - low--; - else if (low < module->num_sorttab - 1 && - module->addr_sorttab[low + 1]->symt.tag != SymTagPublicSymbol && - !cmp_sorttab_addr(module, low + 1, ref_addr)) - low++; - } - /* finally check that we fit into the found symbol */ - symt_get_address(&module->addr_sorttab[low]->symt, &ref_addr); - if (addr < ref_addr) return NULL; - symt_get_length(module, &module->addr_sorttab[low]->symt, &ref_size); - if (addr >= ref_addr + ref_size) return NULL; + low = symt_get_best_at(module, low); return module->addr_sorttab[low]; } @@ -1236,7 +1252,7 @@ BOOL WINAPI SymFromAddr(HANDLE hProcess, DWORD64 Address, symt_fill_sym_info(&pair, NULL, &sym->symt, Symbol); if (Displacement) - *Displacement = Address - Symbol->Address; + *Displacement = (Address >= Symbol->Address) ? (Address - Symbol->Address) : (DWORD64)-1; return TRUE; }
1
0
0
0
Andreas Maier : dbghelp: Set last error for SymGetModuleBase-calls to ERROR_MOD_NOT_FOUND.
by Alexandre Julliard
26 Nov '18
26 Nov '18
Module: wine Branch: master Commit: 6c3418914df3196bf5a464649ef302a5e942dd90 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=6c3418914df3196bf5a46464…
Author: Andreas Maier <staubim(a)quantentunnel.de> Date: Sun Nov 25 10:15:49 2018 +0100 dbghelp: Set last error for SymGetModuleBase-calls to ERROR_MOD_NOT_FOUND. Signed-off-by: Andreas Maier <staubim(a)quantentunnel.de> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/dbghelp/module.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/dbghelp/module.c b/dlls/dbghelp/module.c index 98fc10c..cfbb586 100644 --- a/dlls/dbghelp/module.c +++ b/dlls/dbghelp/module.c @@ -436,7 +436,7 @@ struct module* module_find_by_addr(const struct process* pcs, DWORD64 addr, return module; } } - SetLastError(ERROR_INVALID_ADDRESS); + SetLastError(ERROR_MOD_NOT_FOUND); return module; }
1
0
0
0
Andreas Maier : dbghelp: Set correct values in symt_fill_sym_info ( SYMBOL_INFO).
by Alexandre Julliard
26 Nov '18
26 Nov '18
Module: wine Branch: master Commit: 8d096fb5e262e5e87866d1a4a397da144a09b635 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=8d096fb5e262e5e87866d1a4…
Author: Andreas Maier <staubim(a)quantentunnel.de> Date: Sun Nov 25 10:15:48 2018 +0100 dbghelp: Set correct values in symt_fill_sym_info (SYMBOL_INFO). Signed-off-by: Andreas Maier <staubim(a)quantentunnel.de> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/dbghelp/dbghelp_private.h | 5 ++++- dlls/dbghelp/elf_module.c | 1 + dlls/dbghelp/msc.c | 5 ++++- dlls/dbghelp/pe_module.c | 11 ++++++----- dlls/dbghelp/symbol.c | 13 ++++++++++--- 5 files changed, 25 insertions(+), 10 deletions(-) diff --git a/dlls/dbghelp/dbghelp_private.h b/dlls/dbghelp/dbghelp_private.h index 7b872fe..ae8bc50 100644 --- a/dlls/dbghelp/dbghelp_private.h +++ b/dlls/dbghelp/dbghelp_private.h @@ -227,6 +227,7 @@ struct symt_public struct symt symt; struct hash_table_elt hash_elt; struct symt* container; /* compiland */ + BOOL is_function; unsigned long address; unsigned long size; }; @@ -716,7 +717,9 @@ extern struct symt_public* symt_new_public(struct module* module, struct symt_compiland* parent, const char* typename, - unsigned long address, unsigned size) DECLSPEC_HIDDEN; + BOOL is_function, + unsigned long address, + unsigned size) DECLSPEC_HIDDEN; extern struct symt_data* symt_new_global_variable(struct module* module, struct symt_compiland* parent, diff --git a/dlls/dbghelp/elf_module.c b/dlls/dbghelp/elf_module.c index 6b8d47a..96b16fd 100644 --- a/dlls/dbghelp/elf_module.c +++ b/dlls/dbghelp/elf_module.c @@ -927,6 +927,7 @@ static int elf_new_public_symbols(struct module* module, const struct hash_table while ((ste = hash_table_iter_up(&hti))) { symt_new_public(module, ste->compiland, ste->ht_elt.name, + FALSE, module->reloc_delta + ste->sym.st_value, ste->sym.st_size); } diff --git a/dlls/dbghelp/msc.c b/dlls/dbghelp/msc.c index ae51884..adb66d6 100644 --- a/dlls/dbghelp/msc.c +++ b/dlls/dbghelp/msc.c @@ -2072,6 +2072,7 @@ static BOOL codeview_snarf_public(const struct msc_debug_info* msc_dbg, const BY { symt_new_public(msc_dbg->module, compiland, terminate_string(&sym->public_v1.p_name), + sym->public_v1.symtype == SYMTYPE_FUNCTION, codeview_get_address(msc_dbg, sym->public_v1.segment, sym->public_v1.offset), 1); } break; @@ -2080,6 +2081,7 @@ static BOOL codeview_snarf_public(const struct msc_debug_info* msc_dbg, const BY { symt_new_public(msc_dbg->module, compiland, terminate_string(&sym->public_v2.p_name), + sym->public_v2.symtype == SYMTYPE_FUNCTION, codeview_get_address(msc_dbg, sym->public_v2.segment, sym->public_v2.offset), 1); } break; @@ -2089,6 +2091,7 @@ static BOOL codeview_snarf_public(const struct msc_debug_info* msc_dbg, const BY { symt_new_public(msc_dbg->module, compiland, sym->public_v3.name, + sym->public_v3.symtype == SYMTYPE_FUNCTION, codeview_get_address(msc_dbg, sym->public_v3.segment, sym->public_v3.offset), 1); } break; @@ -2885,7 +2888,7 @@ static BOOL pdb_process_file(const struct process* pcs, if (ret) { struct pdb_module_info* pdb_info = msc_dbg->module->format_info[DFI_PDB]->u.pdb_info; - msc_dbg->module->module.SymType = SymCv; + msc_dbg->module->module.SymType = SymPdb; if (pdb_info->pdb_files[0].kind == PDB_JG) msc_dbg->module->module.PdbSig = pdb_info->pdb_files[0].u.jg.timestamp; else diff --git a/dlls/dbghelp/pe_module.c b/dlls/dbghelp/pe_module.c index 025cd60..c077c07 100644 --- a/dlls/dbghelp/pe_module.c +++ b/dlls/dbghelp/pe_module.c @@ -442,7 +442,7 @@ static BOOL pe_load_coff_symbol_table(struct module* module) source_new(module, NULL, lastfilename)); if (!(dbghelp_options & SYMOPT_NO_PUBLICS)) - symt_new_public(module, compiland, name, + symt_new_public(module, compiland, name, FALSE, module->module.BaseOfImage + sect[isym->SectionNumber - 1].VirtualAddress + isym->Value, 1); @@ -635,11 +635,11 @@ static BOOL pe_load_export_debug_info(const struct process* pcs, struct module* #if 0 /* Add start of DLL (better use the (yet unimplemented) Exe SymTag for this) */ /* FIXME: module.ModuleName isn't correctly set yet if it's passed in SymLoadModule */ - symt_new_public(module, NULL, module->module.ModuleName, base, 1); + symt_new_public(module, NULL, module->module.ModuleName, FALSE, base, 1); #endif /* Add entry point */ - symt_new_public(module, NULL, "EntryPoint", + symt_new_public(module, NULL, "EntryPoint", FALSE, base + nth->OptionalHeader.AddressOfEntryPoint, 1); #if 0 /* FIXME: we'd better store addresses linked to sections rather than @@ -650,7 +650,7 @@ static BOOL pe_load_export_debug_info(const struct process* pcs, struct module* ((char*)&nth->OptionalHeader + nth->FileHeader.SizeOfOptionalHeader); for (i = 0; i < nth->FileHeader.NumberOfSections; i++, section++) { - symt_new_public(module, NULL, section->Name, + symt_new_public(module, NULL, section->Name, FALSE, RtlImageRvaToVa(nth, mapping, section->VirtualAddress, NULL), 1); } #endif @@ -676,6 +676,7 @@ static BOOL pe_load_export_debug_info(const struct process* pcs, struct module* if (!names[i]) continue; symt_new_public(module, NULL, RtlImageRvaToVa(nth, mapping, names[i], NULL), + FALSE, base + functions[ordinals[i]], 1); } @@ -687,7 +688,7 @@ static BOOL pe_load_export_debug_info(const struct process* pcs, struct module* if ((ordinals[j] == i) && names[j]) break; if (j < exports->NumberOfNames) continue; snprintf(buffer, sizeof(buffer), "%d", i + exports->Base); - symt_new_public(module, NULL, buffer, base + (DWORD)functions[i], 1); + symt_new_public(module, NULL, buffer, FALSE, base + (DWORD)functions[i], 1); } } } diff --git a/dlls/dbghelp/symbol.c b/dlls/dbghelp/symbol.c index de871ec..05aea05 100644 --- a/dlls/dbghelp/symbol.c +++ b/dlls/dbghelp/symbol.c @@ -202,6 +202,7 @@ struct symt_compiland* symt_new_compiland(struct module* module, struct symt_public* symt_new_public(struct module* module, struct symt_compiland* compiland, const char* name, + BOOL is_function, unsigned long address, unsigned size) { struct symt_public* sym; @@ -217,6 +218,7 @@ struct symt_public* symt_new_public(struct module* module, sym->symt.tag = SymTagPublicSymbol; sym->hash_elt.name = pool_strdup(&module->pool, name); sym->container = compiland ? &compiland->symt : NULL; + sym->is_function = is_function; sym->address = address; sym->size = size; symt_add_module_ht(module, (struct symt_ht*)sym); @@ -673,11 +675,16 @@ static void symt_fill_sym_info(struct module_pair* pair, } break; case SymTagPublicSymbol: - sym_info->Flags |= SYMFLAG_EXPORT; - symt_get_address(sym, &sym_info->Address); + { + const struct symt_public* pub = (const struct symt_public*)sym; + if (pub->is_function) + sym_info->Flags |= SYMFLAG_PUBLIC_CODE; + else + sym_info->Flags |= SYMFLAG_EXPORT; + symt_get_address(sym, &sym_info->Address); + } break; case SymTagFunction: - sym_info->Flags |= SYMFLAG_FUNCTION; symt_get_address(sym, &sym_info->Address); break; case SymTagThunk:
1
0
0
0
← Newer
1
...
35
36
37
38
39
40
41
...
96
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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
Results per page:
10
25
50
100
200