mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-10 18:10:56 +09:00
Syscall: Use dbg() instead of dbgprintf()
This commit is contained in:
parent
9ee6d00b57
commit
9e520fd0d6
Notes:
sideshowbarker
2024-07-19 09:00:56 +09:00
Author: https://github.com/supercomputer7
Commit: 9e520fd0d6
Pull-request: https://github.com/SerenityOS/serenity/pull/1290
1 changed files with 3 additions and 3 deletions
|
@ -144,20 +144,20 @@ void syscall_handler(RegisterState& regs)
|
|||
auto& process = *Process::current;
|
||||
|
||||
if (!MM.validate_user_stack(process, VirtualAddress(regs.userspace_esp))) {
|
||||
dbgprintf("Invalid stack pointer: %p\n", regs.userspace_esp);
|
||||
dbg() << "Invalid stack pointer: " << String::format("%p", regs.userspace_esp);
|
||||
handle_crash(regs, "Bad stack on syscall entry", SIGSTKFLT);
|
||||
ASSERT_NOT_REACHED();
|
||||
}
|
||||
|
||||
auto* calling_region = MM.region_from_vaddr(process, VirtualAddress(regs.eip));
|
||||
if (!calling_region) {
|
||||
dbgprintf("Syscall from %p which has no region\n", regs.eip);
|
||||
dbg() << "Syscall from " << String::format("%p", regs.eip) << " which has no region";
|
||||
handle_crash(regs, "Syscall from unknown region", SIGSEGV);
|
||||
ASSERT_NOT_REACHED();
|
||||
}
|
||||
|
||||
if (calling_region->is_writable()) {
|
||||
dbgprintf("Syscall from writable memory at %p\n", regs.eip);
|
||||
dbg() << "Syscall from writable memory at " << String::format("%p", regs.eip);
|
||||
handle_crash(regs, "Syscall from writable memory", SIGSEGV);
|
||||
ASSERT_NOT_REACHED();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue