From a7c38cb9972e7ff4734f2b49f3ce296c87241932 Mon Sep 17 00:00:00 2001 From: Jonas 'Sortie' Termansen Date: Fri, 2 Mar 2012 00:09:08 +0100 Subject: [PATCH] Improved bad currentdir variable panic message. --- sortix/x86-family/memorymanagement.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sortix/x86-family/memorymanagement.cpp b/sortix/x86-family/memorymanagement.cpp index 414c5d0b..5fed13a1 100644 --- a/sortix/x86-family/memorymanagement.cpp +++ b/sortix/x86-family/memorymanagement.cpp @@ -291,10 +291,12 @@ namespace Sortix addr_t SwitchAddressSpace(addr_t addrspace) { + // Have fun debugging this. if ( currentdir != Page::AlignDown(currentdir) ) { - PanicF("Attempted to switch to address space 0x%zx, but it " - "wasn't page aligned!", currentdir); + PanicF("The variable containing the current address space " + "contains garbage all of sudden: it isn't page-aligned. " + "It contains the value 0x%zx.", currentdir); } // Don't switch if we are already there.