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
January 2007
----- 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
4 participants
893 discussions
Start a n
N
ew thread
Detlef Riekenberg : sfc: Forward SfcIsFileProtected to sfc_os.dll.
by Alexandre Julliard
17 Jan '07
17 Jan '07
Module: wine Branch: master Commit: 544153689a616f591b4425f0056432e34345d833 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=544153689a616f591b4425f00…
Author: Detlef Riekenberg <wine.dev(a)web.de> Date: Tue Jan 16 20:35:33 2007 +0100 sfc: Forward SfcIsFileProtected to sfc_os.dll. --- dlls/sfc/sfc.spec | 2 +- dlls/sfc/sfc_main.c | 46 ++++++++++++++++------------------------------ 2 files changed, 17 insertions(+), 31 deletions(-) diff --git a/dlls/sfc/sfc.spec b/dlls/sfc/sfc.spec index bd71d4d..20d0da5 100644 --- a/dlls/sfc/sfc.spec +++ b/dlls/sfc/sfc.spec @@ -1,2 +1,2 @@ @ stub SfcGetNextProtectedFile -@ stdcall SfcIsFileProtected(ptr wstr) +@ stdcall SfcIsFileProtected(ptr wstr) sfc_os.SfcIsFileProtected diff --git a/dlls/sfc/sfc_main.c b/dlls/sfc/sfc_main.c index 6563365..58957c8 100644 --- a/dlls/sfc/sfc_main.c +++ b/dlls/sfc/sfc_main.c @@ -20,49 +20,35 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ +/* + * Moved to sfc_os.dll since XP + * + */ + #include <stdarg.h> #include "windef.h" #include "winbase.h" #include "winerror.h" -#include "sfc.h" #include "wine/debug.h" WINE_DEFAULT_DEBUG_CHANNEL(sfc); /****************************************************************** - * SfcIsFileProtected [SFC.@] - * - * Check, if the given File is protected by the System - * - * PARAMS - * RpcHandle [I] This must be NULL - * ProtFileName [I] Filename with Path to check - * - * RETURNS - * Failure: FALSE with GetLastError() != ERROR_FILE_NOT_FOUND - * Success: TRUE, when the File is Protected - * FALSE with GetLastError() == ERROR_FILE_NOT_FOUND, - * when the File is not Protected - * - * - * BUGS - * We return always the Result for: "File is not Protected" - * + * DllMain */ -BOOL WINAPI SfcIsFileProtected(HANDLE RpcHandle, LPCWSTR ProtFileName) +BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) { - static BOOL reported = FALSE; + TRACE("(%p, %d, %p)\n",hinstDLL, fdwReason, lpvReserved); - if (reported) { - TRACE("(%p, %s) stub\n", RpcHandle, debugstr_w(ProtFileName)); - } - else + switch(fdwReason) { - FIXME("(%p, %s) stub\n", RpcHandle, debugstr_w(ProtFileName)); - reported = TRUE; - } + case DLL_WINE_PREATTACH: + return FALSE; /* prefer native version */ - SetLastError(ERROR_FILE_NOT_FOUND); - return FALSE; + case DLL_PROCESS_ATTACH: + DisableThreadLibraryCalls( hinstDLL ); + break; + } + return TRUE; }
1
0
0
0
Detlef Riekenberg : sfc_os: Add stub for sfc_os.dll.
by Alexandre Julliard
17 Jan '07
17 Jan '07
Module: wine Branch: master Commit: 161897e187f5f301290b04156d3da1ea89680c71 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=161897e187f5f301290b04156…
Author: Detlef Riekenberg <wine.dev(a)web.de> Date: Tue Jan 16 20:35:06 2007 +0100 sfc_os: Add stub for sfc_os.dll. --- Makefile.in | 2 + configure | 3 +- configure.ac | 1 + dlls/Makefile.in | 1 + dlls/sfc_os/Makefile.in | 12 +++++++ dlls/sfc_os/sfc_os.c | 85 +++++++++++++++++++++++++++++++++++++++++++++++ dlls/sfc_os/sfc_os.spec | 2 + 7 files changed, 105 insertions(+), 1 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=161897e187f5f301290b0…
1
0
0
0
Joel Parker : Remove redundant semicolons for ANSI compatibility.
by Alexandre Julliard
17 Jan '07
17 Jan '07
Module: wine Branch: master Commit: 2319999a05b549ab605f68d528c70ddeeb8ae91e URL:
http://source.winehq.org/git/wine.git/?a=commit;h=2319999a05b549ab605f68d52…
Author: Joel Parker <jjk3(a)msstate.edu> Date: Fri Jan 12 17:38:07 2007 -0600 Remove redundant semicolons for ANSI compatibility. --- dlls/kernel32/ne_module.c | 8 ++-- dlls/kernel32/relay16.c | 2 +- dlls/kernel32/selector.c | 44 ++++++++++++++-------------- dlls/kernel32/thunk.c | 34 +++++++++++----------- dlls/msvcrt/cpp.c | 66 ++++++++++++++++++++++---------------------- dlls/msvcrt/cppexcept.c | 2 +- dlls/msvcrt/except.c | 8 ++-- dlls/msvcrt/misc.c | 2 +- dlls/ntdll/loader.c | 2 +- dlls/ntdll/relay.c | 2 +- dlls/ntdll/resource.c | 2 +- dlls/ntdll/rtl.c | 8 ++-- dlls/ntdll/signal_i386.c | 10 +++--- dlls/ntdll/signal_x86_64.c | 4 +- dlls/ntdll/thread.c | 2 +- dlls/riched20/txtsrv.c | 36 ++++++++++++------------ dlls/rpcrt4/ndr_stubless.c | 2 +- dlls/user32/winproc.c | 2 +- libs/port/interlocked.c | 30 ++++++++++---------- libs/wine/port.c | 12 ++++---- 20 files changed, 139 insertions(+), 139 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=2319999a05b549ab605f6…
1
0
0
0
Anatoly Lyutin : wineconsole: Add support for non-latin symbols with curses .
by Alexandre Julliard
17 Jan '07
17 Jan '07
Module: wine Branch: master Commit: 6ee85a61f29fcf8cab92a71c1fb8f2fb2be13c62 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=6ee85a61f29fcf8cab92a71c1…
Author: Anatoly Lyutin <vostok(a)etersoft.ru> Date: Fri Jan 12 18:03:34 2007 +0300 wineconsole: Add support for non-latin symbols with curses. --- programs/wineconsole/curses.c | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/programs/wineconsole/curses.c b/programs/wineconsole/curses.c index 14637b1..30ae89a 100644 --- a/programs/wineconsole/curses.c +++ b/programs/wineconsole/curses.c @@ -365,7 +365,7 @@ static void WCCURSES_Refresh(const struc { WideCharToMultiByte(CP_UNIXCP, 0, &cell[x].Char.UnicodeChar, 1, &ch, 1, NULL, NULL); - attr = ((BYTE)ch < 32 || (BYTE)ch > 127) ? 32 : (BYTE)ch; + attr = ((BYTE)ch < 32) ? 32 : (BYTE)ch; if (cell[x].Attributes & FOREGROUND_RED) attr |= COLOR_PAIR(COLOR_RED); if (cell[x].Attributes & FOREGROUND_BLUE) attr |= COLOR_PAIR(COLOR_BLUE); @@ -487,6 +487,7 @@ static unsigned WCCURSES_FillSimpleChar( { unsigned vk; unsigned inchar; + char ch; unsigned numEvent = 0; DWORD cks = 0; @@ -538,8 +539,9 @@ static unsigned WCCURSES_FillSimpleChar( ir[numEvent].Event.KeyEvent.dwControlKeyState |= LEFT_ALT_PRESSED; ir[numEvent].Event.KeyEvent.wVirtualKeyCode = vk; ir[numEvent].Event.KeyEvent.wVirtualScanCode = mapvkey_0[vk & 0x00ff]; /* VirtualKeyCodes to ScanCode */ - ir[numEvent].Event.KeyEvent.uChar.UnicodeChar = (unsigned char)inchar; + ch = inchar; + MultiByteToWideChar(CP_UNIXCP, 0,&ch,1,&ir[numEvent].Event.KeyEvent.uChar.UnicodeChar, 1); ir[numEvent + 1] = ir[numEvent]; ir[numEvent + 1].Event.KeyEvent.bKeyDown = 0;
1
0
0
0
Christoph Frick : dinput: No longer check for value exceeding have(min|max) in map_axis.
by Alexandre Julliard
17 Jan '07
17 Jan '07
Module: wine Branch: master Commit: ffdea40f2cb5505c6f0ce7e976c47b07adfb75d6 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=ffdea40f2cb5505c6f0ce7e97…
Author: Christoph Frick <frick(a)sc-networks.de> Date: Mon Jan 15 12:09:06 2007 +0100 dinput: No longer check for value exceeding have(min|max) in map_axis. --- dlls/dinput/joystick_linuxinput.c | 3 --- 1 files changed, 0 insertions(+), 3 deletions(-) diff --git a/dlls/dinput/joystick_linuxinput.c b/dlls/dinput/joystick_linuxinput.c index db51236..1f98d6d 100644 --- a/dlls/dinput/joystick_linuxinput.c +++ b/dlls/dinput/joystick_linuxinput.c @@ -587,9 +587,6 @@ map_axis(JoystickImpl* This, int axis, i int wmax = This->props[axis].wantmax; int ret; - if (val > hmax) This->props[axis].havemax = hmax = val; - if (val < hmin) This->props[axis].havemin = hmin = val; - /* map the value from the hmin-hmax range into the wmin-wmax range */ ret = MulDiv( val - hmin, wmax - wmin, hmax - hmin ) + wmin;
1
0
0
0
Christoph Frick : dinput: Add a config for the axes.
by Alexandre Julliard
17 Jan '07
17 Jan '07
Module: wine Branch: master Commit: f0b45141c296824d225fe1b10f0a8c6452c50565 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=f0b45141c296824d225fe1b10…
Author: Christoph Frick <frick(a)sc-networks.de> Date: Tue Jan 16 10:45:34 2007 +0100 dinput: Add a config for the axes. --- dlls/dinput/joystick_linuxinput.c | 122 ++++++++++++++----------------------- 1 files changed, 45 insertions(+), 77 deletions(-) diff --git a/dlls/dinput/joystick_linuxinput.c b/dlls/dinput/joystick_linuxinput.c index 0908424..db51236 100644 --- a/dlls/dinput/joystick_linuxinput.c +++ b/dlls/dinput/joystick_linuxinput.c @@ -69,9 +69,9 @@ WINE_DEFAULT_DEBUG_CHANNEL(dinput); #define EVDEVPREFIX "/dev/input/event" /* Wine joystick driver object instances */ -#define WINE_JOYSTICK_AXIS_BASE 0 -#define WINE_JOYSTICK_POV_BASE 6 -#define WINE_JOYSTICK_BUTTON_BASE 8 +#define WINE_JOYSTICK_MAX_AXES 8 +#define WINE_JOYSTICK_MAX_POVS 4 +#define WINE_JOYSTICK_MAX_BUTTONS 128 typedef struct EffectListItem EffectListItem; struct EffectListItem @@ -140,6 +140,8 @@ struct JoystickImpl struct ObjProps props[ABS_MAX]; + int axes[ABS_MAX]; + /* LUT for KEY_ to offset in rgbButtons */ BYTE buttons[KEY_MAX]; @@ -352,7 +354,7 @@ static JoystickImpl *alloc_device(REFGUI JoystickImpl* newDevice; LPDIDATAFORMAT df = NULL; int i, idx = 0; - int axis = 0, pov = 0, btn = 0; + int axis = 0, btn = 0; newDevice = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(JoystickImpl)); if (!newDevice) return NULL; @@ -367,19 +369,6 @@ static JoystickImpl *alloc_device(REFGUI #ifdef HAVE_STRUCT_FF_EFFECT_DIRECTION newDevice->ff_state = FF_STATUS_STOPPED; #endif - for (i=0;i<ABS_MAX;i++) { - /* apps expect the range to be the same they would get from the - * GetProperty/range method */ - newDevice->props[i].wantmin = newDevice->props[i].havemin = newDevice->joydev->axes[i][AXIS_ABSMIN]; - newDevice->props[i].wantmax = newDevice->props[i].havemax = newDevice->joydev->axes[i][AXIS_ABSMAX]; - /* TODO: - * direct input defines a default for the deadzone somewhere; but as long - * as in map_axis the code for the dead zone is commented out its no - * problem - */ - newDevice->props[i].deadzone = 0; - } - fake_current_js_state(newDevice); /* Create copy of default data format */ if (!(df = HeapAlloc(GetProcessHeap(), 0, c_dfDIJoystick2.dwSize))) goto failed; @@ -387,33 +376,47 @@ static JoystickImpl *alloc_device(REFGUI if (!(df->rgodf = HeapAlloc(GetProcessHeap(), 0, df->dwNumObjs * df->dwObjSize))) goto failed; /* Supported Axis & POVs should map 1-to-1 */ - for (i = 0; i < 8; i++) + for (i = 0; i < WINE_JOYSTICK_MAX_AXES; i++) { - if (!test_bit(newDevice->joydev->absbits, i)) continue; + if (!test_bit(newDevice->joydev->absbits, i)) { + newDevice->axes[i] = -1; + continue; + } - memcpy(&df->rgodf[idx], &c_dfDIJoystick2.rgodf[axis + WINE_JOYSTICK_AXIS_BASE], df->dwObjSize); + memcpy(&df->rgodf[idx], &c_dfDIJoystick2.rgodf[i], df->dwObjSize); + newDevice->axes[i] = idx; + newDevice->props[idx].wantmin = newDevice->props[idx].havemin = newDevice->joydev->axes[i][AXIS_ABSMIN]; + newDevice->props[idx].wantmax = newDevice->props[idx].havemax = newDevice->joydev->axes[i][AXIS_ABSMAX]; + newDevice->props[idx].deadzone = 0; df->rgodf[idx++].dwType = DIDFT_MAKEINSTANCE(axis++) | DIDFT_ABSAXIS; } - for (i = 0; i < 4; i++) + + for (i = 0; i < WINE_JOYSTICK_MAX_POVS; i++) { if (!test_bit(newDevice->joydev->absbits, ABS_HAT0X + i * 2) || - !test_bit(newDevice->joydev->absbits, ABS_HAT0Y + i * 2)) + !test_bit(newDevice->joydev->absbits, ABS_HAT0Y + i * 2)) { + newDevice->axes[ABS_HAT0X + i * 2] = newDevice->axes[ABS_HAT0Y + i * 2] = -1; continue; + } - memcpy(&df->rgodf[idx], &c_dfDIJoystick2.rgodf[pov + WINE_JOYSTICK_POV_BASE], df->dwObjSize); - df->rgodf[idx++].dwType = DIDFT_MAKEINSTANCE(pov++) | DIDFT_POV; + memcpy(&df->rgodf[idx], &c_dfDIJoystick2.rgodf[i + WINE_JOYSTICK_MAX_AXES], df->dwObjSize); + newDevice->axes[ABS_HAT0X + i * 2] = newDevice->axes[ABS_HAT0Y + i * 2] = i; + df->rgodf[idx++].dwType = DIDFT_MAKEINSTANCE(i) | DIDFT_POV; } + /* Buttons can be anywhere, so check all */ - for (i = 0; i < KEY_MAX && btn < 128; i++) + for (i = 0; i < KEY_MAX && btn < WINE_JOYSTICK_MAX_BUTTONS; i++) { if (!test_bit(newDevice->joydev->keybits, i)) continue; - memcpy(&df->rgodf[idx], &c_dfDIJoystick2.rgodf[btn + WINE_JOYSTICK_BUTTON_BASE], df->dwObjSize); + memcpy(&df->rgodf[idx], &c_dfDIJoystick2.rgodf[btn + WINE_JOYSTICK_MAX_AXES + WINE_JOYSTICK_MAX_POVS], df->dwObjSize); newDevice->buttons[i] = 0x80 | btn; df->rgodf[idx++].dwType = DIDFT_MAKEINSTANCE(btn++) | DIDFT_PSHBUTTON; } df->dwNumObjs = idx; + fake_current_js_state(newDevice); + newDevice->base.data_format.wine_df = df; IDirectInput_AddRef((LPDIRECTINPUTDEVICE8A)newDevice->dinput); return newDevice; @@ -610,14 +613,14 @@ static void fake_current_js_state(Joysti { int i; /* center the axes */ - ji->js.lX = test_bit(ji->joydev->absbits, ABS_X) ? map_axis(ji, ABS_X, ji->joydev->axes[ABS_X ][AXIS_ABS]) : 0; - ji->js.lY = test_bit(ji->joydev->absbits, ABS_Y) ? map_axis(ji, ABS_Y, ji->joydev->axes[ABS_Y ][AXIS_ABS]) : 0; - ji->js.lZ = test_bit(ji->joydev->absbits, ABS_Z) ? map_axis(ji, ABS_Z, ji->joydev->axes[ABS_Z ][AXIS_ABS]) : 0; - ji->js.lRx = test_bit(ji->joydev->absbits, ABS_RX) ? map_axis(ji, ABS_RX, ji->joydev->axes[ABS_RX ][AXIS_ABS]) : 0; - ji->js.lRy = test_bit(ji->joydev->absbits, ABS_RY) ? map_axis(ji, ABS_RY, ji->joydev->axes[ABS_RY ][AXIS_ABS]) : 0; - ji->js.lRz = test_bit(ji->joydev->absbits, ABS_RZ) ? map_axis(ji, ABS_RZ, ji->joydev->axes[ABS_RZ ][AXIS_ABS]) : 0; - ji->js.rglSlider[0] = test_bit(ji->joydev->absbits, ABS_THROTTLE) ? map_axis(ji, ABS_THROTTLE, ji->joydev->axes[ABS_THROTTLE][AXIS_ABS]) : 0; - ji->js.rglSlider[1] = test_bit(ji->joydev->absbits, ABS_RUDDER) ? map_axis(ji, ABS_RUDDER, ji->joydev->axes[ABS_RUDDER ][AXIS_ABS]) : 0; + ji->js.lX = ji->axes[ABS_X]!=-1 ? map_axis(ji, ji->axes[ABS_X], ji->joydev->axes[ABS_X ][AXIS_ABS]) : 0; + ji->js.lY = ji->axes[ABS_Y]!=-1 ? map_axis(ji, ji->axes[ABS_Y], ji->joydev->axes[ABS_Y ][AXIS_ABS]) : 0; + ji->js.lZ = ji->axes[ABS_Z]!=-1 ? map_axis(ji, ji->axes[ABS_Z], ji->joydev->axes[ABS_Z ][AXIS_ABS]) : 0; + ji->js.lRx = ji->axes[ABS_RX]!=-1 ? map_axis(ji, ji->axes[ABS_RX], ji->joydev->axes[ABS_RX ][AXIS_ABS]) : 0; + ji->js.lRy = ji->axes[ABS_RY]!=-1 ? map_axis(ji, ji->axes[ABS_RY], ji->joydev->axes[ABS_RY ][AXIS_ABS]) : 0; + ji->js.lRz = ji->axes[ABS_RZ]!=-1 ? map_axis(ji, ji->axes[ABS_RZ], ji->joydev->axes[ABS_RZ ][AXIS_ABS]) : 0; + ji->js.rglSlider[0] = ji->axes[ABS_THROTTLE]!=-1 ? map_axis(ji, ji->axes[ABS_THROTTLE], ji->joydev->axes[ABS_THROTTLE][AXIS_ABS]) : 0; + ji->js.rglSlider[1] = ji->axes[ABS_RUDDER]!=-1 ? map_axis(ji, ji->axes[ABS_RUDDER], ji->joydev->axes[ABS_RUDDER ][AXIS_ABS]) : 0; /* POV center is -1 */ for (i=0; i<4; i++) { ji->js.rgdwPOV[i] = -1; @@ -649,45 +652,6 @@ static DWORD map_pov(int event_value, in return ret; } -/* defines how the linux input system offset mappings into c_dfDIJoystick2 */ -static int lxinput_to_user_index(JoystickImpl *This, int ie_type, int ie_code ) -{ - int offset = -1; - switch (ie_type) { - case EV_ABS: - switch (ie_code) { - case ABS_X: offset = 0; break; - case ABS_Y: offset = 1; break; - case ABS_Z: offset = 2; break; - case ABS_RX: offset = 3; break; - case ABS_RY: offset = 4; break; - case ABS_RZ: offset = 5; break; - case ABS_THROTTLE: offset = 6; break; - case ABS_RUDDER: offset = 7; break; - case ABS_HAT0X: case ABS_HAT0Y: offset = 8; break; - case ABS_HAT1X: case ABS_HAT1Y: offset = 9; break; - case ABS_HAT2X: case ABS_HAT2Y: offset = 10; break; - case ABS_HAT3X: case ABS_HAT3Y: offset = 11; break; - /* XXX when adding new axes here also fix the offset for the buttons bellow */ - default: - FIXME("Unhandled EV_ABS(0x%02X)\n", ie_code); - return -1; - } - break; - case EV_KEY: - if (ie_code >= 128) { - WARN("DX8 does not support more than 128 buttons\n"); - return -1; - } - offset = 12 + ie_code; /* XXX */ - break; - default: - FIXME("Unhandled type(0x%02X)\n", ie_type); - return -1; - } - return offset; -} - /* convert wine format offset to user format object index */ static void joy_polldev(JoystickImpl *This) { @@ -728,10 +692,13 @@ static void joy_polldev(JoystickImpl *Th break; } case EV_ABS: - if ((inst_id = lxinput_to_user_index(This, ie.type, ie.code)) == -1) - return; - inst_id = DIDFT_MAKEINSTANCE(inst_id) | (inst_id < ABS_HAT0X ? DIDFT_AXIS : DIDFT_POV); - value = map_axis(This, ie.code, ie.value); + { + int axis = This->axes[ie.code]; + if (axis==-1) { + break; + } + inst_id = DIDFT_MAKEINSTANCE(axis) | (ie.code < ABS_HAT0X ? DIDFT_ABSAXIS : DIDFT_POV); + value = map_axis(This, axis, ie.value); switch (ie.code) { case ABS_X: This->js.lX = value; break; @@ -763,6 +730,7 @@ static void joy_polldev(JoystickImpl *Th break; } break; + } #ifdef HAVE_STRUCT_FF_EFFECT_DIRECTION case EV_FF_STATUS: This->ff_state = ie.value;
1
0
0
0
Christoph Frick : dinput: Move the config for the buttons from the JoyDev into the JoystickImpl.
by Alexandre Julliard
17 Jan '07
17 Jan '07
Module: wine Branch: master Commit: 0855a6be4c96b0f91c3687a82cb1bd30688520c4 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=0855a6be4c96b0f91c3687a82…
Author: Christoph Frick <frick(a)sc-networks.de> Date: Mon Jan 15 12:08:00 2007 +0100 dinput: Move the config for the buttons from the JoyDev into the JoystickImpl. --- dlls/dinput/joystick_linuxinput.c | 19 ++++++------------- 1 files changed, 6 insertions(+), 13 deletions(-) diff --git a/dlls/dinput/joystick_linuxinput.c b/dlls/dinput/joystick_linuxinput.c index efdb040..0908424 100644 --- a/dlls/dinput/joystick_linuxinput.c +++ b/dlls/dinput/joystick_linuxinput.c @@ -111,8 +111,6 @@ struct JoyDev { /* data returned by the EVIOCGABS() ioctl */ int axes[ABS_MAX][5]; - /* LUT for KEY_ to offset in rgbButtons */ - BYTE buttons[KEY_MAX]; }; struct ObjProps @@ -142,6 +140,9 @@ struct JoystickImpl struct ObjProps props[ABS_MAX]; + /* LUT for KEY_ to offset in rgbButtons */ + BYTE buttons[KEY_MAX]; + /* Force feedback variables */ EffectListItem* top_effect; int ff_state; @@ -181,7 +182,7 @@ static void find_joydevs(void) struct JoyDev joydev = {0}; int fd; int no_ff_check = 0; - int j, buttons; + int j; snprintf(buf,MAX_PATH,EVDEVPREFIX"%d",i); buf[MAX_PATH-1] = 0; @@ -262,15 +263,6 @@ static void find_joydevs(void) } } - buttons = 0; - for (j=0;j<KEY_MAX;j++) { - if (test_bit(joydev.keybits,j)) { - TRACE(" ... with button %d: %d\n", j, buttons); - joydev.buttons[j] = 0x80 | buttons; - buttons++; - } - } - if (have_joydevs==0) { joydevs = HeapAlloc(GetProcessHeap(), 0, sizeof(struct JoyDev)); } else { @@ -417,6 +409,7 @@ static JoystickImpl *alloc_device(REFGUI if (!test_bit(newDevice->joydev->keybits, i)) continue; memcpy(&df->rgodf[idx], &c_dfDIJoystick2.rgodf[btn + WINE_JOYSTICK_BUTTON_BASE], df->dwObjSize); + newDevice->buttons[i] = 0x80 | btn; df->rgodf[idx++].dwType = DIDFT_MAKEINSTANCE(btn++) | DIDFT_PSHBUTTON; } df->dwNumObjs = idx; @@ -723,7 +716,7 @@ static void joy_polldev(JoystickImpl *Th switch (ie.type) { case EV_KEY: /* button */ { - int btn = This->joydev->buttons[ie.code]; + int btn = This->buttons[ie.code]; TRACE("(%p) %d -> %d\n", This, ie.code, btn); if (btn & 0x80)
1
0
0
0
Christoph Frick : dinput: Use a struct ObjProps for the config of the device.
by Alexandre Julliard
17 Jan '07
17 Jan '07
Module: wine Branch: master Commit: 424d30211559963c0c7f51b7eb8d66ae4ea0b734 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=424d30211559963c0c7f51b7e…
Author: Christoph Frick <frick(a)sc-networks.de> Date: Mon Jan 15 12:07:35 2007 +0100 dinput: Use a struct ObjProps for the config of the device. --- dlls/dinput/joystick_linuxinput.c | 62 ++++++++++++++++++------------------- 1 files changed, 30 insertions(+), 32 deletions(-) diff --git a/dlls/dinput/joystick_linuxinput.c b/dlls/dinput/joystick_linuxinput.c index bf47569..efdb040 100644 --- a/dlls/dinput/joystick_linuxinput.c +++ b/dlls/dinput/joystick_linuxinput.c @@ -113,10 +113,17 @@ struct JoyDev { int axes[ABS_MAX][5]; /* LUT for KEY_ to offset in rgbButtons */ BYTE buttons[KEY_MAX]; +}; - /* autodetecting ranges per axis by following movement */ - LONG havemax[ABS_MAX]; - LONG havemin[ABS_MAX]; +struct ObjProps +{ + /* what we have */ + LONG havemax; + LONG havemin; + /* what range and deadzone the game wants */ + LONG wantmin; + LONG wantmax; + LONG deadzone; }; struct JoystickImpl @@ -129,15 +136,12 @@ struct JoystickImpl IDirectInputImpl *dinput; /* joystick private */ - /* what range and deadzone the game wants */ - LONG wantmin[ABS_MAX]; - LONG wantmax[ABS_MAX]; - LONG deadz[ABS_MAX]; - int joyfd; DIJOYSTATE2 js; + struct ObjProps props[ABS_MAX]; + /* Force feedback variables */ EffectListItem* top_effect; int ff_state; @@ -254,8 +258,6 @@ static void find_joydevs(void) joydev.axes[j][AXIS_ABSFUZZ], joydev.axes[j][AXIS_ABSFLAT] ); - joydev.havemin[j] = joydev.axes[j][AXIS_ABSMIN]; - joydev.havemax[j] = joydev.axes[j][AXIS_ABSMAX]; } } } @@ -376,14 +378,14 @@ static JoystickImpl *alloc_device(REFGUI for (i=0;i<ABS_MAX;i++) { /* apps expect the range to be the same they would get from the * GetProperty/range method */ - newDevice->wantmin[i] = newDevice->joydev->havemin[i]; - newDevice->wantmax[i] = newDevice->joydev->havemax[i]; + newDevice->props[i].wantmin = newDevice->props[i].havemin = newDevice->joydev->axes[i][AXIS_ABSMIN]; + newDevice->props[i].wantmax = newDevice->props[i].havemax = newDevice->joydev->axes[i][AXIS_ABSMAX]; /* TODO: * direct input defines a default for the deadzone somewhere; but as long * as in map_axis the code for the dead zone is commented out its no * problem */ - newDevice->deadz[i] = 0; + newDevice->props[i].deadzone = 0; } fake_current_js_state(newDevice); @@ -583,23 +585,19 @@ static HRESULT WINAPI JoystickAImpl_Unac */ static int map_axis(JoystickImpl* This, int axis, int val) { - int xmin = This->joydev->axes[axis][AXIS_ABSMIN]; - int xmax = This->joydev->axes[axis][AXIS_ABSMAX]; - int hmax = This->joydev->havemax[axis]; - int hmin = This->joydev->havemin[axis]; - int wmin = This->wantmin[axis]; - int wmax = This->wantmax[axis]; + int hmax = This->props[axis].havemax; + int hmin = This->props[axis].havemin; + int wmin = This->props[axis].wantmin; + int wmax = This->props[axis].wantmax; int ret; - if (val > hmax) This->joydev->havemax[axis] = hmax = val; - if (val < hmin) This->joydev->havemin[axis] = hmin = val; - - if (xmin == xmax) return val; + if (val > hmax) This->props[axis].havemax = hmax = val; + if (val < hmin) This->props[axis].havemin = hmin = val; /* map the value from the hmin-hmax range into the wmin-wmax range */ ret = MulDiv( val - hmin, wmax - wmin, hmax - hmin ) + wmin; - TRACE("xmin=%d xmax=%d hmin=%d hmax=%d wmin=%d wmax=%d val=%d ret=%d\n", xmin, xmax, hmin, hmax, wmin, wmax, val, ret); + TRACE("hmin=%d hmax=%d wmin=%d wmax=%d val=%d ret=%d\n", hmin, hmax, wmin, wmax, val, ret); #if 0 /* deadzone doesn't work comfortably enough right now. needs more testing*/ @@ -844,16 +842,16 @@ static HRESULT WINAPI JoystickAImpl_SetP int i; TRACE("proprange(%d,%d) all\n", pr->lMin, pr->lMax); for (i = 0; i < This->base.data_format.wine_df->dwNumObjs; i++) { - This->wantmin[i] = pr->lMin; - This->wantmax[i] = pr->lMax; + This->props[i].wantmin = pr->lMin; + This->props[i].wantmax = pr->lMax; } } else { int obj = find_property(&This->base.data_format, ph); TRACE("proprange(%d,%d) obj=%d\n", pr->lMin, pr->lMax, obj); if (obj >= 0) { - This->wantmin[obj] = pr->lMin; - This->wantmax[obj] = pr->lMax; + This->props[obj].wantmin = pr->lMin; + This->props[obj].wantmax = pr->lMax; } } fake_current_js_state(This); @@ -865,14 +863,14 @@ static HRESULT WINAPI JoystickAImpl_SetP int i; TRACE("deadzone(%d) all\n", pd->dwData); for (i = 0; i < This->base.data_format.wine_df->dwNumObjs; i++) { - This->deadz[i] = pd->dwData; + This->props[i].deadzone = pd->dwData; } } else { int obj = find_property(&This->base.data_format, ph); TRACE("deadzone(%d) obj=%d\n", pd->dwData, obj); if (obj >= 0) { - This->deadz[obj] = pd->dwData; + This->props[obj].deadzone = pd->dwData; } } fake_current_js_state(This); @@ -982,8 +980,8 @@ static HRESULT WINAPI JoystickAImpl_GetP int obj = find_property(&This->base.data_format, pdiph); if (obj >= 0) { - pr->lMin = This->joydev->havemin[obj]; - pr->lMax = This->joydev->havemax[obj]; + pr->lMin = This->props[obj].havemin; + pr->lMax = This->props[obj].havemax; TRACE("range(%d, %d) obj=%d\n", pr->lMin, pr->lMax, obj); } break;
1
0
0
0
Christoph Frick : dinput: Rename 'axe' to 'axis'.
by Alexandre Julliard
17 Jan '07
17 Jan '07
Module: wine Branch: master Commit: 22a6983a96cf733401efe1ae814ca769e56f23b5 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=22a6983a96cf733401efe1ae8…
Author: Christoph Frick <frick(a)sc-networks.de> Date: Mon Jan 15 12:07:04 2007 +0100 dinput: Rename 'axe' to 'axis'. --- dlls/dinput/joystick_linuxinput.c | 52 ++++++++++++++++++------------------ 1 files changed, 26 insertions(+), 26 deletions(-) diff --git a/dlls/dinput/joystick_linuxinput.c b/dlls/dinput/joystick_linuxinput.c index e2f77f8..bf47569 100644 --- a/dlls/dinput/joystick_linuxinput.c +++ b/dlls/dinput/joystick_linuxinput.c @@ -103,18 +103,18 @@ struct JoyDev { BYTE keybits[(KEY_MAX+7)/8]; BYTE ffbits[(FF_MAX+7)/8]; -#define AXE_ABS 0 -#define AXE_ABSMIN 1 -#define AXE_ABSMAX 2 -#define AXE_ABSFUZZ 3 -#define AXE_ABSFLAT 4 +#define AXIS_ABS 0 +#define AXIS_ABSMIN 1 +#define AXIS_ABSMAX 2 +#define AXIS_ABSFUZZ 3 +#define AXIS_ABSFLAT 4 /* data returned by the EVIOCGABS() ioctl */ int axes[ABS_MAX][5]; /* LUT for KEY_ to offset in rgbButtons */ BYTE buttons[KEY_MAX]; - /* autodetecting ranges per axe by following movement */ + /* autodetecting ranges per axis by following movement */ LONG havemax[ABS_MAX]; LONG havemin[ABS_MAX]; }; @@ -246,16 +246,16 @@ static void find_joydevs(void) for (j=0;j<ABS_MAX;j++) { if (test_bit(joydev.absbits,j)) { if (-1!=ioctl(fd,EVIOCGABS(j),&(joydev.axes[j]))) { - TRACE(" ... with axe %d: cur=%d, min=%d, max=%d, fuzz=%d, flat=%d\n", + TRACE(" ... with axis %d: cur=%d, min=%d, max=%d, fuzz=%d, flat=%d\n", j, - joydev.axes[j][AXE_ABS], - joydev.axes[j][AXE_ABSMIN], - joydev.axes[j][AXE_ABSMAX], - joydev.axes[j][AXE_ABSFUZZ], - joydev.axes[j][AXE_ABSFLAT] + joydev.axes[j][AXIS_ABS], + joydev.axes[j][AXIS_ABSMIN], + joydev.axes[j][AXIS_ABSMAX], + joydev.axes[j][AXIS_ABSFUZZ], + joydev.axes[j][AXIS_ABSFLAT] ); - joydev.havemin[j] = joydev.axes[j][AXE_ABSMIN]; - joydev.havemax[j] = joydev.axes[j][AXE_ABSMAX]; + joydev.havemin[j] = joydev.axes[j][AXIS_ABSMIN]; + joydev.havemax[j] = joydev.axes[j][AXIS_ABSMAX]; } } } @@ -578,13 +578,13 @@ static HRESULT WINAPI JoystickAImpl_Unac /* * This maps the read value (from the input event) to a value in the - * 'wanted' range. It also autodetects the possible range of the axe and + * 'wanted' range. It also autodetects the possible range of the axis and * adapts values accordingly. */ static int map_axis(JoystickImpl* This, int axis, int val) { - int xmin = This->joydev->axes[axis][AXE_ABSMIN]; - int xmax = This->joydev->axes[axis][AXE_ABSMAX]; + int xmin = This->joydev->axes[axis][AXIS_ABSMIN]; + int xmax = This->joydev->axes[axis][AXIS_ABSMAX]; int hmax = This->joydev->havemax[axis]; int hmin = This->joydev->havemin[axis]; int wmin = This->wantmin[axis]; @@ -619,14 +619,14 @@ static void fake_current_js_state(Joysti { int i; /* center the axes */ - ji->js.lX = test_bit(ji->joydev->absbits, ABS_X) ? map_axis(ji, ABS_X, ji->joydev->axes[ABS_X ][AXE_ABS]) : 0; - ji->js.lY = test_bit(ji->joydev->absbits, ABS_Y) ? map_axis(ji, ABS_Y, ji->joydev->axes[ABS_Y ][AXE_ABS]) : 0; - ji->js.lZ = test_bit(ji->joydev->absbits, ABS_Z) ? map_axis(ji, ABS_Z, ji->joydev->axes[ABS_Z ][AXE_ABS]) : 0; - ji->js.lRx = test_bit(ji->joydev->absbits, ABS_RX) ? map_axis(ji, ABS_RX, ji->joydev->axes[ABS_RX ][AXE_ABS]) : 0; - ji->js.lRy = test_bit(ji->joydev->absbits, ABS_RY) ? map_axis(ji, ABS_RY, ji->joydev->axes[ABS_RY ][AXE_ABS]) : 0; - ji->js.lRz = test_bit(ji->joydev->absbits, ABS_RZ) ? map_axis(ji, ABS_RZ, ji->joydev->axes[ABS_RZ ][AXE_ABS]) : 0; - ji->js.rglSlider[0] = test_bit(ji->joydev->absbits, ABS_THROTTLE) ? map_axis(ji, ABS_THROTTLE, ji->joydev->axes[ABS_THROTTLE][AXE_ABS]) : 0; - ji->js.rglSlider[1] = test_bit(ji->joydev->absbits, ABS_RUDDER) ? map_axis(ji, ABS_RUDDER, ji->joydev->axes[ABS_RUDDER ][AXE_ABS]) : 0; + ji->js.lX = test_bit(ji->joydev->absbits, ABS_X) ? map_axis(ji, ABS_X, ji->joydev->axes[ABS_X ][AXIS_ABS]) : 0; + ji->js.lY = test_bit(ji->joydev->absbits, ABS_Y) ? map_axis(ji, ABS_Y, ji->joydev->axes[ABS_Y ][AXIS_ABS]) : 0; + ji->js.lZ = test_bit(ji->joydev->absbits, ABS_Z) ? map_axis(ji, ABS_Z, ji->joydev->axes[ABS_Z ][AXIS_ABS]) : 0; + ji->js.lRx = test_bit(ji->joydev->absbits, ABS_RX) ? map_axis(ji, ABS_RX, ji->joydev->axes[ABS_RX ][AXIS_ABS]) : 0; + ji->js.lRy = test_bit(ji->joydev->absbits, ABS_RY) ? map_axis(ji, ABS_RY, ji->joydev->axes[ABS_RY ][AXIS_ABS]) : 0; + ji->js.lRz = test_bit(ji->joydev->absbits, ABS_RZ) ? map_axis(ji, ABS_RZ, ji->joydev->axes[ABS_RZ ][AXIS_ABS]) : 0; + ji->js.rglSlider[0] = test_bit(ji->joydev->absbits, ABS_THROTTLE) ? map_axis(ji, ABS_THROTTLE, ji->joydev->axes[ABS_THROTTLE][AXIS_ABS]) : 0; + ji->js.rglSlider[1] = test_bit(ji->joydev->absbits, ABS_RUDDER) ? map_axis(ji, ABS_RUDDER, ji->joydev->axes[ABS_RUDDER ][AXIS_ABS]) : 0; /* POV center is -1 */ for (i=0; i<4; i++) { ji->js.rgdwPOV[i] = -1; @@ -768,7 +768,7 @@ static void joy_polldev(JoystickImpl *Th This->js.rgdwPOV[3] = value = map_pov(ie.value, ie.code==ABS_HAT3X); break; default: - FIXME("unhandled joystick axe event (code %d, value %d)\n",ie.code,ie.value); + FIXME("unhandled joystick axis event (code %d, value %d)\n",ie.code,ie.value); break; } break;
1
0
0
0
Frank Richter : dbghelp: Search for .gnu_debuglink file.
by Alexandre Julliard
17 Jan '07
17 Jan '07
Module: wine Branch: master Commit: 867ebe4da0442214b1a514c5e33973d986d9c9a3 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=867ebe4da0442214b1a514c5e…
Author: Frank Richter <frank.richter(a)gmail.com> Date: Wed Jan 17 00:26:27 2007 +0100 dbghelp: Search for .gnu_debuglink file. --- dlls/dbghelp/elf_module.c | 62 ++++++++++++++++++++++++++++++++++++++++++-- 1 files changed, 59 insertions(+), 3 deletions(-) diff --git a/dlls/dbghelp/elf_module.c b/dlls/dbghelp/elf_module.c index 9b6b458..79feca5 100644 --- a/dlls/dbghelp/elf_module.c +++ b/dlls/dbghelp/elf_module.c @@ -784,6 +784,48 @@ static BOOL elf_load_debug_info_from_map struct hash_table* ht_symtab); /****************************************************************** + * elf_locate_debug_link + * + * Locate a filename from a .gnu_debuglink section, using the same + * strategy as gdb: + * "If the full name of the directory containing the executable is + * execdir, and the executable has a debug link that specifies the + * name debugfile, then GDB will automatically search for the + * debugging information file in three places: + * - the directory containing the executable file (that is, it + * will look for a file named `execdir/debugfile', + * - a subdirectory of that directory named `.debug' (that is, the + * file `execdir/.debug/debugfile', and + * - a subdirectory of the global debug file directory that includes + * the executable's full path, and the name from the link (that is, + * the file `globaldebugdir/execdir/debugfile', where globaldebugdir + * is the global debug file directory, and execdir has been turned + * into a relative path)." (from GDB manual) + */ +static char* elf_locate_debug_link (const char* filename, const char* moduleDir) +{ + static const char globalDebugDir[] = "/usr/lib/debug"; + const size_t moduleDirLen = strlen (moduleDir); + const size_t globalDebugDirLen = strlen (globalDebugDir); + struct stat statbuf; + + char* p = HeapAlloc (GetProcessHeap(), 0, + moduleDirLen + 1 + max (6, globalDebugDirLen) + 1 + strlen (filename)+1); + + sprintf (p, "%s/%s", moduleDir, filename); + if (stat(p, &statbuf) != -1 && !S_ISDIR(statbuf.st_mode)) return p; + + sprintf (p, "%s/.debug/%s", moduleDir, filename); + if (stat(p, &statbuf) != -1 && !S_ISDIR(statbuf.st_mode)) return p; + + sprintf (p, "%s/%s/%s", globalDebugDir, moduleDir, filename); + if (stat(p, &statbuf) != -1 && !S_ISDIR(statbuf.st_mode)) return p; + + strcpy (p, filename); + return p; +} + +/****************************************************************** * elf_debuglink_parse * * Parses a .gnu_debuglink section and loads the debug info from @@ -803,22 +845,36 @@ static BOOL elf_debuglink_parse (struct BOOL ret = FALSE; const char* dbg_link = (char*)debuglink; struct elf_file_map fmap_link; + char* moduleDir; + char* link_file; + char* slash; - if (elf_map_file(dbg_link, &fmap_link)) + moduleDir = HeapAlloc (GetProcessHeap(), 0, strlen (module->module.LoadedImageName) + 1); + strcpy (moduleDir, module->module.LoadedImageName); + slash = strrchr (moduleDir, '/'); + if (slash != 0) *slash = 0; + + link_file = elf_locate_debug_link (dbg_link, moduleDir); + TRACE("Located debug information file %s at %s\n", dbg_link, link_file); + + if (elf_map_file(link_file, &fmap_link)) { fmap_link.crc = *(const DWORD*)(dbg_link + ((DWORD_PTR)(strlen(dbg_link) + 4) & ~3)); fmap_link.with_crc = 1; ret = elf_load_debug_info_from_map(module, &fmap_link, pool, ht_symtab); if (ret) - strcpy(module->module.LoadedPdbName, dbg_link); + strcpy(module->module.LoadedPdbName, link_file); else - WARN("Couldn't load debug information from %s\n", dbg_link); + WARN("Couldn't load debug information from %s\n", link_file); elf_unmap_file(&fmap_link); } else WARN("Couldn't map %s\n", dbg_link); + HeapFree (GetProcessHeap(), 0, link_file); + HeapFree (GetProcessHeap(), 0, moduleDir); + return ret; }
1
0
0
0
← Newer
1
...
24
25
26
27
28
29
30
...
90
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
Results per page:
10
25
50
100
200