HyperDbg Debugger
Loading...
Searching...
No Matches
TraceApi.h
Go to the documentation of this file.
1
11#pragma once
12
14// Functions //
16
17//
18// Most of the functions are defined and exported
19//
20
22// Platform Wrappers //
24
25#define xrdmsr(msr, pval) (*(pval) = CpuReadMsr(msr))
26#define xwrmsr(msr, val) (msr, val)
27
28// CPUID (Fixed C6001: initialized CpuInfo)
29#define xcpuid(code, a, b, c, d) \
30 { \
31 int CpuInfo[4] = {0}; \
32 CpuCpuId(CpuInfo, code); \
33 *a = CpuInfo[0]; \
34 *b = CpuInfo[1]; \
35 *c = CpuInfo[2]; \
36 *d = CpuInfo[3]; \
37 }
38
39#define xcpuidex(code, subleaf, a, b, c, d) \
40 { \
41 int CpuInfo[4] = {0}; \
42 CpuCpuIdEx(CpuInfo, code, subleaf); \
43 *a = CpuInfo[0]; \
44 *b = CpuInfo[1]; \
45 *c = CpuInfo[2]; \
46 *d = CpuInfo[3]; \
47 }