diff options
-rw-r--r-- | microkernel/mach/gnumach/debugging.mdwn | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/microkernel/mach/gnumach/debugging.mdwn b/microkernel/mach/gnumach/debugging.mdwn index 7f4fc6ad..94fdb461 100644 --- a/microkernel/mach/gnumach/debugging.mdwn +++ b/microkernel/mach/gnumach/debugging.mdwn @@ -51,3 +51,16 @@ Then boot your system and do something like this: This is especially useful if you need to manually trigger some stuff inside the running kernel, as with the *D1* example. + + +If you're doing real low level debugging, you might want to put variations of +the following snipped into the code, this code will write a `#` character at +line `[LINE]`, column `[COLUMN]` on the screen: + + *((char *) 0xb8000 + 2 * ([LINE] * 80 + [COLUMN])) = '#'; + halt_cpu (); + +The call of `halt_cpu` will -- as the name suggests -- halt the system +afterwards. This might be what you want or it might not, but it is needed at +some place when running the kernel inside QEMU, as QEMU somehow decides not to +update its display buffer anymore under certain conditions. |