1
0
Fork 0
mirror of synced 2025-03-07 03:53:26 +01:00

ntdll: Implement RtlWalkFrameChain on i386.

This commit is contained in:
Alexandre Julliard 2024-03-11 16:52:50 +01:00
parent f127448d00
commit 37ded7380e

View file

@ -451,6 +451,29 @@ __ASM_STDCALL_FUNC( RtlRaiseException, 4,
"ret $4" ) /* actually never returns */
/*************************************************************************
* RtlWalkFrameChain (NTDLL.@)
*/
ULONG WINAPI RtlWalkFrameChain( void **buffer, ULONG count, ULONG flags )
{
CONTEXT context;
ULONG *frame;
ULONG i, skip = flags >> 8, pos = 0;
RtlCaptureContext( &context );
for (i = 0; i < count; i++)
{
if (!is_valid_frame( context.Ebp )) break;
if (i >= skip) buffer[pos++] = (void *)context.Eip;
frame = (ULONG *)context.Ebp;
context.Ebp = frame[0];
context.Eip = frame[1];
}
return pos;
}
/*************************************************************************
* RtlCaptureStackBackTrace (NTDLL.@)
*/