Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

57 lines
756 B

/*++
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;
}