From b91f21fafb4f3042b886209db675089b6fa7df32 Mon Sep 17 00:00:00 2001 From: Julian Barathieu Date: Wed, 8 May 2019 20:54:40 +0200 Subject: [PATCH] Stuff --- kaleid/kernel/cpu/idt.c | 15 ++++++++------- kaleid/kernel/sh/shcmds.c | 7 +++++++ 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/kaleid/kernel/cpu/idt.c b/kaleid/kernel/cpu/idt.c index 1f35f7c..229c911 100644 --- a/kaleid/kernel/cpu/idt.c +++ b/kaleid/kernel/cpu/idt.c @@ -277,13 +277,13 @@ void IdtEarlyExceptionHandler(ISRFrame_t *regs) if (!recoverable) { KeStartPanic("[ISR 0x%x] Irrecoverable Kernel %s\n\n" " Error code : %p\n\n" - " RIP: %p CS: %p RSP: %p\n" - " SS: %p RAX: %p RBX: %p\n" - " RCX: %p RDX: %p RSI: %p\n" - " RDI: %p RBP: %p R8: %p\n" - " R9: %p R10: %p R11: %p\n" - " R12: %p R13: %p R14: %p\n" - " R15: %p RFLAGS: %022b", + " RIP: %#016lx CS: %#016lx RSP: %#016lx\n" + " SS: %#016lx RAX: %#016lx RBX: %#016lx\n" + " RCX: %#016lx RDX: %#016lx RSI: %#016lx\n" + " RDI: %#016lx RBP: %#016lx R8: %#016lx\n" + " R9: %#016lx R10: %#016lx R11: %#016lx\n" + " R12: %#016lx R13: %#016lx R14: %#016lx\n" + " R15: %#016lx RFLAGS: %#022b (%#06x)", regs->intNo, ExceptionsChar[regs->intNo], regs->ErrorCode, @@ -306,6 +306,7 @@ void IdtEarlyExceptionHandler(ISRFrame_t *regs) regs->regs[12], regs->regs[13], regs->regs[14], + regs->rflags, regs->rflags ); diff --git a/kaleid/kernel/sh/shcmds.c b/kaleid/kernel/sh/shcmds.c index 4f515ba..4e6152a 100644 --- a/kaleid/kernel/sh/shcmds.c +++ b/kaleid/kernel/sh/shcmds.c @@ -117,12 +117,19 @@ error_t CmdPsTest(int argc, char **argv, char *cmdline) return EOK; } +error_t CmdDie(int argc, char **argv, char *cmdline) +{ + *(char *)NULL += 1; + return EOK; +} + //----------------------------------------------------------------------------// Command_t cmdtable[] = { { "beep", CmdBeep, "Make a beep" }, { "date", CmdDate, "Print date" }, + { "die", CmdDie, "Die painfully" }, { "exit", CmdQuit, "Initiate shutdown" }, { "help", CmdHelp, "Show this message" }, { "mmap", CmdMemMap, "Show memory map" },