ntdll: Implement RtlWalkFrameChain on i386.
This commit is contained in:
parent
f127448d00
commit
37ded7380e
1 changed files with 23 additions and 0 deletions
|
@ -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.@)
|
||||
*/
|
||||
|
|
Loading…
Add table
Reference in a new issue