Skip to content

macOS debug / checked builds don't have full debug info #32957

@janvorli

Description

@janvorli

While helping @fadimounir to debug a core dump on macOS, I've found that our checked and debug binaries built in the coreclr repo don't contain full debug symbols like source code info. After looking into it, I've found that it was that way probably forever. The problem is caused by the behavior of linker on macOS. When the compilation and linking steps are separate, the linker doesn't copy the debug info from the object files into the final binary. It is needed to use the dsymutil tool on the final binary tot extracts the debug info from the original object files into a separate symbol file. There seems to be no way to embed them into the final binary like it happens on Linux.
We run the dsymutil in release builds to extract the debug info into separate files before we strip all of the symbols from the binaries. We need to do the same thing for debug and checked builds too.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions