RtlLookupFunctionEntry function
Searches the active function tables for an entry that corresponds to the specified PC value.
Syntax
PVOID WINAPI RtlLookupFunctionEntry( _In_ ULONGLONG ControlPc, _Out_ PULONGLONG ImageBase, _Out_ PULONGLONG TargetGp );
Parameters
- ControlPc [in]
-
The virtual address of an instruction bundle within the function.
- ImageBase [out]
-
The base address of module to which the function belongs.
- TargetGp [out]
-
The global pointer value of the module.
This parameter has a different declaration on x64 and ARM systems. For more information, see x64 Definition and ARM Definition.
Return value
If there is no entry in the function table for the specified PC, the function returns NULL. Otherwise, the function returns the address of the function table entry that corresponds to the specified PC.
x64 Definition
This function is declared as follows:
PRUNTIME_FUNCTION WINAPI RtlLookupFunctionEntry (
_In_ DWORD64 ControlPc,
_Out_ PDWORD64 ImageBase,
_Inout_opt_ PUNWIND_HISTORY_TABLE HistoryTable
);
#define UNWIND_HISTORY_TABLE_SIZE 12
typedef struct _UNWIND_HISTORY_TABLE_ENTRY {
ULONG64 ImageBase;
PRUNTIME_FUNCTION FunctionEntry;
} UNWIND_HISTORY_TABLE_ENTRY, *PUNWIND_HISTORY_TABLE_ENTRY;
typedef struct _UNWIND_HISTORY_TABLE {
ULONG Count;
UCHAR Search;
ULONG64 LowAddress;
ULONG64 HighAddress;
UNWIND_HISTORY_TABLE_ENTRY Entry[UNWIND_HISTORY_TABLE_SIZE];
} UNWIND_HISTORY_TABLE, *PUNWIND_HISTORY_TABLE;
ARM Definition
This function is declared as follows:
PRUNTIME_FUNCTION WINAPI RtlLookupFunctionEntry(
_In_ ULONG_PTR ControlPc,
_Out_ PDWORD ImageBase,
_Inout_opt_ PUNWIND_HISTORY_TABLE HistoryTable
);
#define UNWIND_HISTORY_TABLE_SIZE 12
typedef struct _UNWIND_HISTORY_TABLE_ENTRY {
DWORD ImageBase;
PRUNTIME_FUNCTION FunctionEntry;
} UNWIND_HISTORY_TABLE_ENTRY, *PUNWIND_HISTORY_TABLE_ENTRY;
typedef struct _UNWIND_HISTORY_TABLE {
DWORD Count;
BYTE LocalHint;
BYTE GlobalHint;
BYTE Search;
BYTE Once;
DWORD LowAddress;
DWORD HighAddress;
UNWIND_HISTORY_TABLE_ENTRY Entry[UNWIND_HISTORY_TABLE_SIZE];
} UNWIND_HISTORY_TABLE, *PUNWIND_HISTORY_TABLE;
Requirements
|
Product |
Windows XP Professional x64 Edition or 64-bit editions of Windows Server 2003 |
|---|---|
|
Header |
|
|
Library |
|
|
DLL |
|
See also