Kernel debugging in emulators

Sysprogs forums Forums VisualGDB Kernel debugging in emulators

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #6176
    dmott
    Participant

    has anyone tried to connect VisualGDB to the Bochs or QEMU GDB server stubs for kernel testing?

    #6182
    support
    Keymaster

    Hi,

    Linux kernel debugging is quite tricky compared to user-mode debugging as the debugging infrastructure misses many things that are taken for granted in user mode. E.g. loading symbols for a dynamically loaded kernel mode requires parsing internal Kernel structures and manually specifying section addresses.

    We have created a separate product called VisualKernel that greatly simplifies all those tasks and provides out-of-the-box kernel debugging experience for most common Linux distros and we recommend using it for kernel debugging instead of VisualGDB.

    #6296
    dmott
    Participant

    Hi Bazis, thanks for the reply. My kernel is custom (non-linux) so need some power tools to debug ACPI, PCI and processor tables (GDT/IDT), etc.  Short of going with ICE or JTAG, Bochs is the best thing I’ve found so far. It has a built in GDB-ish debugger but also includes a native GDB stub. If you have a go at it with any success please let me know. My thought was to create a VSIX with a debug engine and some tool windows to inspect processor tables, etc because Bochs has nearly everything already written on the back end for it but the VSIX SDK makes me ill. Debugging a kernel as the processor sees it without injecting code is a challenge with few solutions at present.

    #6303
    support
    Keymaster

    Hi,

    As your scenario (debugging a completely custom kernel) is very rare, we will most likely not create a separate product supporting it. However what we can do is extend the VisualGDB plugin interface so that you could add your custom tool windows and use the convenient VisualGDB SDK interfaces to query various data from the GDB session. Let us know if that works for you.

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.