Skip to content

dSYM and DWARF

What is a dSYM file

A dSYM file refers to a debug symbols file generated by Xcode.

It contains the debug information necessary for symbolication, allowing developers to interpret crash reports effectively.

How to get a dSYM file

Build your project with the following build settings.

  • Build Settings -> Generate Debug Symbols set to YES.
  • Build Settings -> Debug Information Format set to DWARF with dSYM File.

The structure of a dSYM file

The dSYM file is essentially a bundle, which is a directory with a specific structure.

The main directory has the .dSYM extention.

This is a standard structure of the dSYM file:

YourAppName.app.dSYM/
└── NotificationService.appex.dSYM/
    ├── ....
└── OtherExtention.appex.dSYM/
    ├── ....
└── YourAppName.app.dSYM/
    └── Contents/
        ├── Info.plist
        └── Resources/
            └── DWARF/
                └── YourAppName (DWARF format file)
            └── Relocations/
                └── aarch64/
                    └── YourAppName.yml
YourAppName.app.dSYM/
└── NotificationService.appex.dSYM/
    ├── ....
└── OtherExtention.appex.dSYM/
    ├── ....
└── YourAppName.app.dSYM/
    └── Contents/
        ├── Info.plist
        └── Resources/
            └── DWARF/
                └── YourAppName (DWARF format file)
            └── Relocations/
                └── aarch64/
                    └── YourAppName.yml

What is a DWARF file

DWARF stands for "Debugging With Attributed Record Format".

It is a standardized format used for storing debugging information in executable files, enabling debuggers to provide source-level debugging capabilities.

The DWARF format is organized into several sections:

  1. Debugging Information Entry (DIE)
  2. Sections
  3. Tree Structure

dwarfdump

dwarfdump command-line tool can parse the DWARF file and print their content in a human-readable format.

bash
dwarfdump [options] <objectfilename>
dwarfdump [options] <objectfilename>