Fix distingishing kernel/user mode cpu exceptions

This commit is contained in:
2025-11-10 18:35:46 +01:00
parent efaddb970a
commit 5c02d4d44a

View File

@ -215,7 +215,7 @@ void intr_handleintr(IntrStackFrame *frame) {
kprintf("ERROR %s, 0x%lX\n", exceptions[frame->trapnum], frame->errnum);
intr_dumpframe(frame);
backtrace((BackTraceFrame *)frame->regs.rbp);
if (frame->cs == UCODE) {
if (frame->cs == (UCODE | 0x3)) {
kprintf("killed pid %ld %s\n", PROCS.current->pid, PROCS.current->name);
proc_killself();
proc_sched((void *)frame);