Internal Kernel Debugger

From OSDev Wiki
Jump to navigation Jump to search

This page is under construction! This page or section is a work in progress and may thus be incomplete. Its content may be changed in the near future.

An Internal Kernel Debugger (which will be referred to as the IKD from now on) is an inbuilt equivalent to GDB or any other debugger but is inbuilt into your kernel, or some other part of your OS.

Preexisting Tools

Minidbg

Minidbg is a “minimal, easy to integrate, multiplatform ANSI C debugger with serial interface” which works with AARCH64 and X86_64 devices. Minidbg can be easily implemented into a kernel with very little time or effort to actually implement it. It does not have any dependencies other than the assembler you use, and the architecture you target.

Making Your Own IKD

If you wish to develop your own IKD, you will first need to have some form of input; this could be via a PS/2 keyboard or a serial port. The method does not matter as long as it works. The next thing you need to know is when to trigger the IKD. Possible methods to trigger the IKD could be CPU exceptions, serial interrupts, or anything else.

What Does an IKD Do?

The IKD can dump memory, dump registers, and read most critical parts of the system