HyperDbg Debugger
Loading...
Searching...
No Matches
GlobalVariables.h File Reference

Definition for global variables. More...

Go to the source code of this file.

Variables

HYPERTRACE_CALLBACKS g_Callbacks
 List of callbacks.
BOOLEAN g_HyperTraceCallbacksInitialized
 The flag indicating whether the hypertrace module callbacks is initialized or not.
BOOLEAN g_RunningOnHypervisorEnvironment
 The flag indicating whether the initialization is being done for hypervisor environment or not.
BOOLEAN g_ArchBasedLastBranchRecord
 The flag indicating whether the architectural LBR is supported by the CPU or not if false it means the legacy LBR is supported.
BOOLEAN g_LastBranchRecordEnabled
 The flag indicating whether the hypertrace LBR tracing is initialized or not.
LBR_STACK_ENTRYg_LbrStateList
 This will be a dynamically allocated array to hold LBR states for each core.
ULONGLONG g_LbrCapacity
 The global variable to hold the LBR capacity of the current CPU.
CPUID28_LEAFS g_Cpuid28Leafs
 The global variable to hold CPUID leaf 0x28 information (Architectural LBR Enumeration Leaf).
UINT64 g_LbrFilterOptions
 The global variable to hold the current LBR filter options bitmask (for both architectural and legacy LBR).
BOOLEAN g_ProcessorTraceEnabled
 The flag indicating whether the hypertrace Processor Trace is initialized or not.
PT_PER_CPUg_PtStateList
 Dynamically allocated array of per-CPU Intel PT state. Sized to KeQueryActiveProcessorCount(0) at hypertrace init.
PT_USER_MAPPING g_PtUserMappings [PT_MAX_CPUS_FOR_MMAP]
 Per-CPU MDL + user-mode VA for the PT mmap surface (main output buffer concatenated with the 4 KB overflow page in a single contiguous user mapping). Populated by PtMmapAllCpuBuffersToUser, torn down by PtUnmapAllCpuBuffersFromUser. The user VAs are only valid in the address space of the process that called the mmap IOCTL — see HYPERTRACE_PT_MMAP_PACKETS for the contract.
BOOLEAN g_PtUserMappingsActive
 Set while g_PtUserMappings holds live user mappings; cleared by PtUnmapAllCpuBuffersFromUser.

Detailed Description

Definition for global variables.

Author
Sina Karvandi (sina@.nosp@m.hype.nosp@m.rdbg..nosp@m.org)
Version
0.19
Date
2026-04-19

Variable Documentation

◆ g_ArchBasedLastBranchRecord

BOOLEAN g_ArchBasedLastBranchRecord

The flag indicating whether the architectural LBR is supported by the CPU or not if false it means the legacy LBR is supported.

◆ g_Callbacks

HYPERTRACE_CALLBACKS g_Callbacks

List of callbacks.

◆ g_Cpuid28Leafs

CPUID28_LEAFS g_Cpuid28Leafs

The global variable to hold CPUID leaf 0x28 information (Architectural LBR Enumeration Leaf).

◆ g_HyperTraceCallbacksInitialized

BOOLEAN g_HyperTraceCallbacksInitialized

The flag indicating whether the hypertrace module callbacks is initialized or not.

◆ g_LastBranchRecordEnabled

BOOLEAN g_LastBranchRecordEnabled

The flag indicating whether the hypertrace LBR tracing is initialized or not.

◆ g_LbrCapacity

ULONGLONG g_LbrCapacity

The global variable to hold the LBR capacity of the current CPU.

◆ g_LbrFilterOptions

UINT64 g_LbrFilterOptions

The global variable to hold the current LBR filter options bitmask (for both architectural and legacy LBR).

◆ g_LbrStateList

LBR_STACK_ENTRY* g_LbrStateList

This will be a dynamically allocated array to hold LBR states for each core.

◆ g_ProcessorTraceEnabled

BOOLEAN g_ProcessorTraceEnabled

The flag indicating whether the hypertrace Processor Trace is initialized or not.

◆ g_PtStateList

PT_PER_CPU* g_PtStateList

Dynamically allocated array of per-CPU Intel PT state. Sized to KeQueryActiveProcessorCount(0) at hypertrace init.

◆ g_PtUserMappings

Per-CPU MDL + user-mode VA for the PT mmap surface (main output buffer concatenated with the 4 KB overflow page in a single contiguous user mapping). Populated by PtMmapAllCpuBuffersToUser, torn down by PtUnmapAllCpuBuffersFromUser. The user VAs are only valid in the address space of the process that called the mmap IOCTL — see HYPERTRACE_PT_MMAP_PACKETS for the contract.

◆ g_PtUserMappingsActive

BOOLEAN g_PtUserMappingsActive

Set while g_PtUserMappings holds live user mappings; cleared by PtUnmapAllCpuBuffersFromUser.

◆ g_RunningOnHypervisorEnvironment

BOOLEAN g_RunningOnHypervisorEnvironment

The flag indicating whether the initialization is being done for hypervisor environment or not.