Skip to content

Please mention somewhere in your documentation that build options -ggdb and -Og (Update: -O0, NOT -Og) are required for proper debugging #345

@ElectricRCAircraftGuy

Description

@ElectricRCAircraftGuy

Build options -ggdb and -Og are required (note that the official GNU user manual recommends -Og over -O0 for debugging, too). This isn't common knowledge and should be emphasized somewhere. See this answer here: https://stackoverflow.com/questions/63386189/whats-the-difference-between-a-compilers-o0-option-and-og-option/63386263#63386263.

[-Og] is a better choice than -O0 for producing debuggable code because some compiler passes that collect debug information are disabled at -O0.

https://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html#Optimize-Options

This should be in your Getting Started and Examples sections of your documentation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions