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.
The bundle and DWARF file page lists the
folder layout, every Info.plist key, what the Mach-O file keeps, each
__DWARF section and the debug map dsymutil reads; the
accelerator tables page gives the layout of
Apple’s __apple_names, __apple_types,
__apple_namespac and __apple_objc hash tables.
Not described
Known, not yet covered
- Reference: the default values of the Info.plist version keys in a dSYM bundle, on the bundle page.
- Viewer: there is no viewer for dSYM bundles yet.
Unknown
- Reference: how bundles made by Apple’s own tools differ, and what the Apple accelerator atoms
DW_ATOM5 and 6 mean: no public source says (accelerator page).
Links
Software
Developers
Reference
- DWARF Debugging Information Format – the standard for the debug data inside