Introduction
A .dSYM is a bundle, a folder that macOS shows as a single item, holding
the debug information for a program, library or app built with Apple’s
Xcode. On Apple’s systems the linker
does not copy debug information into the program; it stays in the object files, and the
dsymutil tool gathers it into a dSYM bundle named after the program, such
as MyApp.app.dSYM.
Debuggers use a dSYM to show source lines and variables, and crash reporting services use it to turn the addresses in a crash report into function names and line numbers. App Store builds are usually archived with their dSYM files for this reason.
Structure
The bundle has the layout Contents/Info.plist, which identifies it, and
Contents/Resources/DWARF/, which holds one file named after the program.
That file is a Mach-O file of the debug symbols type
(file type 10). It has no code; its __DWARF segment holds the DWARF debug
sections, such as __debug_info and __debug_line, and its
symbol table lists the program’s functions. For a universal program it holds one
architecture per slice, like the program itself.
Each Mach-O program carries a UUID in an LC_UUID load command, and the
dSYM carries the same UUID, so tools can match a crash or a running program to the
right bundle. dwarfdump --uuid shows it.
Links
Software
Developers
Reference
- DWARF Debugging Information Format, the standard for the debug data inside