@@ -49,6 +49,15 @@ BOOLEAN g_Verbose = FALSE;
4949#endif
5050
5151
52+ ULONG64 KeNumberProcessorsAddress;
53+ ULONG64 KiProcessorBlockAddress;
54+ ULONG64 ObpRootDirectoryObjectAddress;
55+ ULONG64 ObTypeIndexTableAddress;
56+ ULONG64 ObHeaderCookieAddress;
57+ ULONG64 CmpRegistryRootObjectAddress;
58+ ULONG64 CmpMasterHiveAddress;
59+
60+
5261class EXT_CLASS : public ExtExtension
5362{
5463public:
@@ -137,6 +146,16 @@ class EXT_CLASS : public ExtExtension
137146 " under certain conditions; type `show c' for details.\n " ,
138147 EXT_VERSION, __DATE__);
139148
149+ KeNumberProcessorsAddress = GetExpression (" nt!KeNumberProcessors" );
150+ KiProcessorBlockAddress = GetExpression (" nt!KiProcessorBlock" );
151+
152+ ObpRootDirectoryObjectAddress = GetExpression (" nt!ObpRootDirectoryObject" );
153+ ObTypeIndexTableAddress = GetExpression (" nt!ObTypeIndexTable" );
154+ ObHeaderCookieAddress = GetExpression (" nt!ObHeaderCookie" );
155+
156+ CmpRegistryRootObjectAddress = GetExpression (" nt!CmpRegistryRootObject" );
157+ CmpMasterHiveAddress = GetExpression (" nt!CmpMasterHive" );
158+
140159 DebugControl->Release ();
141160 DebugClient->Release ();
142161
@@ -1648,27 +1667,27 @@ EXT_COMMAND(ms_idt,
16481667 " {base;ed,o;base;Display information for a given idt}" )
16491668{
16501669 ULONG64 IdtBase = GetArgU64 (" base" , FALSE );
1651- vector<IDT_OBJECT> Idts = GetInterrupts (IdtBase);
1670+ vector<IDT_ENTRY> IdtEntries = GetInterrupts (IdtBase);
16521671
16531672 Dml (" |-----|-----|--------------------|--------------------------------------------------------|---------|--------|\n "
16541673 " | <col fg=\" emphfg\" >%-3s</col> | <col fg=\" emphfg\" >%-3s</col> | <col fg=\" emphfg\" >%-18s</col> | <col fg=\" emphfg\" >%-54s</col> | <col fg=\" emphfg\" >%-7s</col> | <col fg=\" emphfg\" >%-6s</col> |\n "
16551674 " |-----|-----|--------------------|--------------------------------------------------------|---------|--------|\n " ,
16561675 " Cre" , " Idx" , " Address" , " Name" , " Patched" , " Hooked" );
16571676
1658- for each (IDT_OBJECT Idt in Idts)
1659- {
1660- UCHAR Name[512 ] = { 0 };
1677+ for each (IDT_ENTRY IdtEntry in IdtEntries) {
1678+
1679+ CHAR Name[MAX_PATH] = {0 };
1680+
1681+ if (IdtEntry.Address ) {
16611682
1662- if (Idt.Entry )
1663- {
16641683 Dml (" | %3d | %3d | <link cmd = \" u 0x%016I64X L5\" >0x%016I64X</link> | %-54s | <col fg=\" changed\" >%-7s</col> | <col fg=\" changed\" >%-6s</col> |\n " ,
1665- Idt .CoreIndex ,
1666- Idt .Index ,
1667- Idt. Entry ,
1668- Idt. Entry ,
1669- GetNameByOffset (Idt. Entry , (PSTR)Name, _countof (Name)),
1670- Idt. Entry ? " " : " " ,
1671- IsPointerHooked (Idt. Entry ) ? " Yes" : " No " );
1684+ IdtEntry .CoreIndex ,
1685+ IdtEntry .Index ,
1686+ IdtEntry. Address ,
1687+ IdtEntry. Address ,
1688+ GetNameByOffset (IdtEntry. Address , (PSTR)Name, _countof (Name)),
1689+ IdtEntry. Address ? " " : " " ,
1690+ IsPointerHooked (IdtEntry. Address ) ? " Yes" : " " );
16721691 }
16731692 }
16741693}
0 commit comments