Module: wine Branch: master Commit: 37ded7380e6e79f52ecb01c9f3d284bb51376a6e URL: https://gitlab.winehq.org/wine/wine/-/commit/37ded7380e6e79f52ecb01c9f3d284b...
Author: Alexandre Julliard julliard@winehq.org Date: Mon Mar 11 16:52:50 2024 +0100
ntdll: Implement RtlWalkFrameChain on i386.
---
dlls/ntdll/signal_i386.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+)
diff --git a/dlls/ntdll/signal_i386.c b/dlls/ntdll/signal_i386.c index 178848cd7ca..cade0c973c2 100644 --- a/dlls/ntdll/signal_i386.c +++ b/dlls/ntdll/signal_i386.c @@ -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.@) */