UserspaceEmulator: Print PID in mmap nullptr with MAP_FIXED reportln()

This commit is contained in:
Brendan Coles 2021-03-16 06:22:49 +00:00 committed by Andreas Kling
parent cad4cc9a2a
commit fe97aec8c3

View file

@ -750,7 +750,7 @@ u32 Emulator::virt$mmap(u32 params_addr)
else {
// mmap(nullptr, …, MAP_FIXED) is technically okay, but tends to be a bug.
// Therefore, refuse to be helpful.
reportln("\n=={}== \033[31;1mTried to mmap at nullptr with MAP_FIXED.\033[0m, 0x{:x} bytes.", params.size);
reportln("\n=={}== \033[31;1mTried to mmap at nullptr with MAP_FIXED.\033[0m, 0x{:x} bytes.", getpid(), params.size);
dump_backtrace();
}
} else {