Show address in error message

This commit is contained in:
Alex 2023-03-23 23:23:02 +02:00
parent 6c1e2e50a4
commit 6a7e940e80
Signed by untrusted user who does not match committer: enderice2
GPG Key ID: EACC3AD603BAB4DD

View File

@ -152,28 +152,28 @@ namespace Memory
PageMapLevel4 PML4 = this->Table->Entries[Index.PMLIndex]; PageMapLevel4 PML4 = this->Table->Entries[Index.PMLIndex];
if (!PML4.Present) if (!PML4.Present)
{ {
error("Page not present"); error("Page %#lx not present", PML4.GetAddress());
return; return;
} }
PageDirectoryPointerTableEntryPtr *PDPTEPtr = (PageDirectoryPointerTableEntryPtr *)((uintptr_t)PML4.Address << 12); PageDirectoryPointerTableEntryPtr *PDPTEPtr = (PageDirectoryPointerTableEntryPtr *)((uintptr_t)PML4.Address << 12);
PageDirectoryPointerTableEntry PDPTE = PDPTEPtr->Entries[Index.PDPTEIndex]; PageDirectoryPointerTableEntry PDPTE = PDPTEPtr->Entries[Index.PDPTEIndex];
if (!PDPTE.Present) if (!PDPTE.Present)
{ {
error("Page not present"); error("Page %#lx not present", PDPTE.GetAddress());
return; return;
} }
PageDirectoryEntryPtr *PDEPtr = (PageDirectoryEntryPtr *)((uintptr_t)PDPTE.Address << 12); PageDirectoryEntryPtr *PDEPtr = (PageDirectoryEntryPtr *)((uintptr_t)PDPTE.Address << 12);
PageDirectoryEntry PDE = PDEPtr->Entries[Index.PDEIndex]; PageDirectoryEntry PDE = PDEPtr->Entries[Index.PDEIndex];
if (!PDE.Present) if (!PDE.Present)
{ {
error("Page not present"); error("Page %#lx not present", PDE.GetAddress());
return; return;
} }
PageTableEntryPtr *PTEPtr = (PageTableEntryPtr *)((uintptr_t)PDE.Address << 12); PageTableEntryPtr *PTEPtr = (PageTableEntryPtr *)((uintptr_t)PDE.Address << 12);
PageTableEntry PTE = PTEPtr->Entries[Index.PTEIndex]; PageTableEntry PTE = PTEPtr->Entries[Index.PTEIndex];
if (!PTE.Present) if (!PTE.Present)
{ {
error("Page not present"); error("Page %#lx not present", PTE.GetAddress());
return; return;
} }