-
Notifications
You must be signed in to change notification settings - Fork 1
Kernel thread debugger #128
Description
Attaching a debugger to qemu enables debugger the kernel to an extent. However, it does not have any knowledge of the scheduler and kernel threads, so while it allows stepping through code to some extent, it doesn't provide everything we need. There are some weird issues when debugging the kernel which may be related to this: stepping stops at random places in the code at around the time a break point is reached; SIGTRAP stops execution at random points; continuing execution sometimes breaks again at the next line.
Ideally, we would have an in-kernel gdb server in the same vane as Linux's kdb. This would allow stepping through threads across rescheduling events and observing the state of all threads while the system is paused. There is a rust library which may help with this: https://github.com/daniel5151/gdbstub.