Kernel: Add some helpful debug prints
Log RIP when stack pointer is out of bounds. Log all syscalls that return ENOTSUP
This commit is contained in:
parent
001e95f973
commit
b0ff2392a1
|
@ -189,6 +189,7 @@ namespace Kernel::IDT
|
|||
else
|
||||
{
|
||||
derrorln("Stack pointer out of bounds!");
|
||||
derrorln("rip {H}", interrupt_stack.rip);
|
||||
derrorln("rsp {H}, stack {H}->{H}, istack {H}->{H}",
|
||||
interrupt_stack.rsp,
|
||||
stack.vaddr(), stack.vaddr() + stack.size(),
|
||||
|
|
|
@ -217,6 +217,9 @@ namespace Kernel
|
|||
|
||||
asm volatile("cli");
|
||||
|
||||
if (ret.is_error() && ret.error().get_error_code() == ENOTSUP)
|
||||
dprintln("ENOTSUP {}", syscall);
|
||||
|
||||
if (ret.is_error() && ret.error().is_kernel_error())
|
||||
Kernel::panic("Kernel error while returning to userspace {}", ret.error());
|
||||
|
||||
|
|
Loading…
Reference in New Issue