Skip to content

bootloader debug symbols #258

@hawkw

Description

@hawkw

Hi, I'm attempting to use the bootloader crate with a debugging workflow where a kernel is run in QEMU using QEMU's support for gdb's remote debugging protocol. This workflow works fine once the kernel code is entered, as it's possible to load the original, un-stripped kernel binary into gdb to access its debug symbols. However, the bootloader build script doesn't appear to have a way to output debug symbols for the bootloader itself, so it's not possible for gdb to find function boundaries etc while still in the bootloader.

Would it be possible to add an option to get the build script to emit the bootloader's debug symbols? Building in release mode is probably still necessary, but the bootloader could be built in release mode with debug symbols enabled, and then stripped to remove the debug symbols from the binary that's linked into the final output binary. That would help a lot when debugging issues that (appear) to occur before the jump into the kernel itself.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions