[NTOS:KE] Improvements for the Trap02 (NMI) and Trap08 (double-fault) exception handlers.

- Add FRAME_TSS FPO debug information for Trap02 and Trap08.
- Switch the active TSS in Trap08 in the very same way as is done in Trap02.

This allows to correctly debug NMI and double-fault exceptions with WinDbg,
by following the different TSS contexts, as described in:
https://blogs.msdn.microsoft.com/debuggingtoolbox/2008/02/22/special-command-analyzing-and-reconstructing-the-stack-using-the-k-command-and-its-variations/
https://blogs.msdn.microsoft.com/ntdebugging/2009/11/25/part-1-got-stack-no-we-ran-out-of-kernel-mode-stack-and-kv-wont-tell-me-why/
http://www.osronline.com/article.cfm?article=254 and http://www.osronline.com/article.cfm?article=328
This commit is contained in:
Hermès Bélusca-Maïto 2019-02-04 01:16:29 +01:00
parent d15e36a1f1
commit 3c8f19eb21
No known key found for this signature in database
GPG key ID: 3B2539C65E7B93D0
4 changed files with 66 additions and 9 deletions

View file

@ -575,7 +575,7 @@ extern ULONG KeI386CpuStep;
extern ULONG KiFastSystemCallDisable;
extern UCHAR KiDebugRegisterTrapOffsets[9];
extern UCHAR KiDebugRegisterContextOffsets[9];
extern DECLSPEC_NORETURN VOID __cdecl KiTrap02(VOID);
extern VOID __cdecl KiTrap02(VOID);
extern VOID __cdecl KiTrap08(VOID);
extern VOID __cdecl KiTrap13(VOID);
extern VOID __cdecl KiFastCallEntry(VOID);