diff --git a/hyperdbg/hyperhv/header/vmm/vmx/IdtEmulation.h b/hyperdbg/hyperhv/header/vmm/vmx/IdtEmulation.h index 1d4e145c..f6838620 100644 --- a/hyperdbg/hyperhv/header/vmm/vmx/IdtEmulation.h +++ b/hyperdbg/hyperhv/header/vmm/vmx/IdtEmulation.h @@ -32,6 +32,34 @@ // Structures // ////////////////////////////////////////////////// +#pragma pack(push, 1) + +typedef struct _SIDT_ENTRY +{ + USHORT IdtLimit; + ULONG_PTR IdtBase; +} SIDT_ENTRY, *PSIDT_ENTRY; + +typedef struct _KIDT_ENTRY +{ + ULONG LowPart : 16; + ULONG SegmentSelector : 16; + ULONG Reserved1 : 5; + ULONG Reserved2 : 3; + ULONG Type : 3; + ULONG Size : 1; + ULONG Reserved3 : 1; + ULONG Dpl : 2; + ULONG Present : 1; + ULONG HighPart : 16; +#if defined _M_AMD64 + ULONG HighestPart; + ULONG Reserved; +#endif +} KIDT_ENTRY, *PKIDT_ENTRY; + +#pragma pack(pop) + /** * @brief Trap frame for interrupts * diff --git a/hyperdbg/hyperkd/code/debugger/commands/ExtensionCommands.c b/hyperdbg/hyperkd/code/debugger/commands/ExtensionCommands.c index 62592b26..69b23dff 100644 --- a/hyperdbg/hyperkd/code/debugger/commands/ExtensionCommands.c +++ b/hyperdbg/hyperkd/code/debugger/commands/ExtensionCommands.c @@ -80,41 +80,6 @@ ExtensionCommandPerformActionsForApicRequests(PDEBUGGER_APIC_REQUEST ApicRequest } } -/** - * @brief Perform query for IDT entries - * - * @param IdtQueryRequest - * - * @return VOID - */ -#pragma pack(push, 1) - -typedef struct _SIDT_ENTRY -{ - USHORT IdtLimit; - ULONG_PTR IdtBase; -} SIDT_ENTRY, *PSIDT_ENTRY; - -typedef struct _KIDT_ENTRY -{ - ULONG LowPart : 16; - ULONG SegmentSelector : 16; - ULONG Reserved1 : 5; - ULONG Reserved2 : 3; - ULONG Type : 3; - ULONG Size : 1; - ULONG Reserved3 : 1; - ULONG Dpl : 2; - ULONG Present : 1; - ULONG HighPart : 16; -#if defined _M_AMD64 - ULONG HighestPart; - ULONG Reserved; -#endif -} KIDT_ENTRY, *PKIDT_ENTRY; - -#pragma pack(pop) - /** * @brief Perform query for IDT entries * diff --git a/hyperdbg/libhyperdbg/code/debugger/commands/extension-commands/idt.cpp b/hyperdbg/libhyperdbg/code/debugger/commands/extension-commands/idt.cpp index 238b63c0..2c82e182 100644 --- a/hyperdbg/libhyperdbg/code/debugger/commands/extension-commands/idt.cpp +++ b/hyperdbg/libhyperdbg/code/debugger/commands/extension-commands/idt.cpp @@ -165,10 +165,6 @@ CommandIdt(vector CommandTokens, string Command) RtlZeroMemory(IdtPacket, sizeof(INTERRUPT_DESCRIPTOR_TABLE_ENTRIES_PACKETS)); - ///////////////////////////////////////////////////////////// - - //////////////////////////////////////////////////////////// - // // Get the IDT buffer //