Commit 88d9206d authored by Eddie Kohler's avatar Eddie Kohler

Improve panic error messages.

The previous sys_panic() output tended to scroll important stuff
off the top of the screen.
parent b5c593d9
......@@ -322,7 +322,7 @@ static void vpanic(uintptr_t rsp, uintptr_t rbp, uintptr_t rip,
const char* format, va_list val) {
panicking = true;
cursorpos = CPOS(24, 80);
cursorpos = CPOS(24, 0);
if (format) {
// Print panic message to both the screen and the log
error_printf(-1, COLOR_ERROR, "PANIC: ");
......
......@@ -180,7 +180,7 @@ uintptr_t proc::syscall(regstate* regs) {
return 0;
case SYSCALL_PANIC:
panic(nullptr);
panic_at(0, 0, 0, "process %d called sys_panic()", id_);
break; // will not be reached
case SYSCALL_GETPID:
......
......@@ -20,6 +20,7 @@ void process_main() {
} else {
sys_msleep(300);
console_printf("testhalt succeeds if you see 0-2 above and QEMU exits after a second\n");
console_printf("(QEMU will only exit if you ran with `HALT=1`)\n");
sys_msleep(1000);
sys_exit(0);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment