HyperDbg Debugger
Loading...
Searching...
No Matches
Idt.c File Reference

Routines for Interrupt Descriptor Table. More...

#include "pch.h"

Functions

VOID IdtDumpInterruptEntries ()
 Dump IDT Table based on current core.

Detailed Description

Routines for Interrupt Descriptor Table.

Author
Sina Karvandi (sina@.nosp@m.hype.nosp@m.rdbg..nosp@m.org)
Version
0.11
Date
2024-11-20

Function Documentation

◆ IdtDumpInterruptEntries()

VOID IdtDumpInterruptEntries ( )

Dump IDT Table based on current core.

Returns
VOID
22{
23 KDESCRIPTOR64 descr;
24 CpuSidt(&descr.Limit);
25
26 ULONG n = (descr.Limit + 1) / sizeof(KIDTENTRY64);
27
28 if (n > 0)
29 {
30 int i = 0;
31 KIDTENTRY64 * pidte = (KIDTENTRY64 *)descr.Base;
32
33 do
34 {
35 ULONG_PTR addr = ((ULONG_PTR)pidte->OffsetHigh << 32) +
36 ((ULONG_PTR)pidte->OffsetMiddle << 16) + pidte->OffsetLow;
37
38 LogInfo("Interrupt %u -> %p\n", i++, addr);
39
40 } while (pidte++, --n);
41 }
42}
struct _KDESCRIPTOR64 KDESCRIPTOR64
union _KIDTENTRY64 KIDTENTRY64
VOID CpuSidt(VOID *Idtr)
Store Interrupt Descriptor Table Register.
Definition PlatformIntrinsics.c:419
unsigned long ULONG
Definition BasicTypes.h:31
#define LogInfo(format,...)
Define log variables.
Definition HyperDbgHyperLogIntrinsics.h:71
PVOID Base
Definition Idt.h:41
USHORT Limit
Definition Idt.h:40