Commit f5a8ed47 authored by Rémi Bernon's avatar Rémi Bernon Committed by Alexandre Julliard

ntdll: Leave some space around DbgBreakPoint and DbgUserBreakPoint.

CoD: Black Ops 3 and CoD: WWII modify these (and several others) and expect to have enough space for a few instructions. It then verifies later that the patches are still in place, and terminates if the byte sequence do not match. Having small symbols can make the patches to overlap and the check to fail. Signed-off-by: 's avatarRémi Bernon <rbernon@codeweavers.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent 438abad2
......@@ -1358,12 +1358,16 @@ USHORT WINAPI RtlCaptureStackBackTrace( ULONG skip, ULONG count, PVOID *buffer,
/**********************************************************************
* DbgBreakPoint (NTDLL.@)
*/
__ASM_STDCALL_FUNC( DbgBreakPoint, 0, "brk #0; ret")
__ASM_STDCALL_FUNC( DbgBreakPoint, 0, "brk #0; ret"
"\n\tnop; nop; nop; nop; nop; nop; nop; nop"
"\n\tnop; nop; nop; nop; nop; nop" );
/**********************************************************************
* DbgUserBreakPoint (NTDLL.@)
*/
__ASM_STDCALL_FUNC( DbgUserBreakPoint, 0, "brk #0; ret")
__ASM_STDCALL_FUNC( DbgUserBreakPoint, 0, "brk #0; ret"
"\n\tnop; nop; nop; nop; nop; nop; nop; nop"
"\n\tnop; nop; nop; nop; nop; nop" );
/**********************************************************************
* NtCurrentTeb (NTDLL.@)
......
......@@ -555,12 +555,16 @@ USHORT WINAPI RtlCaptureStackBackTrace( ULONG skip, ULONG count, PVOID *buffer,
/**********************************************************************
* DbgBreakPoint (NTDLL.@)
*/
__ASM_STDCALL_FUNC( DbgBreakPoint, 0, "int $3; ret")
__ASM_STDCALL_FUNC( DbgBreakPoint, 0, "int $3; ret"
"\n\tnop; nop; nop; nop; nop; nop; nop; nop"
"\n\tnop; nop; nop; nop; nop; nop" );
/**********************************************************************
* DbgUserBreakPoint (NTDLL.@)
*/
__ASM_STDCALL_FUNC( DbgUserBreakPoint, 0, "int $3; ret")
__ASM_STDCALL_FUNC( DbgUserBreakPoint, 0, "int $3; ret"
"\n\tnop; nop; nop; nop; nop; nop; nop; nop"
"\n\tnop; nop; nop; nop; nop; nop" );
/**********************************************************************
* NtCurrentTeb (NTDLL.@)
......
......@@ -2751,11 +2751,15 @@ USHORT WINAPI RtlCaptureStackBackTrace( ULONG skip, ULONG count, PVOID *buffer,
/**********************************************************************
* DbgBreakPoint (NTDLL.@)
*/
__ASM_STDCALL_FUNC( DbgBreakPoint, 0, "int $3; ret")
__ASM_STDCALL_FUNC( DbgBreakPoint, 0, "int $3; ret"
"\n\tnop; nop; nop; nop; nop; nop; nop; nop"
"\n\tnop; nop; nop; nop; nop; nop" );
/**********************************************************************
* DbgUserBreakPoint (NTDLL.@)
*/
__ASM_STDCALL_FUNC( DbgUserBreakPoint, 0, "int $3; ret")
__ASM_STDCALL_FUNC( DbgUserBreakPoint, 0, "int $3; ret"
"\n\tnop; nop; nop; nop; nop; nop; nop; nop"
"\n\tnop; nop; nop; nop; nop; nop" );
#endif /* __x86_64__ */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment