From 32300c2d9e16c2a308ebd86efe5ca8692dd0b178 Mon Sep 17 00:00:00 2001 From: Ribbon Date: Sun, 12 Mar 2023 15:16:05 +0000 Subject: [PATCH] Add QEMU tip. --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 5b96f12..6b64300 100644 --- a/README.md +++ b/README.md @@ -51,3 +51,5 @@ the process. See your debuggers man page for more information on useful commands The problem with slicing in regular Rust, e.g. `foo[a..b]`, is that if someone tries to access with a range that is out of bounds of an array/string/slice, it will cause a panic at runtime, as a safety measure. Same thing when accessing an element. - Always use `foo.get(n)` instead of `foo[n]` and try to cover for the possibility of `Option::None`. Doing the regular way may work fine for applications, but never in the kernel. No possible panics should ever exist in kernel space, because then the whole OS would just stop working. + +- If you receive a kernel panic in QEMU, use `pkill qemu-system` to kill the frozen QEMU process.