From 60a5ced394f4c38395f54fa92d322adc2ccc7d6a Mon Sep 17 00:00:00 2001 From: Michael Lotz Date: Sun, 9 Aug 2009 19:54:41 +0000 Subject: [PATCH] Adding a disabled debug helper. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32217 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/system/kernel/arch/x86/arch_vm_translation_map.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/system/kernel/arch/x86/arch_vm_translation_map.cpp b/src/system/kernel/arch/x86/arch_vm_translation_map.cpp index 17149c58b5..59abd88f4c 100644 --- a/src/system/kernel/arch/x86/arch_vm_translation_map.cpp +++ b/src/system/kernel/arch/x86/arch_vm_translation_map.cpp @@ -192,6 +192,15 @@ vm_translation_map_arch_info::Delete() sTMapList.Remove(this); locker.Unlock(); +#if 0 + // this sanity check can be enabled when corruption due to + // overwriting an active page directory is suspected + addr_t activePageDirectory; + read_cr3(activePageDirectory); + if (activePageDirectory == (addr_t)pgdir_phys) + panic("deleting a still active page directory\n"); +#endif + if (are_interrupts_enabled()) delete this; else