From 3a68b28c13bee1040de2a54084d5581fb4642920 Mon Sep 17 00:00:00 2001 From: EnderIce2 Date: Mon, 18 Nov 2024 04:07:08 +0200 Subject: [PATCH] memory: Add more debug messages for CoW related functions --- core/memory/vma.cpp | 2 ++ syscalls/linux.cpp | 1 + 2 files changed, 3 insertions(+) diff --git a/core/memory/vma.cpp b/core/memory/vma.cpp index acb72e5..a315533 100644 --- a/core/memory/vma.cpp +++ b/core/memory/vma.cpp @@ -168,7 +168,9 @@ namespace Memory return (void *)-EPERM; } + debug("unmapping %#lx-%#lx", Address, (uintptr_t)Address + Length); vmm.Unmap(Address, Length); + debug("mapping cow at %#lx-%#lx", Address, (uintptr_t)Address + Length); vmm.Map(Address, nullptr, Length, PTFlag::CoW); debug("CoW region created at range %#lx-%#lx for pt %#lx", Address, (uintptr_t)Address + Length, this->Table); diff --git a/syscalls/linux.cpp b/syscalls/linux.cpp index 4bf6326..d249b4b 100644 --- a/syscalls/linux.cpp +++ b/syscalls/linux.cpp @@ -1023,6 +1023,7 @@ static void *linux_mmap(SysFrm *, void *addr, size_t length, int prot, void *ret = vma->CreateCoWRegion(addr, length, p_Read, p_Write, p_Exec, m_Fixed, m_Shared); + debug("ret: %#lx", ret); return (void *)ret; } #undef __FENNIX_KERNEL_SYSCALLS_LIST_H__