WindowsXP-SP1/base/ntdll/frame.c

58 lines
813 B
C
Raw Permalink Normal View History

2001-01-01 00:00:00 +01:00
/*++
Copyright (c) 1989 Microsoft Corporation
Module Name:
frame.c
Abstract:
Code to set/restore the active frame pointer in the TEB for
additional debugging assistance.
Author:
Michael Grier (mgrier) 3/2/2001
Revision History:
--*/
#include <nt.h>
#include <ntrtl.h>
#include <nturtl.h>
NTSYSAPI
VOID
NTAPI
RtlPushFrame(
IN PTEB_ACTIVE_FRAME Frame
)
{
const PTEB Teb = NtCurrentTeb();
Frame->Previous = Teb->ActiveFrame;
Teb->ActiveFrame = Frame;
}
NTSYSAPI
VOID
NTAPI
RtlPopFrame(
IN PTEB_ACTIVE_FRAME Frame
)
{
const PTEB Teb = NtCurrentTeb();
Teb->ActiveFrame = Frame->Previous;
}
NTSYSAPI
PTEB_ACTIVE_FRAME
NTAPI
RtlGetFrame(
VOID
)
{
return NtCurrentTeb()->ActiveFrame;
}