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
October 2008
----- 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
3 participants
1216 discussions
Start a n
N
ew thread
Andrew Talbot : ddraw: Sign-compare warning fix.
by Alexandre Julliard
01 Oct '08
01 Oct '08
Module: wine Branch: master Commit: 623ee7775b3f077babd4ac8e408a408aa5cea543 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=623ee7775b3f077babd4ac8e4…
Author: Andrew Talbot <andrew.talbot(a)talbotville.com> Date: Tue Sep 30 20:41:03 2008 +0100 ddraw: Sign-compare warning fix. --- dlls/ddraw/surface.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dlls/ddraw/surface.c b/dlls/ddraw/surface.c index fc481e4..727bcce 100644 --- a/dlls/ddraw/surface.c +++ b/dlls/ddraw/surface.c @@ -285,7 +285,7 @@ IDirectDrawSurfaceImpl_Release(IDirectDrawSurface7 *iface) IDirectDrawSurfaceImpl *surf; IDirectDrawImpl *ddraw; IUnknown *ifaceToRelease = This->ifaceToRelease; - int i; + UINT i; /* Complex attached surfaces are destroyed implicitly when the root is released */ EnterCriticalSection(&ddraw_cs);
1
0
0
0
Dmitry Timoshkov : gdi32: Make the PS_NULL test pass under Wine.
by Alexandre Julliard
01 Oct '08
01 Oct '08
Module: wine Branch: master Commit: 40e1e397856589e128ba65d6633c570ac246e3e4 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=40e1e397856589e128ba65d66…
Author: Dmitry Timoshkov <dmitry(a)codeweavers.com> Date: Wed Oct 1 03:09:02 2008 +0900 gdi32: Make the PS_NULL test pass under Wine. --- dlls/gdi32/pen.c | 6 ++++++ dlls/gdi32/tests/pen.c | 2 -- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/dlls/gdi32/pen.c b/dlls/gdi32/pen.c index 6fe39af..a308f2b 100644 --- a/dlls/gdi32/pen.c +++ b/dlls/gdi32/pen.c @@ -80,6 +80,12 @@ HPEN WINAPI CreatePenIndirect( const LOGPEN * pen ) PENOBJ * penPtr; HPEN hpen; + if (pen->lopnStyle == PS_NULL) + { + hpen = GetStockObject(NULL_PEN); + if (hpen) return hpen; + } + if (!(penPtr = GDI_AllocObject( sizeof(PENOBJ), PEN_MAGIC, (HGDIOBJ *)&hpen, &pen_funcs ))) return 0; if (pen->lopnStyle == PS_USERSTYLE || pen->lopnStyle == PS_ALTERNATE) diff --git a/dlls/gdi32/tests/pen.c b/dlls/gdi32/tests/pen.c index 144875b..64304fa 100644 --- a/dlls/gdi32/tests/pen.c +++ b/dlls/gdi32/tests/pen.c @@ -144,7 +144,6 @@ static void test_logpen(void) /* for some reason XP differentiates PS_NULL here */ if (pen[i].style == PS_NULL) { - todo_wine ok(hpen == GetStockObject(NULL_PEN), "hpen should be a stock NULL_PEN\n"); ok(size == sizeof(EXTLOGPEN), "GetObject returned %d, error %d\n", size, GetLastError()); ok(elp.elpPenStyle == pen[i].ret_style, "expected %u, got %u\n", pen[i].ret_style, elp.elpPenStyle); @@ -210,7 +209,6 @@ static void test_logpen(void) if (pen[i].style == PS_NULL) { ok(obj_type == OBJ_PEN, "wrong object type %u\n", obj_type); - todo_wine ok(hpen == GetStockObject(NULL_PEN), "hpen should be a stock NULL_PEN\n"); } else
1
0
0
0
Juan Lang : wintrust: Implement WTHelperGetKnownUsages.
by Alexandre Julliard
01 Oct '08
01 Oct '08
Module: wine Branch: master Commit: 8c90767c3d8c1e2df6c633a8b97d5c7cc8b093dd URL:
http://source.winehq.org/git/wine.git/?a=commit;h=8c90767c3d8c1e2df6c633a8b…
Author: Juan Lang <juan.lang(a)gmail.com> Date: Tue Sep 30 10:11:30 2008 -0700 wintrust: Implement WTHelperGetKnownUsages. --- dlls/wintrust/tests/softpub.c | 8 ---- dlls/wintrust/wintrust_main.c | 81 ++++++++++++++++++++++++++++++++++++++++- 2 files changed, 79 insertions(+), 10 deletions(-) diff --git a/dlls/wintrust/tests/softpub.c b/dlls/wintrust/tests/softpub.c index 4bb45c4..5509bce 100644 --- a/dlls/wintrust/tests/softpub.c +++ b/dlls/wintrust/tests/softpub.c @@ -479,17 +479,14 @@ static void test_get_known_usages(void) } SetLastError(0xdeadbeef); ret = pWTHelperGetKnownUsages(0, NULL); - todo_wine ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); SetLastError(0xdeadbeef); ret = pWTHelperGetKnownUsages(1, NULL); - todo_wine ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); SetLastError(0xdeadbeef); ret = pWTHelperGetKnownUsages(0, &usages); - todo_wine ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); /* A value of 1 for the first parameter seems to imply the value is @@ -498,9 +495,7 @@ static void test_get_known_usages(void) SetLastError(0xdeadbeef); usages = NULL; ret = pWTHelperGetKnownUsages(1, &usages); - todo_wine ok(ret, "WTHelperGetKnownUsages failed: %d\n", GetLastError()); - todo_wine ok(usages != NULL, "expected a pointer\n"); if (ret && usages) { @@ -523,17 +518,14 @@ static void test_get_known_usages(void) */ SetLastError(0xdeadbeef); ret = pWTHelperGetKnownUsages(2, &usages); - todo_wine ok(ret, "WTHelperGetKnownUsages failed: %d\n", GetLastError()); ok(usages == NULL, "expected pointer to be cleared\n"); SetLastError(0xdeadbeef); usages = NULL; ret = pWTHelperGetKnownUsages(2, &usages); - todo_wine ok(ret, "WTHelperGetKnownUsages failed: %d\n", GetLastError()); SetLastError(0xdeadbeef); ret = pWTHelperGetKnownUsages(2, NULL); - todo_wine ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); } diff --git a/dlls/wintrust/wintrust_main.c b/dlls/wintrust/wintrust_main.c index 2cfc898..091c0d4 100644 --- a/dlls/wintrust/wintrust_main.c +++ b/dlls/wintrust/wintrust_main.c @@ -735,13 +735,90 @@ HANDLE WINAPI WTHelperGetFileHandle(WINTRUST_DATA *data) return INVALID_HANDLE_VALUE; } +static BOOL WINAPI WINTRUST_enumUsages(PCCRYPT_OID_INFO pInfo, void *pvArg) +{ + PCCRYPT_OID_INFO **usages = (PCCRYPT_OID_INFO **)pvArg; + DWORD cUsages; + BOOL ret; + + if (!*usages) + { + cUsages = 0; + *usages = WINTRUST_Alloc(2 * sizeof(PCCRYPT_OID_INFO)); + } + else + { + PCCRYPT_OID_INFO *ptr; + + /* Count the existing usages. + * FIXME: make sure the new usage doesn't duplicate any in the list? + */ + for (cUsages = 0, ptr = *usages; *ptr; ptr++, cUsages++) + ; + *usages = WINTRUST_ReAlloc((CRYPT_OID_INFO *)*usages, + (cUsages + 1) * sizeof(PCCRYPT_OID_INFO)); + } + if (*usages) + { + (*usages)[cUsages] = pInfo; + (*usages)[cUsages + 1] = NULL; + ret = TRUE; + } + else + { + SetLastError(ERROR_OUTOFMEMORY); + ret = FALSE; + } + return ret; +} + /*********************************************************************** * WTHelperGetKnownUsages(WINTRUST.@) + * + * Enumerates the known enhanced key usages as an array of PCCRYPT_OID_INFOs. + * + * PARAMS + * action [In] 1 => allocate and return known usages, 2 => free previously + * allocated usages. + * usages [In/Out] If action == 1, *usages is set to an array of + * PCCRYPT_OID_INFO *. The array is terminated with a NULL + * pointer. + * If action == 2, *usages is freed. + * + * RETURNS + * TRUE on success, FALSE on failure. */ BOOL WINAPI WTHelperGetKnownUsages(DWORD action, PCCRYPT_OID_INFO **usages) { - FIXME("(%d, %p): stub\n", action, usages); - return FALSE; + BOOL ret; + + TRACE("(%d, %p)\n", action, usages); + + if (!usages) + { + SetLastError(ERROR_INVALID_PARAMETER); + return FALSE; + } + + if (action == 1) + { + *usages = NULL; + ret = CryptEnumOIDInfo(CRYPT_ENHKEY_USAGE_OID_GROUP_ID, 0, usages, + WINTRUST_enumUsages); + } + else if (action == 2) + { + WINTRUST_Free((CRYPT_OID_INFO *)*usages); + *usages = NULL; + ret = TRUE; + } + else + { + WARN("unknown action %d\n", action); + SetLastError(ERROR_INVALID_PARAMETER); + ret = FALSE; + } + return ret; } static const WCHAR Software_Publishing[] = {
1
0
0
0
Juan Lang : wintrust: Add tests for WTHelperGetKnownUsages.
by Alexandre Julliard
01 Oct '08
01 Oct '08
Module: wine Branch: master Commit: c4c409e91cc84a3230f949e1dff4aaed2d46c957 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=c4c409e91cc84a3230f949e1d…
Author: Juan Lang <juan.lang(a)gmail.com> Date: Tue Sep 30 10:11:00 2008 -0700 wintrust: Add tests for WTHelperGetKnownUsages. --- dlls/wintrust/tests/softpub.c | 90 +++++++++++++++++++++++++++++++++++++++++ 1 files changed, 90 insertions(+), 0 deletions(-) diff --git a/dlls/wintrust/tests/softpub.c b/dlls/wintrust/tests/softpub.c index 01902dd..4bb45c4 100644 --- a/dlls/wintrust/tests/softpub.c +++ b/dlls/wintrust/tests/softpub.c @@ -450,8 +450,98 @@ static void test_wintrust(void) hr); } +static BOOL (WINAPI * pWTHelperGetKnownUsages)(DWORD action, PCCRYPT_OID_INFO **usages); + +static void InitFunctionPtrs(void) +{ + HMODULE hWintrust = GetModuleHandleA("wintrust.dll"); + +#define WINTRUST_GET_PROC(func) \ + p ## func = (void*)GetProcAddress(hWintrust, #func); \ + if(!p ## func) { \ + trace("GetProcAddress(%s) failed\n", #func); \ + } + + WINTRUST_GET_PROC(WTHelperGetKnownUsages) + +#undef WINTRUST_GET_PROC +} + +static void test_get_known_usages(void) +{ + BOOL ret; + PCCRYPT_OID_INFO *usages; + + if (!pWTHelperGetKnownUsages) + { + skip("missing WTHelperGetKnownUsages\n"); + return; + } + SetLastError(0xdeadbeef); + ret = pWTHelperGetKnownUsages(0, NULL); + todo_wine + ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER, + "expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); + SetLastError(0xdeadbeef); + ret = pWTHelperGetKnownUsages(1, NULL); + todo_wine + ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER, + "expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); + SetLastError(0xdeadbeef); + ret = pWTHelperGetKnownUsages(0, &usages); + todo_wine + ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER, + "expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); + /* A value of 1 for the first parameter seems to imply the value is + * allocated + */ + SetLastError(0xdeadbeef); + usages = NULL; + ret = pWTHelperGetKnownUsages(1, &usages); + todo_wine + ok(ret, "WTHelperGetKnownUsages failed: %d\n", GetLastError()); + todo_wine + ok(usages != NULL, "expected a pointer\n"); + if (ret && usages) + { + PCCRYPT_OID_INFO *ptr; + + /* The returned usages are an array of PCCRYPT_OID_INFOs, terminated with a + * NULL pointer. + */ + for (ptr = usages; *ptr; ptr++) + { + ok((*ptr)->cbSize == sizeof(CRYPT_OID_INFO), + "unexpected size %d\n", (*ptr)->cbSize); + /* Each returned usage is in the CRYPT_ENHKEY_USAGE_OID_GROUP_ID group */ + ok((*ptr)->dwGroupId == CRYPT_ENHKEY_USAGE_OID_GROUP_ID, + "expected group CRYPT_ENHKEY_USAGE_OID_GROUP_ID, got %d\n", + (*ptr)->dwGroupId); + } + } + /* A value of 2 for the second parameter seems to imply the value is freed + */ + SetLastError(0xdeadbeef); + ret = pWTHelperGetKnownUsages(2, &usages); + todo_wine + ok(ret, "WTHelperGetKnownUsages failed: %d\n", GetLastError()); + ok(usages == NULL, "expected pointer to be cleared\n"); + SetLastError(0xdeadbeef); + usages = NULL; + ret = pWTHelperGetKnownUsages(2, &usages); + todo_wine + ok(ret, "WTHelperGetKnownUsages failed: %d\n", GetLastError()); + SetLastError(0xdeadbeef); + ret = pWTHelperGetKnownUsages(2, NULL); + todo_wine + ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER, + "expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); +} + START_TEST(softpub) { + InitFunctionPtrs(); test_provider_funcs(); test_wintrust(); + test_get_known_usages(); }
1
0
0
0
Juan Lang : wintrust: Add stub for WTHelperGetKnownUsages.
by Alexandre Julliard
01 Oct '08
01 Oct '08
Module: wine Branch: master Commit: 6e0f86596f2c9d1110a72788fc431379c47294fa URL:
http://source.winehq.org/git/wine.git/?a=commit;h=6e0f86596f2c9d1110a72788f…
Author: Juan Lang <juan.lang(a)gmail.com> Date: Tue Sep 30 10:10:35 2008 -0700 wintrust: Add stub for WTHelperGetKnownUsages. --- dlls/wintrust/wintrust.spec | 2 +- dlls/wintrust/wintrust_main.c | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletions(-) diff --git a/dlls/wintrust/wintrust.spec b/dlls/wintrust/wintrust.spec index 191e3d1..f385933 100644 --- a/dlls/wintrust/wintrust.spec +++ b/dlls/wintrust/wintrust.spec @@ -79,7 +79,7 @@ @ stub WTHelperGetAgencyInfo @ stdcall WTHelperGetFileHandle(ptr) @ stdcall WTHelperGetFileName(ptr) -@ stub WTHelperGetKnownUsages +@ stdcall WTHelperGetKnownUsages(long ptr) @ stdcall WTHelperGetProvCertFromChain(ptr long) @ stdcall WTHelperGetProvPrivateDataFromChain(ptr ptr) @ stdcall WTHelperGetProvSignerFromChain(ptr long long long) diff --git a/dlls/wintrust/wintrust_main.c b/dlls/wintrust/wintrust_main.c index 2218ca0..2cfc898 100644 --- a/dlls/wintrust/wintrust_main.c +++ b/dlls/wintrust/wintrust_main.c @@ -735,6 +735,15 @@ HANDLE WINAPI WTHelperGetFileHandle(WINTRUST_DATA *data) return INVALID_HANDLE_VALUE; } +/*********************************************************************** + * WTHelperGetKnownUsages(WINTRUST.@) + */ +BOOL WINAPI WTHelperGetKnownUsages(DWORD action, PCCRYPT_OID_INFO **usages) +{ + FIXME("(%d, %p): stub\n", action, usages); + return FALSE; +} + static const WCHAR Software_Publishing[] = { 'S','o','f','t','w','a','r','e','\\', 'M','i','c','r','o','s','o','f','t','\\',
1
0
0
0
Eric Pouech : dbghelp: Add support for the newest line number information in pdb files.
by Alexandre Julliard
01 Oct '08
01 Oct '08
Module: wine Branch: master Commit: 9bc74e3ab64f38a7ba5845949346c060c032b4b9 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=9bc74e3ab64f38a7ba5845949…
Author: Eric Pouech <eric.pouech(a)orange.fr> Date: Mon Sep 29 21:32:38 2008 +0200 dbghelp: Add support for the newest line number information in pdb files. --- dlls/dbghelp/msc.c | 70 +++++++++++++++++++++++++++++++++++++++++++++++++++- 1 files changed, 69 insertions(+), 1 deletions(-) diff --git a/dlls/dbghelp/msc.c b/dlls/dbghelp/msc.c index 8543560..1f5058a 100644 --- a/dlls/dbghelp/msc.c +++ b/dlls/dbghelp/msc.c @@ -4,7 +4,7 @@ * * Copyright (C) 1996, Eric Youngdale. * Copyright (C) 1999-2000, Ulrich Weigand. - * Copyright (C) 2004-2006, Eric Pouech. + * Copyright (C) 2004-2009, Eric Pouech. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -1324,6 +1324,52 @@ static void codeview_snarf_linetab(const struct msc_debug_info* msc_dbg, const B } } +static void codeview_snarf_linetab2(const struct msc_debug_info* msc_dbg, const BYTE* linetab, DWORD size, + const char* strimage, DWORD strsize) +{ + DWORD offset; + unsigned i; + DWORD addr; + const struct codeview_linetab2_block* lbh; + const struct codeview_linetab2_file* fd; + unsigned source; + struct symt_function* func; + + if (*(const DWORD*)linetab != 0x000000f4) return; + offset = *((const DWORD*)linetab + 1); + + for (lbh = (const struct codeview_linetab2_block*)(linetab + 8 + offset); + (const BYTE*)lbh < linetab + size; + lbh = (const struct codeview_linetab2_block*)((const char*)lbh + 8 + lbh->size_of_block)) + { + if (lbh->header != 0x000000f2) + /* FIXME: should also check that whole lbh fits in linetab + size */ + { + TRACE("block end %x\n", lbh->header); + break; + } + addr = codeview_get_address(msc_dbg, lbh->seg, lbh->start); + TRACE("block from %04x:%08x #%x (%x lines)\n", + lbh->seg, lbh->start, lbh->size, lbh->nlines); + fd = (const struct codeview_linetab2_file*)(linetab + 8 + lbh->file_offset); + /* FIXME: should check that string is within strimage + strsize */ + source = source_new(msc_dbg->module, NULL, strimage + fd->offset); + func = (struct symt_function*)symt_find_nearest(msc_dbg->module, addr); + /* FIXME: at least labels support line numbers */ + if (!func || func->symt.tag != SymTagFunction) + { + WARN("--not a func at %04x:%08x %x tag=%d\n", + lbh->seg, lbh->start, addr, func ? func->symt.tag : -1); + continue; + } + for (i = 0; i < lbh->nlines; i++) + { + symt_add_func_line(msc_dbg->module, func, source, + lbh->l[i].lineno ^ 0x80000000, lbh->l[i].offset - lbh->start); + } + } +} + /*======================================================================== * Process CodeView symbol information. */ @@ -2351,6 +2397,8 @@ static BOOL pdb_process_internal(const struct process* pcs, HANDLE hFile, hMap = NULL; char* image = NULL; BYTE* symbols_image = NULL; + char* files_image = NULL; + DWORD files_size = 0; TRACE("Processing PDB file %s\n", pdb_lookup->filename); @@ -2386,6 +2434,21 @@ static BOOL pdb_process_internal(const struct process* pcs, symbols.version, symbols.version); } + files_image = pdb_read_file(image, pdb_lookup, 12); /* FIXME: really fixed ??? */ + if (files_image) + { + if (*(const DWORD*)files_image == 0xeffeeffe) + { + files_size = *(const DWORD*)(files_image + 8); + } + else + { + WARN("wrong header %x expecting 0xeffeeffe\n", *(const DWORD*)files_image); + free(files_image); + files_image = NULL; + } + } + pdb_process_symbol_imports(pcs, msc_dbg, &symbols, symbols_image, image, pdb_lookup, module_index); /* Read global symbol table */ @@ -2419,6 +2482,10 @@ static BOOL pdb_process_internal(const struct process* pcs, modimage + sfile.symbol_size, sfile.lineno_size, pdb_lookup->kind == PDB_JG); + if (files_image) + codeview_snarf_linetab2(msc_dbg, modimage + sfile.symbol_size + sfile.lineno_size, + pdb_get_file_size(pdb_lookup, sfile.file) - sfile.symbol_size - sfile.lineno_size, + files_image + 12, files_size); pdb_free(modimage); } @@ -2443,6 +2510,7 @@ static BOOL pdb_process_internal(const struct process* pcs, leave: /* Cleanup */ pdb_free(symbols_image); + pdb_free(files_image); pdb_free_lookup(pdb_lookup); if (image) UnmapViewOfFile(image);
1
0
0
0
Eric Pouech : dbghelp: Rewrote the linetab access so that we don' t need to allocate intermediate information.
by Alexandre Julliard
01 Oct '08
01 Oct '08
Module: wine Branch: master Commit: 3dc37cbf9412ebc310487afddbc6dd8a26324043 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=3dc37cbf9412ebc310487afdd…
Author: Eric Pouech <eric.pouech(a)orange.fr> Date: Mon Sep 29 21:32:29 2008 +0200 dbghelp: Rewrote the linetab access so that we don't need to allocate intermediate information. --- dlls/dbghelp/msc.c | 223 ++++++++++++++---------------------------------- include/wine/mscvpdb.h | 22 +---- 2 files changed, 71 insertions(+), 174 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=3dc37cbf9412ebc310487…
1
0
0
0
Eric Pouech : winedump: First stab at dumping the "new" line information out of pdb files.
by Alexandre Julliard
01 Oct '08
01 Oct '08
Module: wine Branch: master Commit: ac42ebb5dc9fe121657e0a8254e7208de73a7ae4 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=ac42ebb5dc9fe121657e0a825…
Author: Eric Pouech <eric.pouech(a)orange.fr> Date: Mon Sep 29 21:32:21 2008 +0200 winedump: First stab at dumping the "new" line information out of pdb files. --- include/wine/mscvpdb.h | 31 +++++++++++++++++++++++++++++++ tools/winedump/msc.c | 36 ++++++++++++++++++++++++++++++++++++ tools/winedump/pdb.c | 25 ++++++++++++++++++++++++- tools/winedump/winedump.h | 1 + 4 files changed, 92 insertions(+), 1 deletions(-) diff --git a/include/wine/mscvpdb.h b/include/wine/mscvpdb.h index 2136ab8..caf6db9 100644 --- a/include/wine/mscvpdb.h +++ b/include/wine/mscvpdb.h @@ -1654,6 +1654,37 @@ struct codeview_linetab const unsigned int* offtab; }; +/* there's a new line tab structure from MS Studio 2005 and after + * it's made of: + * DWORD 000000f4 + * DWORD lineblk_offset (counting bytes after this field) + * an array of codeview_linetab2_file structures + * an array (starting at <lineblk_offset>) of codeview_linetab2_block structures + */ + +struct codeview_linetab2_file +{ + DWORD offset; /* offset in string table for filename */ + WORD unk; /* always 0x0110... type of following information ??? */ + BYTE md5[16]; /* MD5 signature of file (signature on file's content or name ???) */ + WORD pad0; /* always 0 */ +}; + +struct codeview_linetab2_block +{ + DWORD header; /* 0x000000f2 */ + DWORD size_of_block; /* next block is at # bytes after this field */ + DWORD start; /* start address of function with line numbers */ + DWORD seg; /* segment of function with line numbers */ + DWORD size; /* size of function with line numbers */ + DWORD file_offset; /* offset for accessing corresponding codeview_linetab2_file */ + DWORD nlines; /* number of lines in this block */ + DWORD size_lines; /* number of bytes following for line number information */ + struct { + DWORD offset; /* offset (from <seg>:<start>) for line number */ + DWORD lineno; /* the line number (OR:ed with 0x80000000 why ???) */ + } l[1]; /* actually array of <nlines> */ +}; /* ======================================== * * PDB file information diff --git a/tools/winedump/msc.c b/tools/winedump/msc.c index 0351cac..1d9ff77 100644 --- a/tools/winedump/msc.c +++ b/tools/winedump/msc.c @@ -1365,3 +1365,39 @@ void codeview_dump_linetab(const char* linetab, DWORD size, BOOL pascal_str, con } } } + +void codeview_dump_linetab2(const char* linetab, DWORD size, const char* strimage, DWORD strsize, const char* pfx) +{ + DWORD offset; + unsigned i; + const struct codeview_linetab2_block* lbh; + const struct codeview_linetab2_file* fd; + + if (*(const DWORD*)linetab != 0x000000f4) return; + offset = *((const DWORD*)linetab + 1); + lbh = (const struct codeview_linetab2_block*)(linetab + 8 + offset); + while ((const char*)lbh < linetab + size) + { + if (lbh->header != 0x000000f2) + /* FIXME: should also check that whole lbh fits in linetab + size */ + { + /* printf("%sblock end %x\n", pfx, lbh->header); */ + break; + } + printf("%sblock from %04x:%08x #%x (%x lines)\n", + pfx, lbh->seg, lbh->start, lbh->size, lbh->nlines); + fd = (const struct codeview_linetab2_file*)(linetab + 8 + lbh->file_offset); + printf("%s md5=%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x\n", + pfx, fd->md5[ 0], fd->md5[ 1], fd->md5[ 2], fd->md5[ 3], + fd->md5[ 4], fd->md5[ 5], fd->md5[ 6], fd->md5[ 7], + fd->md5[ 8], fd->md5[ 9], fd->md5[10], fd->md5[11], + fd->md5[12], fd->md5[13], fd->md5[14], fd->md5[15]); + /* FIXME: should check that string is within strimage + strsize */ + printf("%s file=%s\n", pfx, strimage ? strimage + fd->offset : "--none--"); + for (i = 0; i < lbh->nlines; i++) + { + printf("%s offset=%08x line=%d\n", pfx, lbh->l[i].offset, lbh->l[i].lineno ^ 0x80000000); + } + lbh = (const struct codeview_linetab2_block*)((const char*)lbh + 8 + lbh->size_of_block); + } +} diff --git a/tools/winedump/pdb.c b/tools/winedump/pdb.c index 72a63fd..3641ff6 100644 --- a/tools/winedump/pdb.c +++ b/tools/winedump/pdb.c @@ -160,6 +160,8 @@ static void pdb_dump_symbols(struct pdb_reader* reader) PDB_SYMBOLS* symbols; unsigned char* modimage; const char* file; + char* filesimage; + DWORD filessize = 0; symbols = reader->read_file(reader, 3); @@ -210,6 +212,21 @@ static void pdb_dump_symbols(struct pdb_reader* reader) dump_data(src, symbols->offset_size, " "); } + filesimage = reader->read_file(reader, 12); /* FIXME: really fixed ??? */ + if (filesimage) + { + if (*(const DWORD*)filesimage == 0xeffeeffe) + { + filessize = *(const DWORD*)(filesimage + 8); + } + else + { + printf("wrong header %x expecting 0xeffeeffe\n", *(const DWORD*)filesimage); + free(filesimage); + filesimage = NULL; + } + } + if (symbols->srcmodule_size) { const PDB_SYMBOL_SOURCE*src; @@ -408,7 +425,12 @@ static void pdb_dump_symbols(struct pdb_reader* reader) /* line number info */ if (lineno_size) codeview_dump_linetab((const char*)modimage + symbol_size, lineno_size, TRUE, " "); - + /* anyway, lineno_size doesn't see to really be the size of the line number information, and + * it's not clear yet when to call for linetab2... + */ + codeview_dump_linetab2((const char*)modimage + symbol_size + lineno_size, + total_size - (symbol_size + lineno_size), + filesimage + 12, filessize, " "); /* what's that part ??? */ if (0) dump_data(modimage + symbol_size + lineno_size, total_size - (symbol_size + lineno_size), " "); @@ -419,6 +441,7 @@ static void pdb_dump_symbols(struct pdb_reader* reader) file = (char*)((DWORD_PTR)(file_name + strlen(file_name) + 1 + 3) & ~3); } free(symbols); + free(filesimage); } static void pdb_dump_types(struct pdb_reader* reader) diff --git a/tools/winedump/winedump.h b/tools/winedump/winedump.h index d2bf9d3..f71103e 100644 --- a/tools/winedump/winedump.h +++ b/tools/winedump/winedump.h @@ -256,6 +256,7 @@ int codeview_dump_symbols(const void* root, unsigned long size); int codeview_dump_types_from_offsets(const void* table, const DWORD* offsets, unsigned num_types); int codeview_dump_types_from_block(const void* table, unsigned long len); void codeview_dump_linetab(const char* linetab, DWORD size, BOOL pascal_str, const char* pfx); +void codeview_dump_linetab2(const char* linetab, DWORD size, const char* strimage, DWORD strsize, const char* pfx); void dump_stabs(const void* pv_stabs, unsigned szstabs, const char* stabstr, unsigned szstr); void dump_codeview(unsigned long ptr, unsigned long len);
1
0
0
0
Eric Pouech : winedump: Now dumping codeview source line information.
by Alexandre Julliard
01 Oct '08
01 Oct '08
Module: wine Branch: master Commit: f8380ba37a09f2cb1c1df5c2d76725108037ea9e URL:
http://source.winehq.org/git/wine.git/?a=commit;h=f8380ba37a09f2cb1c1df5c2d…
Author: Eric Pouech <eric.pouech(a)orange.fr> Date: Mon Sep 29 21:32:09 2008 +0200 winedump: Now dumping codeview source line information. --- tools/winedump/msc.c | 54 +++++++++++++++++++++++++++++++++++++++++++++ tools/winedump/pdb.c | 4 +++ tools/winedump/winedump.h | 1 + 3 files changed, 59 insertions(+), 0 deletions(-) diff --git a/tools/winedump/msc.c b/tools/winedump/msc.c index c49406e..0351cac 100644 --- a/tools/winedump/msc.c +++ b/tools/winedump/msc.c @@ -1311,3 +1311,57 @@ int codeview_dump_symbols(const void* root, unsigned long size) } return 0; } + +void codeview_dump_linetab(const char* linetab, DWORD size, BOOL pascal_str, const char* pfx) +{ + const char* ptr = linetab; + int nfile, nseg, nline; + int i, j, k; + const unsigned int* filetab; + const unsigned int* lt_ptr; + const struct startend* start; + + nfile = *(const short*)linetab; + filetab = (const unsigned int*)(linetab + 2 * sizeof(short)); + printf("%s%d files with %d ???\n", pfx, nfile, *(const short*)(linetab + sizeof(short))); + + for (i = 0; i < nfile; i++) + { + ptr = linetab + filetab[i]; + nseg = *(const short*)ptr; + ptr += 2 * sizeof(short); + lt_ptr = (const unsigned int*)ptr; + start = (const struct startend*)(lt_ptr + nseg); + + /* + * Now snarf the filename for all of the segments for this file. + */ + if (pascal_str) + { + char filename[MAX_PATH]; + const struct p_string* p_fn; + + p_fn = (const struct p_string*)(start + nseg); + memset(filename, 0, sizeof(filename)); + memcpy(filename, p_fn->name, p_fn->namelen); + printf("%slines for file #%d/%d %s %d\n", pfx, i, nfile, filename, nseg); + } + else + printf("%slines for file #%d/%d %s %d\n", pfx, i, nfile, (const char*)(start + nseg), nseg); + + for (j = 0; j < nseg; j++) + { + ptr = linetab + *lt_ptr++; + nline = *(const short*)(ptr + 2); + printf("%s %04x:%08x-%08x #%d\n", + pfx, *(const short*)(ptr + 0), start[j].start, start[j].end, nline); + ptr += 4; + for (k = 0; k < nline; k++) + { + printf("%s %x %d\n", + pfx, ((const unsigned int*)ptr)[k], + ((const unsigned short*)((const unsigned int*)ptr + nline))[k]); + } + } + } +} diff --git a/tools/winedump/pdb.c b/tools/winedump/pdb.c index 1d9fce0..72a63fd 100644 --- a/tools/winedump/pdb.c +++ b/tools/winedump/pdb.c @@ -405,6 +405,10 @@ static void pdb_dump_symbols(struct pdb_reader* reader) if (symbol_size) codeview_dump_symbols((const char*)modimage + sizeof(DWORD), symbol_size); + /* line number info */ + if (lineno_size) + codeview_dump_linetab((const char*)modimage + symbol_size, lineno_size, TRUE, " "); + /* what's that part ??? */ if (0) dump_data(modimage + symbol_size + lineno_size, total_size - (symbol_size + lineno_size), " "); diff --git a/tools/winedump/winedump.h b/tools/winedump/winedump.h index f3caf94..d2bf9d3 100644 --- a/tools/winedump/winedump.h +++ b/tools/winedump/winedump.h @@ -255,6 +255,7 @@ void pdb_dump(void); int codeview_dump_symbols(const void* root, unsigned long size); int codeview_dump_types_from_offsets(const void* table, const DWORD* offsets, unsigned num_types); int codeview_dump_types_from_block(const void* table, unsigned long len); +void codeview_dump_linetab(const char* linetab, DWORD size, BOOL pascal_str, const char* pfx); void dump_stabs(const void* pv_stabs, unsigned szstabs, const char* stabstr, unsigned szstr); void dump_codeview(unsigned long ptr, unsigned long len);
1
0
0
0
Eric Pouech : dbghelp: Added support for real80 (aka long double) in inner codeview types.
by Alexandre Julliard
01 Oct '08
01 Oct '08
Module: wine Branch: master Commit: 864a60d5ba318416c2d69df603bf275189c07452 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=864a60d5ba318416c2d69df60…
Author: Eric Pouech <eric.pouech(a)orange.fr> Date: Mon Sep 29 21:32:00 2008 +0200 dbghelp: Added support for real80 (aka long double) in inner codeview types. --- dlls/dbghelp/msc.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/dlls/dbghelp/msc.c b/dlls/dbghelp/msc.c index c2cd107..956e8ba 100644 --- a/dlls/dbghelp/msc.c +++ b/dlls/dbghelp/msc.c @@ -133,6 +133,7 @@ static void codeview_init_basic_types(struct module* module) cv_basic_types[T_BOOL64] = &symt_new_basic(module, btBool, "BOOL64", 8)->symt; cv_basic_types[T_REAL32] = &symt_new_basic(module, btFloat, "float", 4)->symt; cv_basic_types[T_REAL64] = &symt_new_basic(module, btFloat, "double", 8)->symt; + cv_basic_types[T_REAL80] = &symt_new_basic(module, btFloat, "long double", 10)->symt; cv_basic_types[T_RCHAR] = &symt_new_basic(module, btInt, "signed char", 1)->symt; cv_basic_types[T_WCHAR] = &symt_new_basic(module, btWChar, "wchar_t", 2)->symt; cv_basic_types[T_INT2] = &symt_new_basic(module, btInt, "INT2", 2)->symt; @@ -158,6 +159,7 @@ static void codeview_init_basic_types(struct module* module) cv_basic_types[T_32PBOOL64] = &symt_new_pointer(module, cv_basic_types[T_BOOL64])->symt; cv_basic_types[T_32PREAL32] = &symt_new_pointer(module, cv_basic_types[T_REAL32])->symt; cv_basic_types[T_32PREAL64] = &symt_new_pointer(module, cv_basic_types[T_REAL64])->symt; + cv_basic_types[T_32PREAL80] = &symt_new_pointer(module, cv_basic_types[T_REAL80])->symt; cv_basic_types[T_32PRCHAR] = &symt_new_pointer(module, cv_basic_types[T_RCHAR])->symt; cv_basic_types[T_32PWCHAR] = &symt_new_pointer(module, cv_basic_types[T_WCHAR])->symt; cv_basic_types[T_32PINT2] = &symt_new_pointer(module, cv_basic_types[T_INT2])->symt;
1
0
0
0
← Newer
1
...
116
117
118
119
120
121
122
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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
Results per page:
10
25
50
100
200