Skip to content

Kernel thread debugger #128

@arthurp

Description

@arthurp

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions