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 2012
----- 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
972 discussions
Start a n
N
ew thread
Francois Gouget : xcopy: Remove a duplicated space.
by Alexandre Julliard
23 Jan '12
23 Jan '12
Module: wine Branch: master Commit: fc2467dd2b772f5bbaa2538ab59799b6b0157414 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=fc2467dd2b772f5bbaa2538ab…
Author: Francois Gouget <fgouget(a)free.fr> Date: Mon Jan 23 00:33:51 2012 +0100 xcopy: Remove a duplicated space. --- po/ar.po | 2 +- po/bg.po | 2 +- po/ca.po | 3 ++- po/cs.po | 2 +- po/da.po | 2 +- po/de.po | 3 ++- po/el.po | 2 +- po/en.po | 4 ++-- po/en_US.po | 4 ++-- po/eo.po | 2 +- po/es.po | 2 +- po/fa.po | 2 +- po/fi.po | 2 +- po/fr.po | 3 ++- po/he.po | 3 ++- po/hi.po | 2 +- po/hu.po | 2 +- po/it.po | 3 ++- po/ja.po | 3 ++- po/ko.po | 19 ++++++++++--------- po/lt.po | 3 ++- po/ml.po | 2 +- po/nb_NO.po | 2 +- po/nl.po | 3 ++- po/or.po | 2 +- po/pa.po | 2 +- po/pl.po | 3 ++- po/pt_BR.po | 3 ++- po/pt_PT.po | 2 +- po/rm.po | 2 +- po/ro.po | 2 +- po/ru.po | 3 ++- po/sk.po | 2 +- po/sl.po | 3 ++- po/sr_RS(a)cyrillic.po | 2 +- po/sr_RS(a)latin.po | 2 +- po/sv.po | 2 +- po/te.po | 2 +- po/th.po | 2 +- po/tr.po | 2 +- po/uk.po | 2 +- po/wa.po | 2 +- po/wine.pot | 2 +- po/zh_CN.po | 2 +- po/zh_TW.po | 2 +- programs/xcopy/xcopy.rc | 2 +- 46 files changed, 69 insertions(+), 56 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=fc2467dd2b772f5bbaa25…
1
0
0
0
Alexandre Julliard : winex11: Ignore rectangles with invalid coordinates when converting region data.
by Alexandre Julliard
23 Jan '12
23 Jan '12
Module: wine Branch: master Commit: fe7d81dc1b1b27ba782676f60dca0aaef014d781 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=fe7d81dc1b1b27ba782676f60…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Mon Jan 23 11:32:26 2012 +0100 winex11: Ignore rectangles with invalid coordinates when converting region data. --- dlls/winex11.drv/graphics.c | 33 +++++++++++++++++++++++++-------- 1 files changed, 25 insertions(+), 8 deletions(-) diff --git a/dlls/winex11.drv/graphics.c b/dlls/winex11.drv/graphics.c index 910dfea..afe2ff1 100644 --- a/dlls/winex11.drv/graphics.c +++ b/dlls/winex11.drv/graphics.c @@ -161,13 +161,24 @@ RGNDATA *X11DRV_GetRegionData( HRGN hrgn, HDC hdc_lptodp ) { int j; /* need to start from the end */ + xrect += data->rdh.nCount; for (j = data->rdh.nCount-1; j >= 0; j--) { tmp = rect[j]; - xrect[j].x = max( min( tmp.left, SHRT_MAX), SHRT_MIN); - xrect[j].y = max( min( tmp.top, SHRT_MAX), SHRT_MIN); - xrect[j].width = max( min( tmp.right - xrect[j].x, USHRT_MAX), 0); - xrect[j].height = max( min( tmp.bottom - xrect[j].y, USHRT_MAX), 0); + if (tmp.left > SHRT_MAX) continue; + if (tmp.top > SHRT_MAX) continue; + if (tmp.right < SHRT_MIN) continue; + if (tmp.bottom < SHRT_MIN) continue; + xrect--; + xrect->x = max( min( tmp.left, SHRT_MAX), SHRT_MIN); + xrect->y = max( min( tmp.top, SHRT_MAX), SHRT_MIN); + xrect->width = max( min( tmp.right, SHRT_MAX ) - xrect->x, 0); + xrect->height = max( min( tmp.bottom, SHRT_MAX ) - xrect->y, 0); + } + if (xrect > (XRectangle *)data->Buffer) + { + data->rdh.nCount -= xrect - (XRectangle *)data->Buffer; + memmove( (XRectangle *)data->Buffer, xrect, data->rdh.nCount * sizeof(*xrect) ); } } else @@ -175,11 +186,17 @@ RGNDATA *X11DRV_GetRegionData( HRGN hrgn, HDC hdc_lptodp ) for (i = 0; i < data->rdh.nCount; i++) { tmp = rect[i]; - xrect[i].x = max( min( tmp.left, SHRT_MAX), SHRT_MIN); - xrect[i].y = max( min( tmp.top, SHRT_MAX), SHRT_MIN); - xrect[i].width = max( min( tmp.right - xrect[i].x, USHRT_MAX), 0); - xrect[i].height = max( min( tmp.bottom - xrect[i].y, USHRT_MAX), 0); + if (tmp.left > SHRT_MAX) continue; + if (tmp.top > SHRT_MAX) continue; + if (tmp.right < SHRT_MIN) continue; + if (tmp.bottom < SHRT_MIN) continue; + xrect->x = max( min( tmp.left, SHRT_MAX), SHRT_MIN); + xrect->y = max( min( tmp.top, SHRT_MAX), SHRT_MIN); + xrect->width = max( min( tmp.right, SHRT_MAX ) - xrect->x, 0); + xrect->height = max( min( tmp.bottom, SHRT_MAX ) - xrect->y, 0); + xrect++; } + data->rdh.nCount = xrect - (XRectangle *)data->Buffer; } return data; }
1
0
0
0
Stefan Dösinger : wined3d: Relax depth blit requirements.
by Alexandre Julliard
23 Jan '12
23 Jan '12
Module: wine Branch: master Commit: 038e308a4153b84c101659611bc2da261e965cd4 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=038e308a4153b84c101659611…
Author: Stefan Dösinger <stefan(a)codeweavers.com> Date: Sun Jan 22 16:32:19 2012 +0100 wined3d: Relax depth blit requirements. --- dlls/d3d9/d3d9_private.h | 1 + dlls/d3d9/device.c | 63 ++++++++++++++++++++++++++++++++++++++++------ dlls/wined3d/surface.c | 32 ----------------------- 3 files changed, 56 insertions(+), 40 deletions(-) diff --git a/dlls/d3d9/d3d9_private.h b/dlls/d3d9/d3d9_private.h index 9feda66..5886618 100644 --- a/dlls/d3d9/d3d9_private.h +++ b/dlls/d3d9/d3d9_private.h @@ -173,6 +173,7 @@ typedef struct IDirect3DDevice9Impl unsigned int numConvertedDecls, declArraySize; BOOL notreset; + BOOL in_scene; } IDirect3DDevice9Impl; HRESULT device_init(IDirect3DDevice9Impl *device, IDirect3D9Impl *parent, struct wined3d *wined3d, UINT adapter, D3DDEVTYPE device_type, diff --git a/dlls/d3d9/device.c b/dlls/d3d9/device.c index 631ba5a..39cd740 100644 --- a/dlls/d3d9/device.c +++ b/dlls/d3d9/device.c @@ -1035,22 +1035,67 @@ static HRESULT WINAPI IDirect3DDevice9Impl_GetFrontBufferData(IDirect3DDevice9Ex return hr; } -static HRESULT WINAPI IDirect3DDevice9Impl_StretchRect(IDirect3DDevice9Ex *iface, IDirect3DSurface9 *pSourceSurface, - const RECT *pSourceRect, IDirect3DSurface9 *pDestSurface, const RECT *pDestRect, D3DTEXTUREFILTERTYPE Filter) +static HRESULT WINAPI IDirect3DDevice9Impl_StretchRect(IDirect3DDevice9Ex *iface, IDirect3DSurface9 *src_surface, + const RECT *src_rect, IDirect3DSurface9 *dst_surface, const RECT *dst_rect, D3DTEXTUREFILTERTYPE filter) { - IDirect3DSurface9Impl *src = unsafe_impl_from_IDirect3DSurface9(pSourceSurface); - IDirect3DSurface9Impl *dst = unsafe_impl_from_IDirect3DSurface9(pDestSurface); - HRESULT hr; + IDirect3DDevice9Impl *This = impl_from_IDirect3DDevice9Ex(iface); + IDirect3DSurface9Impl *src = unsafe_impl_from_IDirect3DSurface9(src_surface); + IDirect3DSurface9Impl *dst = unsafe_impl_from_IDirect3DSurface9(dst_surface); + HRESULT hr = D3DERR_INVALIDCALL; + struct wined3d_resource_desc src_desc, dst_desc; + struct wined3d_resource *wined3d_resource; TRACE("iface %p, src_surface %p, src_rect %p, dst_surface %p, dst_rect %p, filter %#x.\n", - iface, pSourceSurface, pSourceRect, pDestSurface, pDestRect, Filter); + iface, src_surface, src_rect, dst_surface, dst_rect, filter); wined3d_mutex_lock(); - hr = wined3d_surface_blt(dst->wined3d_surface, pDestRect, src->wined3d_surface, pSourceRect, 0, NULL, Filter); + wined3d_resource = wined3d_surface_get_resource(dst->wined3d_surface); + wined3d_resource_get_desc(wined3d_resource, &dst_desc); + + wined3d_resource = wined3d_surface_get_resource(src->wined3d_surface); + wined3d_resource_get_desc(wined3d_resource, &src_desc); + + if (src_desc.usage & WINED3DUSAGE_DEPTHSTENCIL) + { + if (This->in_scene) + { + WARN("Rejecting depth / stencil blit while in scene.\n"); + goto done; + } + + if (src_rect) + { + if (src_rect->left || src_rect->top || src_rect->right != src_desc.width + || src_rect->bottom != src_desc.height) + { + WARN("Rejecting depth / stencil blit with invalid source rect %s.\n", + wine_dbgstr_rect(src_rect)); + goto done; + } + } + if (dst_rect) + { + if (dst_rect->left || dst_rect->top || dst_rect->right != dst_desc.width + || dst_rect->bottom != dst_desc.height) + { + WARN("Rejecting depth / stencil blit with invalid destination rect %s.\n", + wine_dbgstr_rect(dst_rect)); + goto done; + } + } + if (src_desc.width != dst_desc.width || src_desc.height != dst_desc.height) + { + WARN("Rejecting depth / stencil blit with mismatched surface sizes.\n"); + goto done; + } + } + + hr = wined3d_surface_blt(dst->wined3d_surface, dst_rect, src->wined3d_surface, src_rect, 0, NULL, filter); if (hr == WINEDDERR_INVALIDRECT) hr = D3DERR_INVALIDCALL; - wined3d_mutex_unlock(); +done: + wined3d_mutex_unlock(); return hr; } @@ -1245,6 +1290,7 @@ static HRESULT WINAPI IDirect3DDevice9Impl_BeginScene(IDirect3DDevice9Ex *iface) wined3d_mutex_lock(); hr = wined3d_device_begin_scene(This->wined3d_device); + if (SUCCEEDED(hr)) This->in_scene = TRUE; wined3d_mutex_unlock(); return hr; @@ -1259,6 +1305,7 @@ static HRESULT WINAPI DECLSPEC_HOTPATCH IDirect3DDevice9Impl_EndScene(IDirect3DD wined3d_mutex_lock(); hr = wined3d_device_end_scene(This->wined3d_device); + if (SUCCEEDED(hr)) This->in_scene = FALSE; wined3d_mutex_unlock(); return hr; diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c index 023bf6a..e6b4cd8 100644 --- a/dlls/wined3d/surface.c +++ b/dlls/wined3d/surface.c @@ -1590,44 +1590,12 @@ HRESULT CDECL wined3d_surface_blt(struct wined3d_surface *dst_surface, const REC } else { - /* Accessing depth / stencil surfaces is supposed to fail while in - * a scene, except for fills, which seem to work. */ - if (device->inScene) - { - WARN("Rejecting depth / stencil access while in scene.\n"); - return WINED3DERR_INVALIDCALL; - } - if (src_ds_flags != dst_ds_flags) { WARN("Rejecting depth / stencil blit between incompatible formats.\n"); return WINED3DERR_INVALIDCALL; } - if (src_rect.top || src_rect.left - || src_rect.bottom != src_surface->resource.height - || src_rect.right != src_surface->resource.width) - { - WARN("Rejecting depth / stencil blit with invalid source rect %s.\n", - wine_dbgstr_rect(&src_rect)); - return WINED3DERR_INVALIDCALL; - } - - if (dst_rect.top || dst_rect.left - || dst_rect.bottom != dst_surface->resource.height - || dst_rect.right != dst_surface->resource.width) - { - WARN("Rejecting depth / stencil blit with invalid destination rect %s.\n", - wine_dbgstr_rect(&src_rect)); - return WINED3DERR_INVALIDCALL; - } - - if (scale) - { - WARN("Rejecting depth / stencil blit with mismatched surface sizes.\n"); - return WINED3DERR_INVALIDCALL; - } - if (SUCCEEDED(wined3d_surface_depth_blt(src_surface, &src_rect, dst_surface, &dst_rect))) return WINED3D_OK; }
1
0
0
0
Francois Gouget : ddraw/tests: Fix compilation on systems that don' t support nameless unions.
by Alexandre Julliard
23 Jan '12
23 Jan '12
Module: wine Branch: master Commit: 21036e13dff6f66f601bc3a219f9152bca2e9e0d URL:
http://source.winehq.org/git/wine.git/?a=commit;h=21036e13dff6f66f601bc3a21…
Author: Francois Gouget <fgouget(a)free.fr> Date: Sun Jan 22 19:26:47 2012 +0100 ddraw/tests: Fix compilation on systems that don't support nameless unions. --- dlls/ddraw/tests/ddraw1.c | 4 ++-- dlls/ddraw/tests/ddraw2.c | 4 ++-- dlls/ddraw/tests/ddraw4.c | 2 +- dlls/ddraw/tests/ddraw7.c | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/dlls/ddraw/tests/ddraw1.c b/dlls/ddraw/tests/ddraw1.c index 7981c84..c580e4b 100644 --- a/dlls/ddraw/tests/ddraw1.c +++ b/dlls/ddraw/tests/ddraw1.c @@ -137,7 +137,7 @@ static IDirect3DDevice *create_device(IDirectDraw *ddraw, HWND window, DWORD coo surface_desc.dwSize = sizeof(surface_desc); surface_desc.dwFlags = DDSD_CAPS | DDSD_ZBUFFERBITDEPTH | DDSD_WIDTH | DDSD_HEIGHT; surface_desc.ddsCaps.dwCaps = DDSCAPS_ZBUFFER; - surface_desc.dwZBufferBitDepth = z_depth; + U2(surface_desc).dwZBufferBitDepth = z_depth; surface_desc.dwWidth = 640; surface_desc.dwHeight = 480; hr = IDirectDraw_CreateSurface(ddraw, &surface_desc, &ds, NULL); @@ -408,7 +408,7 @@ static void test_clipper_blt(void) hr = IDirectDrawSurface_Lock(src_surface, NULL, &surface_desc, DDLOCK_WAIT, NULL); ok(SUCCEEDED(hr), "Failed to lock source surface, hr %#x.\n", hr); - ok(surface_desc.lPitch == 2560, "Got unexpected surface pitch %u.\n", surface_desc.lPitch); + ok(U1(surface_desc).lPitch == 2560, "Got unexpected surface pitch %u.\n", U1(surface_desc).lPitch); ptr = surface_desc.lpSurface; memcpy(&ptr[ 0], &src_data[ 0], 6 * sizeof(DWORD)); memcpy(&ptr[ 640], &src_data[ 6], 6 * sizeof(DWORD)); diff --git a/dlls/ddraw/tests/ddraw2.c b/dlls/ddraw/tests/ddraw2.c index 824ddb1..d6a79af 100644 --- a/dlls/ddraw/tests/ddraw2.c +++ b/dlls/ddraw/tests/ddraw2.c @@ -144,7 +144,7 @@ static IDirect3DDevice2 *create_device(IDirectDraw2 *ddraw, HWND window, DWORD c surface_desc.dwSize = sizeof(surface_desc); surface_desc.dwFlags = DDSD_CAPS | DDSD_ZBUFFERBITDEPTH | DDSD_WIDTH | DDSD_HEIGHT; surface_desc.ddsCaps.dwCaps = DDSCAPS_ZBUFFER; - surface_desc.dwZBufferBitDepth = z_depth; + U2(surface_desc).dwZBufferBitDepth = z_depth; surface_desc.dwWidth = 640; surface_desc.dwHeight = 480; hr = IDirectDraw2_CreateSurface(ddraw, &surface_desc, &ds, NULL); @@ -418,7 +418,7 @@ static void test_clipper_blt(void) hr = IDirectDrawSurface_Lock(src_surface, NULL, &surface_desc, DDLOCK_WAIT, NULL); ok(SUCCEEDED(hr), "Failed to lock source surface, hr %#x.\n", hr); - ok(surface_desc.lPitch == 2560, "Got unexpected surface pitch %u.\n", surface_desc.lPitch); + ok(U1(surface_desc).lPitch == 2560, "Got unexpected surface pitch %u.\n", U1(surface_desc).lPitch); ptr = surface_desc.lpSurface; memcpy(&ptr[ 0], &src_data[ 0], 6 * sizeof(DWORD)); memcpy(&ptr[ 640], &src_data[ 6], 6 * sizeof(DWORD)); diff --git a/dlls/ddraw/tests/ddraw4.c b/dlls/ddraw/tests/ddraw4.c index 68a478f..69dcef7 100644 --- a/dlls/ddraw/tests/ddraw4.c +++ b/dlls/ddraw/tests/ddraw4.c @@ -640,7 +640,7 @@ static void test_clipper_blt(void) hr = IDirectDrawSurface4_Lock(src_surface, NULL, &surface_desc, DDLOCK_WAIT, NULL); ok(SUCCEEDED(hr), "Failed to lock source surface, hr %#x.\n", hr); - ok(surface_desc.lPitch == 2560, "Got unexpected surface pitch %u.\n", surface_desc.lPitch); + ok(U1(surface_desc).lPitch == 2560, "Got unexpected surface pitch %u.\n", U1(surface_desc).lPitch); ptr = surface_desc.lpSurface; memcpy(&ptr[ 0], &src_data[ 0], 6 * sizeof(DWORD)); memcpy(&ptr[ 640], &src_data[ 6], 6 * sizeof(DWORD)); diff --git a/dlls/ddraw/tests/ddraw7.c b/dlls/ddraw/tests/ddraw7.c index d5477f0..e3f59dd 100644 --- a/dlls/ddraw/tests/ddraw7.c +++ b/dlls/ddraw/tests/ddraw7.c @@ -633,7 +633,7 @@ static void test_clipper_blt(void) hr = IDirectDrawSurface7_Lock(src_surface, NULL, &surface_desc, 0, NULL); ok(SUCCEEDED(hr), "Failed to lock source surface, hr %#x.\n", hr); - ok(surface_desc.lPitch == 2560, "Got unexpected surface pitch %u.\n", surface_desc.lPitch); + ok(U1(surface_desc).lPitch == 2560, "Got unexpected surface pitch %u.\n", U1(surface_desc).lPitch); ptr = surface_desc.lpSurface; memcpy(&ptr[ 0], &src_data[ 0], 6 * sizeof(DWORD)); memcpy(&ptr[ 640], &src_data[ 6], 6 * sizeof(DWORD));
1
0
0
0
André Hentschel : d3drm/tests: Add more tests.
by Alexandre Julliard
23 Jan '12
23 Jan '12
Module: wine Branch: master Commit: 8eae13fd4cc28521d157bca8bb120704bc366ec9 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=8eae13fd4cc28521d157bca8b…
Author: André Hentschel <nerv(a)dawncrow.de> Date: Sun Jan 22 18:38:49 2012 +0100 d3drm/tests: Add more tests. --- dlls/d3drm/tests/d3drm.c | 54 ++++++++++++++++++++++++++++++++++++--------- 1 files changed, 43 insertions(+), 11 deletions(-) diff --git a/dlls/d3drm/tests/d3drm.c b/dlls/d3drm/tests/d3drm.c index f021e2c..ff2986b 100644 --- a/dlls/d3drm/tests/d3drm.c +++ b/dlls/d3drm/tests/d3drm.c @@ -180,31 +180,32 @@ static void test_MeshBuilder3(void) if (FAILED(hr)) { win_skip("Cannot get IDirect3DRM3 interface (hr = %x), skipping tests\n", hr); + IDirect3DRM_Release(pD3DRM); return; } - hr = IDirect3DRM_CreateMeshBuilder(pD3DRM3, &pMeshBuilder3); + hr = IDirect3DRM3_CreateMeshBuilder(pD3DRM3, &pMeshBuilder3); ok(hr == D3DRM_OK, "Cannot get IDirect3DRMMeshBuilder3 interface (hr = %x)\n", hr); info.lpMemory = data_bad_version; info.dSize = strlen(data_bad_version); - hr = IDirect3DRMMeshBuilder_Load(pMeshBuilder3, &info, NULL, D3DRMLOAD_FROMMEMORY, NULL, NULL); + hr = IDirect3DRMMeshBuilder3_Load(pMeshBuilder3, &info, NULL, D3DRMLOAD_FROMMEMORY, NULL, NULL); ok(hr == D3DRMERR_BADFILE, "Should have returned D3DRMERR_BADFILE (hr = %x)\n", hr); info.lpMemory = data_no_mesh; info.dSize = strlen(data_no_mesh); - hr = IDirect3DRMMeshBuilder_Load(pMeshBuilder3, &info, NULL, D3DRMLOAD_FROMMEMORY, NULL, NULL); + hr = IDirect3DRMMeshBuilder3_Load(pMeshBuilder3, &info, NULL, D3DRMLOAD_FROMMEMORY, NULL, NULL); ok(hr == D3DRMERR_NOTFOUND, "Should have returned D3DRMERR_NOTFOUND (hr = %x)\n", hr); info.lpMemory = data_ok; info.dSize = strlen(data_ok); - hr = IDirect3DRMMeshBuilder_Load(pMeshBuilder3, &info, NULL, D3DRMLOAD_FROMMEMORY, NULL, NULL); + hr = IDirect3DRMMeshBuilder3_Load(pMeshBuilder3, &info, NULL, D3DRMLOAD_FROMMEMORY, NULL, NULL); ok(hr == D3DRM_OK, "Cannot load mesh data (hr = %x)\n", hr); - val = IDirect3DRMMeshBuilder_GetVertexCount(pMeshBuilder3); + val = IDirect3DRMMeshBuilder3_GetVertexCount(pMeshBuilder3); ok(val == 4, "Wrong number of vertices %d (must be 4)\n", val); - val = IDirect3DRMMeshBuilder_GetFaceCount(pMeshBuilder3); + val = IDirect3DRMMeshBuilder3_GetFaceCount(pMeshBuilder3); ok(val == 3, "Wrong number of faces %d (must be 3)\n", val); hr = IDirect3DRMMeshBuilder3_GetVertices(pMeshBuilder3, 0, &val1, NULL); @@ -230,9 +231,9 @@ static void test_MeshBuilder3(void) todo_wine ok(valu == 1.23f, "Wrong coordinate %f (must be 1.23)\n", valu); todo_wine ok(valv == 3.21f, "Wrong coordinate %f (must be 3.21)\n", valv); - IDirect3DRMMeshBuilder_Release(pMeshBuilder3); - - IDirect3DRM_Release(pD3DRM3); + IDirect3DRMMeshBuilder3_Release(pMeshBuilder3); + IDirect3DRM3_Release(pD3DRM3); + IDirect3DRM_Release(pD3DRM); } static void test_Frame(void) @@ -270,10 +271,19 @@ static void test_Frame(void) IDirect3DRMFrameArray_Release(pArray); } - /* Add child to first parent */ hr = IDirect3DRM_CreateFrame(pD3DRM, NULL, &pFrameP1); ok(hr == D3DRM_OK, "Cannot get IDirect3DRMFrame interface (hr = %x)\n", hr); + /* [Add/Delete]Child with NULL pointer */ + hr = IDirect3DRMFrame_AddChild(pFrameP1, NULL); + todo_wine ok(hr == D3DRMERR_BADOBJECT, "Should have returned D3DRMERR_BADOBJECT (hr = %x)\n", hr); + CHECK_REFCOUNT(pFrameP1, 1); + + hr = IDirect3DRMFrame_DeleteChild(pFrameP1, NULL); + todo_wine ok(hr == D3DRMERR_BADOBJECT, "Should have returned D3DRMERR_BADOBJECT (hr = %x)\n", hr); + CHECK_REFCOUNT(pFrameP1, 1); + + /* Add child to first parent */ pFrameTmp = (void*)0xdeadbeef; hr = IDirect3DRMFrame_GetParent(pFrameP1, &pFrameTmp); todo_wine ok(hr == D3DRM_OK, "Cannot get parent frame (hr = %x)\n", hr); @@ -370,9 +380,31 @@ static void test_Frame(void) todo_wine ok(hr == D3DRM_OK, "Cannot get parent frame (hr = %x)\n", hr); todo_wine ok(pFrameTmp == NULL, "pFrameTmp = %p\n", pFrameTmp); + /* Add two children */ + hr = IDirect3DRMFrame_AddChild(pFrameP2, pFrameC); + todo_wine ok(hr == D3DRM_OK, "Cannot add child frame (hr = %x)\n", hr); + todo_wine CHECK_REFCOUNT(pFrameC, 2); + + hr = IDirect3DRMFrame_AddChild(pFrameP2, pFrameP1); + todo_wine ok(hr == D3DRM_OK, "Cannot add child frame (hr = %x)\n", hr); + todo_wine CHECK_REFCOUNT(pFrameP1, 3); + + pArray = NULL; + hr = IDirect3DRMFrame_GetChildren(pFrameP2, &pArray); + todo_wine ok(hr == D3DRM_OK, "Cannot get children (hr = %x)\n", hr); + if (pArray) + { + count = IDirect3DRMFrameArray_GetSize(pArray); + ok(count == 2, "count = %u\n", count); + IDirect3DRMFrameArray_Release(pArray); + } + + IDirect3DRMMeshBuilder_Release(pFrameP2); + todo_wine CHECK_REFCOUNT(pFrameC, 2); + todo_wine CHECK_REFCOUNT(pFrameP1, 3); + IDirect3DRMMeshBuilder_Release(pFrameC); IDirect3DRMMeshBuilder_Release(pFrameP1); - IDirect3DRMMeshBuilder_Release(pFrameP2); IDirect3DRM_Release(pD3DRM); }
1
0
0
0
André Hentschel : d3drm: Forward all IUnknown methods from IDirect3DRMFrame3.
by Alexandre Julliard
23 Jan '12
23 Jan '12
Module: wine Branch: master Commit: dc700123cb8daa05899ea86089c8fa5c99cd9194 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=dc700123cb8daa05899ea8608…
Author: André Hentschel <nerv(a)dawncrow.de> Date: Sun Jan 22 18:35:53 2012 +0100 d3drm: Forward all IUnknown methods from IDirect3DRMFrame3. --- dlls/d3drm/frame.c | 14 ++------------ 1 files changed, 2 insertions(+), 12 deletions(-) diff --git a/dlls/d3drm/frame.c b/dlls/d3drm/frame.c index 7c0d97a..d91def8 100644 --- a/dlls/d3drm/frame.c +++ b/dlls/d3drm/frame.c @@ -939,23 +939,13 @@ static HRESULT WINAPI IDirect3DRMFrame3Impl_QueryInterface(IDirect3DRMFrame3* if static ULONG WINAPI IDirect3DRMFrame3Impl_AddRef(IDirect3DRMFrame3* iface) { IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface); - - TRACE("(%p)\n", This); - - return InterlockedIncrement(&This->ref); + return IDirect3DRMFrame2_AddRef(&This->IDirect3DRMFrame2_iface); } static ULONG WINAPI IDirect3DRMFrame3Impl_Release(IDirect3DRMFrame3* iface) { IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface); - ULONG ref = InterlockedDecrement(&This->ref); - - TRACE("(%p)\n", This); - - if (!ref) - HeapFree(GetProcessHeap(), 0, This); - - return ref; + return IDirect3DRMFrame2_Release(&This->IDirect3DRMFrame2_iface); } /*** IDirect3DRMObject methods ***/
1
0
0
0
André Hentschel : comctl32: Test and fix WM_GETTEXTLENGTH for statusbars.
by Alexandre Julliard
23 Jan '12
23 Jan '12
Module: wine Branch: master Commit: 80d9017e037b580e7736cf984151da3a89005403 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=80d9017e037b580e7736cf984…
Author: André Hentschel <nerv(a)dawncrow.de> Date: Fri Jan 20 19:33:10 2012 +0100 comctl32: Test and fix WM_GETTEXTLENGTH for statusbars. --- dlls/comctl32/status.c | 2 +- dlls/comctl32/tests/status.c | 18 +++++++++++++----- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/dlls/comctl32/status.c b/dlls/comctl32/status.c index 43b65aa..19d671d 100644 --- a/dlls/comctl32/status.c +++ b/dlls/comctl32/status.c @@ -1284,7 +1284,7 @@ StatusWindowProc (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) return STATUSBAR_WMGetText (infoPtr, (INT)wParam, (LPWSTR)lParam); case WM_GETTEXTLENGTH: - return STATUSBAR_GetTextLength (infoPtr, 0); + return LOWORD(STATUSBAR_GetTextLength (infoPtr, 0)); case WM_LBUTTONDBLCLK: return STATUSBAR_SendMouseNotify(infoPtr, NM_DBLCLK, msg, wParam, lParam); diff --git a/dlls/comctl32/tests/status.c b/dlls/comctl32/tests/status.c index 6e5a3e7..d8b3dbe 100644 --- a/dlls/comctl32/tests/status.c +++ b/dlls/comctl32/tests/status.c @@ -267,11 +267,11 @@ static void test_status_control(void) /* Divide into parts and set text */ r = SendMessage(hWndStatus, SB_SETPARTS, 3, (LPARAM)nParts); expect(TRUE,r); - r = SendMessage(hWndStatus, SB_SETTEXT, 0, (LPARAM)"First"); + r = SendMessage(hWndStatus, SB_SETTEXT, SBT_POPOUT|0, (LPARAM)"First"); expect(TRUE,r); - r = SendMessage(hWndStatus, SB_SETTEXT, 1, (LPARAM)"Second"); + r = SendMessage(hWndStatus, SB_SETTEXT, SBT_OWNERDRAW|1, (LPARAM)"Second"); expect(TRUE,r); - r = SendMessage(hWndStatus, SB_SETTEXT, 2, (LPARAM)"Third"); + r = SendMessage(hWndStatus, SB_SETTEXT, SBT_NOBORDERS|2, (LPARAM)"Third"); expect(TRUE,r); /* Get RECT Information */ @@ -287,13 +287,21 @@ static void test_status_control(void) r = SendMessage(hWndStatus, SB_GETRECT, 3, (LPARAM)&rc); expect(FALSE,r); /* Get text length and text */ + r = SendMessage(hWndStatus, SB_GETTEXTLENGTH, 0, 0); + expect(5,LOWORD(r)); + expect(SBT_POPOUT,HIWORD(r)); + r = SendMessageW(hWndStatus, WM_GETTEXTLENGTH, 0, 0); + ok(r == 5 || broken(0x02000005 /* NT4 */), "Expected 5, got %d\n", r); + r = SendMessage(hWndStatus, SB_GETTEXTLENGTH, 1, 0); + expect(0,LOWORD(r)); + expect(SBT_OWNERDRAW,HIWORD(r)); r = SendMessage(hWndStatus, SB_GETTEXTLENGTH, 2, 0); expect(5,LOWORD(r)); - expect(0,HIWORD(r)); + expect(SBT_NOBORDERS,HIWORD(r)); r = SendMessage(hWndStatus, SB_GETTEXT, 2, (LPARAM) charArray); ok(strcmp(charArray,"Third") == 0, "Expected Third, got %s\n", charArray); expect(5,LOWORD(r)); - expect(0,HIWORD(r)); + expect(SBT_NOBORDERS,HIWORD(r)); /* Get parts and borders */ r = SendMessage(hWndStatus, SB_GETPARTS, 3, (LPARAM)checkParts);
1
0
0
0
André Hentschel : po: Update German translation.
by Alexandre Julliard
23 Jan '12
23 Jan '12
Module: wine Branch: master Commit: 861d475839cb892e25e7ded872a43d7099e7130e URL:
http://source.winehq.org/git/wine.git/?a=commit;h=861d475839cb892e25e7ded87…
Author: André Hentschel <nerv(a)dawncrow.de> Date: Fri Jan 20 19:44:31 2012 +0100 po: Update German translation. --- po/de.po | 14 +++++++------- 1 files changed, 7 insertions(+), 7 deletions(-) diff --git a/po/de.po b/po/de.po index 0b95e35..9373eb9 100644 --- a/po/de.po +++ b/po/de.po @@ -5,7 +5,7 @@ msgstr "" "Project-Id-Version: Wine\n" "Report-Msgid-Bugs-To:
http://bugs.winehq.org\n
" "POT-Creation-Date: N/A\n" -"PO-Revision-Date: 2012-01-18 21:56+0100\n" +"PO-Revision-Date: 2012-01-20 19:43+0100\n" "Last-Translator: André Hentschel\n" "Language-Team: none\n" "Language: German\n" @@ -1311,19 +1311,19 @@ msgstr "Zertifizierungsstellen Emittent" #: crypt32.rc:57 msgid "Certification Template Name" -msgstr "Zertifikationsvorlagenname" +msgstr "Zertifizierungsvorlagenname" #: crypt32.rc:58 msgid "Certificate Type" -msgstr "Zertifikationstyp" +msgstr "Zertifikatstyp" #: crypt32.rc:59 msgid "Certificate Manifold" -msgstr "Zertifikationsvervielfältigung" +msgstr "Zertifikatsvervielfältigung" #: crypt32.rc:60 msgid "Netscape Cert Type" -msgstr "Netscape Zertifikationstyp" +msgstr "Netscape Zertifikatstyp" #: crypt32.rc:61 msgid "Netscape Base URL" @@ -1339,7 +1339,7 @@ msgstr "Netscape CA Sperrungs-URL" #: crypt32.rc:64 msgid "Netscape Cert Renewal URL" -msgstr "Netscape Zertifikationserneuerungs-URL" +msgstr "Netscape Zertifikatserneuerungs-URL" #: crypt32.rc:65 msgid "Netscape CA Policy URL" @@ -1467,7 +1467,7 @@ msgstr "Richtlinieneinschränkungen" #: crypt32.rc:96 msgid "Cross-Certificate Distribution Points" -msgstr "Verteilungspunkte für Kreuzzertifikate" +msgstr "Zertifikatsübergreifende Verteilungspunkte" #: crypt32.rc:97 msgid "Application Policies"
1
0
0
0
Eric Pouech : dbghelp: In x86-64 support code, fix RUNTIME_FUNCTION dumping .
by Alexandre Julliard
23 Jan '12
23 Jan '12
Module: wine Branch: master Commit: 7c2a5e184d559520d59dd543661d834680d158d2 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=7c2a5e184d559520d59dd5436…
Author: Eric Pouech <eric.pouech(a)orange.fr> Date: Sun Jan 22 13:00:12 2012 +0100 dbghelp: In x86-64 support code, fix RUNTIME_FUNCTION dumping. --- dlls/dbghelp/cpu_x86_64.c | 61 +++++++++++++++++++++++++++++--------------- 1 files changed, 40 insertions(+), 21 deletions(-) diff --git a/dlls/dbghelp/cpu_x86_64.c b/dlls/dbghelp/cpu_x86_64.c index 160590d..8b101d2 100644 --- a/dlls/dbghelp/cpu_x86_64.c +++ b/dlls/dbghelp/cpu_x86_64.c @@ -2,7 +2,7 @@ * File cpu_x86_64.c * * Copyright (C) 1999, 2005 Alexandre Julliard - * Copyright (C) 2009 Eric Pouech. + * Copyright (C) 2009, 2011 Eric Pouech. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -125,39 +125,45 @@ union handler_data ULONG handler; }; -static void dump_unwind_info(HANDLE hProcess, ULONG64 base, RUNTIME_FUNCTION *function) +static void dump_unwind_info(struct cpu_stack_walk* csw, ULONG64 base, RUNTIME_FUNCTION *function) { static const char * const reg_names[16] = { "rax", "rcx", "rdx", "rbx", "rsp", "rbp", "rsi", "rdi", "r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15" }; - union handler_data *handler_data; + union handler_data handler_data; char buffer[sizeof(UNWIND_INFO) + 256 * sizeof(UNWIND_CODE)]; UNWIND_INFO* info = (UNWIND_INFO*)buffer; unsigned int i, count; - SIZE_T r; + RUNTIME_FUNCTION snext; + ULONG64 addr; TRACE("**** func %x-%x\n", function->BeginAddress, function->EndAddress); for (;;) { if (function->UnwindData & 1) { -#if 0 - RUNTIME_FUNCTION *next = (RUNTIME_FUNCTION*)((char*)base + (function->UnwindData & ~1)); + if (!sw_read_mem(csw, base + function->UnwindData, &snext, sizeof(snext))) + { + TRACE("Couldn't unwind RUNTIME_INFO\n"); + return; + } TRACE("unwind info for function %p-%p chained to function %p-%p\n", (char*)base + function->BeginAddress, (char*)base + function->EndAddress, - (char*)base + next->BeginAddress, (char*)base + next->EndAddress); - function = next; + (char*)base + snext.BeginAddress, (char*)base + snext.EndAddress); + function = &snext; continue; -#else - FIXME("NOT SUPPORTED\n"); -#endif } - ReadProcessMemory(hProcess, (char*)base + function->UnwindData, info, sizeof(*info), &r); - ReadProcessMemory(hProcess, (char*)base + function->UnwindData + FIELD_OFFSET(UNWIND_INFO, UnwindCode), - info->UnwindCode, 256 * sizeof(UNWIND_CODE), &r); + addr = base + function->UnwindData; + if (!sw_read_mem(csw, addr, info, FIELD_OFFSET(UNWIND_INFO, UnwindCode)) || + !sw_read_mem(csw, addr + FIELD_OFFSET(UNWIND_INFO, UnwindCode), + info->UnwindCode, info->CountOfCodes * sizeof(UNWIND_CODE))) + { + FIXME("couldn't read memory for UNWIND_INFO\n"); + return; + } TRACE("unwind info at %p flags %x prolog 0x%x bytes function %p-%p\n", - info, info->Flags, info->SizeOfProlog, + (char*)addr, info->Flags, info->SizeOfProlog, (char*)base + function->BeginAddress, (char*)base + function->EndAddress); if (info->FrameRegister) @@ -222,18 +228,31 @@ static void dump_unwind_info(HANDLE hProcess, ULONG64 base, RUNTIME_FUNCTION *fu } } - handler_data = (union handler_data*)&info->UnwindCode[(info->CountOfCodes + 1) & ~1]; + addr += FIELD_OFFSET(UNWIND_INFO, UnwindCode) + + ((info->CountOfCodes + 1) & ~1) * sizeof(UNWIND_CODE); if (info->Flags & UNW_FLAG_CHAININFO) { + if (!sw_read_mem(csw, addr, &handler_data, sizeof(handler_data.chain))) + { + FIXME("couldn't read memory for handler_data.chain\n"); + return; + } TRACE(" chained to function %p-%p\n", - (char*)base + handler_data->chain.BeginAddress, - (char*)base + handler_data->chain.EndAddress); - function = &handler_data->chain; + (char*)base + handler_data.chain.BeginAddress, + (char*)base + handler_data.chain.EndAddress); + function = &handler_data.chain; continue; } if (info->Flags & (UNW_FLAG_EHANDLER | UNW_FLAG_UHANDLER)) + { + if (!sw_read_mem(csw, addr, &handler_data, sizeof(handler_data.handler))) + { + FIXME("couldn't read memory for handler_data.handler\n"); + return; + } TRACE(" handler %p data at %p\n", - (char*)base + handler_data->handler, &handler_data->handler + 1); + (char*)base + handler_data.handler, (char*)addr + sizeof(handler_data.handler)); + } break; } } @@ -448,7 +467,7 @@ static BOOL interpret_function_table_entry(struct cpu_stack_walk* csw, /* FIXME: we have some assumptions here */ assert(context); - dump_unwind_info(csw->hProcess, sw_module_base(csw, context->Rip), function); + dump_unwind_info(csw, sw_module_base(csw, context->Rip), function); newframe = context->Rsp; for (;;) {
1
0
0
0
Eric Pouech : dbghelp: On x86-64 CPUs, add capability to interpret properly the epilog part.
by Alexandre Julliard
23 Jan '12
23 Jan '12
Module: wine Branch: master Commit: 2ed88d7ac2cf5b2962c812e0673da67d99ddc077 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=2ed88d7ac2cf5b2962c812e06…
Author: Eric Pouech <eric.pouech(a)orange.fr> Date: Sun Jan 22 13:00:06 2012 +0100 dbghelp: On x86-64 CPUs, add capability to interpret properly the epilog part. --- dlls/dbghelp/cpu_x86_64.c | 79 +++++++++++++++++++++++++++++++++++++++++++- 1 files changed, 77 insertions(+), 2 deletions(-) diff --git a/dlls/dbghelp/cpu_x86_64.c b/dlls/dbghelp/cpu_x86_64.c index 6288d38..160590d 100644 --- a/dlls/dbghelp/cpu_x86_64.c +++ b/dlls/dbghelp/cpu_x86_64.c @@ -349,6 +349,82 @@ static BOOL is_inside_epilog(struct cpu_stack_walk* csw, DWORD64 pc) } } +static BOOL interpret_epilog(struct cpu_stack_walk* csw, ULONG64 pc, CONTEXT *context ) +{ + BYTE insn, val8; + WORD val16; + LONG val32; + DWORD64 val64; + + for (;;) + { + BYTE rex = 0; + + if (!sw_read_mem(csw, pc, &insn, 1)) return FALSE; + if ((insn & 0xf0) == 0x40) + { + rex = insn & 0x0f; /* rex prefix */ + if (!sw_read_mem(csw, ++pc, &insn, 1)) return FALSE; + } + + switch (insn) + { + case 0x58: /* pop %rax/r8 */ + case 0x59: /* pop %rcx/r9 */ + case 0x5a: /* pop %rdx/r10 */ + case 0x5b: /* pop %rbx/r11 */ + case 0x5c: /* pop %rsp/r12 */ + case 0x5d: /* pop %rbp/r13 */ + case 0x5e: /* pop %rsi/r14 */ + case 0x5f: /* pop %rdi/r15 */ + if (!sw_read_mem(csw, context->Rsp, &val64, sizeof(DWORD64))) return FALSE; + set_int_reg(context, insn - 0x58 + (rex & 1) * 8, val64); + context->Rsp += sizeof(ULONG64); + pc++; + continue; + case 0x81: /* add $nnnn,%rsp */ + if (!sw_read_mem(csw, pc + 2, &val32, sizeof(ULONG))) return FALSE; + context->Rsp += (LONG)val32; + pc += 2 + sizeof(LONG); + continue; + case 0x83: /* add $n,%rsp */ + if (!sw_read_mem(csw, pc + 2, &val8, sizeof(BYTE))) return FALSE; + context->Rsp += (signed char)val8; + pc += 3; + continue; + case 0x8d: + if (!sw_read_mem(csw, pc + 1, &insn, sizeof(BYTE))) return FALSE; + if ((insn >> 6) == 1) /* lea n(reg),%rsp */ + { + if (!sw_read_mem(csw, pc + 2, &val8, sizeof(BYTE))) return FALSE; + context->Rsp = get_int_reg( context, (insn & 7) + (rex & 1) * 8 ) + (signed char)val8; + pc += 3; + } + else /* lea nnnn(reg),%rsp */ + { + if (!sw_read_mem(csw, pc + 2, &val32, sizeof(ULONG))) return FALSE; + context->Rsp = get_int_reg( context, (insn & 7) + (rex & 1) * 8 ) + (LONG)val32; + pc += 2 + sizeof(LONG); + } + continue; + case 0xc2: /* ret $nn */ + if (!sw_read_mem(csw, context->Rsp, &val64, sizeof(DWORD64))) return FALSE; + if (!sw_read_mem(csw, pc + 1, &val16, sizeof(WORD))) return FALSE; + context->Rip = val64; + context->Rsp += sizeof(ULONG64) + val16; + return TRUE; + case 0xc3: /* ret */ + if (!sw_read_mem(csw, context->Rsp, &val64, sizeof(DWORD64))) return FALSE; + context->Rip = val64; + context->Rsp += sizeof(ULONG64); + return TRUE; + /* FIXME: add various jump instructions */ + } + FIXME("unsupported insn %x\n", insn); + return FALSE; + } +} + static BOOL default_unwind(struct cpu_stack_walk* csw, CONTEXT* context) { if (!sw_read_mem(csw, context->Rsp, &context->Rip, sizeof(DWORD64))) @@ -404,8 +480,7 @@ static BOOL interpret_function_table_entry(struct cpu_stack_walk* csw, prolog_offset = ~0; if (is_inside_epilog(csw, context->Rip)) { - FIXME("epilog management not fully done\n"); - /* interpret_epilog((const BYTE*)frame->AddrPC.Offset, context); */ + interpret_epilog(csw, context->Rip, context); return TRUE; } }
1
0
0
0
← Newer
1
...
24
25
26
27
28
29
30
...
98
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
Results per page:
10
25
50
100
200