dotnet / runtime

.NET is a cross-platform runtime for cloud, mobile, desktop, and IoT apps.
https://docs.microsoft.com/dotnet/core/
MIT License
14.91k stars 4.63k forks source link

Distribute macOS symbols as dSYM, not .dwarf #88286

Open filipnavara opened 1 year ago

filipnavara commented 1 year ago

macOS tooling expects symbols to be distributed as .dSYM bundles created using dsymtool without the --flat parameter. The distribution using dSYM allows the lldb debugger, spindump, sample, and other tools to locate the symbols automatically (through Spotlight indexer with matches the symbols through UUID back to the original executable). This automatic symbol loading doesn't work for .dwarf files located next to the executable.

This makes debugging tools like ILCompiler particularly annoying. Profiling long compilations produces non-symbolicated traces which are hard to interpret.

ghost commented 1 year ago

Tagging subscribers to this area: @tommcdon See info in area-owners.md if you want to be subscribed.

Issue Details
macOS tooling expects symbols to be distributed as .dSYM bundles created using `dsymtool` without the `--flat` parameter. The distribution using dSYM allows the `lldb` debugger, `spindump`, `sample`, and other tools to locate the symbols automatically (through Spotlight indexer with matches the symbols through UUID back to the original executable). This automatic symbol loading doesn't work for .dwarf files located next to the executable. This makes debugging tools like ILCompiler particularly annoying. Profiling long compilations produces non-symbolicated traces which are hard to interpret.
Author: filipnavara
Assignees: -
Labels: `area-Diagnostics-coreclr`
Milestone: -
am11 commented 1 year ago

I think if we want to also ship .dSYM files, it will require coordinated effort. After the mechanical code changes in these places:

there might be additional work required in https://github.com/dotnet/diagnostics tools and https://github.com/dotnet/symstore (and the underlying blob storage).

EgorBo commented 1 year ago

I guess it should also help native profilers?

filipnavara commented 1 year ago

I guess it should also help native profilers?

Yep. It applies to Instruments too.

dotnet-policy-service[bot] commented 1 month ago

Tagging subscribers to this area: @dotnet/runtime-infrastructure See info in area-owners.md if you want to be subscribed.