summaryrefslogtreecommitdiff
path: root/Kernel/Syscall.cpp
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2020-11-23 14:09:12 +0100
committerAndreas Kling <kling@serenityos.org>2020-11-23 16:08:42 +0100
commit1951dfa46a77a6328b5d8bcfc6cd053a5b2078ee (patch)
tree2e58c69d990b50da420184cfdb1426037c2dfc40 /Kernel/Syscall.cpp
parent39bb346cef889c96c5be163b509353256be4cf43 (diff)
downloadserenity-1951dfa46a77a6328b5d8bcfc6cd053a5b2078ee.zip
Kernel: Convert dbg() to dbgln() in Syscall.cpp
Diffstat (limited to 'Kernel/Syscall.cpp')
-rw-r--r--Kernel/Syscall.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/Kernel/Syscall.cpp b/Kernel/Syscall.cpp
index bd6d8e7bb0..2b2e074dd0 100644
--- a/Kernel/Syscall.cpp
+++ b/Kernel/Syscall.cpp
@@ -109,12 +109,12 @@ int handle(RegisterState& regs, u32 function, u32 arg1, u32 arg2, u32 arg3)
return process.sys$sigreturn(regs);
if (function >= Function::__Count) {
- dbg() << process << ": Unknown syscall %u requested (" << arg1 << ", " << arg2 << ", " << arg3 << ")";
+ dbgln("Unknown syscall {} requested ({:08x}, {:08x}, {:08x})", function, arg1, arg2, arg3);
return -ENOSYS;
}
if (s_syscall_table[function] == nullptr) {
- dbg() << process << ": Null syscall " << function << " requested: \"" << to_string((Function)function) << "\", you probably need to rebuild this program.";
+ dbgln("Null syscall {} requested, you probably need to rebuild this program!", function);
return -ENOSYS;
}
return (process.*(s_syscall_table[function]))(arg1, arg2, arg3);
@@ -153,20 +153,20 @@ void syscall_handler(TrapFrame* trap)
auto& process = current_thread->process();
if (!MM.validate_user_stack(process, VirtualAddress(regs.userspace_esp))) {
- dbg() << "Invalid stack pointer: " << String::format("%p", regs.userspace_esp);
+ dbgln("Invalid stack pointer: {:p}", regs.userspace_esp);
handle_crash(regs, "Bad stack on syscall entry", SIGSTKFLT);
ASSERT_NOT_REACHED();
}
auto* calling_region = MM.find_region_from_vaddr(process, VirtualAddress(regs.eip));
if (!calling_region) {
- dbg() << "Syscall from " << String::format("%p", regs.eip) << " which has no region";
+ dbgln("Syscall from {:p} which has no associated region", regs.eip);
handle_crash(regs, "Syscall from unknown region", SIGSEGV);
ASSERT_NOT_REACHED();
}
if (calling_region->is_writable()) {
- dbg() << "Syscall from writable memory at " << String::format("%p", regs.eip);
+ dbgln("Syscall from writable memory at {:p}", regs.eip);
handle_crash(regs, "Syscall from writable memory", SIGSEGV);
ASSERT_NOT_REACHED();
}