rust-lang / rust-lang/rust

split-debuginfo=unpacked causes Xcode Instruments to not find source for some symbols

Open
#156,507 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

C-bug needs-triage
Dominant language
Rust
Stars
119k
Forks
16.1k
PR merge metrics
PR metrics pending

Description

Versions:
1.95.0 (59807616e 2026-04-14)
1.97.0-nightly (64a965e90 2026-05-11)

On macOS if you build with --config 'profile.release.debug=true', which uses the default Cargo behavior of split-debuginfo=unpacked, and profile the result using Instruments, then the resulting profile can find the source for symbols only from the binary crate or inlined into the binary crate, but not symbols from other crates.

For example, in the below, where the binary is the 'chillin' crate, it can find source for the chillin symbols and inlined symbols but not the highlighted row:

Image

If I add --config 'profile.release.split-debuginfo="packed"' to the build it finds source for these extra symbols.
See some more detailed debugging notes in https://github.com/cmyr/cargo-instruments/issues/144 .

(I would be happy to dig into this myself if you could give me some pointers on where to investigate! I am familiar with compiler toolchains but not Mac specifics!)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the Cargo profile behavior described for split-debuginfo=unpacked versus packed, then read the detailed debugging notes in cargo-instruments issue 144. Reproduce the macOS Instruments profile using the reported release configuration and compare source resolution for symbols from the binary and dependency crates; done means unpacked debug info lets Instruments find those dependency sources.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
build-system, compilers
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.