Debug Symbols on MacOSX
On MacOSX, debug symbols are often in stand alone bundles called dSYM files. These are bundles that contain DWARF debug information and other resources related to builds and debug info.
The DebugSymbols.framework framework helps locate dSYM files when given a UUID. It can locate the symbols using a variety of methods:
- Spotlight
- Explicit search paths
- Implicit search paths
- File mapped UUID paths
- Running one or more shell scripts
DebugSymbols.framework also has global defaults that can be modified to allow
all of the debug tools (lldb, gdb, sample, CoreSymbolication.framework) to easily
find important debug symbols. The domain for the DebugSymbols.framework defaults
is com.apple.DebugSymbols, and the defaults can be read, written or modified
using the defaults shell command:
% defaults read com.apple.DebugSymbols
% defaults write com.apple.DebugSymbols KEY ...
% defaults delete com.apple.DebugSymbols KEY
The following is a list of the defaults key value setting pairs that can be used to enhance symbol location:
Defaults Key | Description |
DBGFileMappedPaths | This default can be specified as a single string, or an array of strings. Each string represents a directory that contains file mapped UUID values that point to dSYM files. See the "File Mapped UUID Directories" section below for more details. Whenever DebugSymbols.framework is asked to lookup a dSYM file, it will first look in any file mapped UUID directories for a quick match. |
|
DBGShellCommands | This default can be specified as a single string, or an array of strings. Specifies a shell script that will get run in order to find the dSYM. The shell script will be run given a single UUID value as the shell command arguments and the shell command is expected to return a property list. See the property list format defined below. |
|
DBGSpotlightPaths | Specifies the directories to limit spotlight searches to as a string or array of strings. When any other defaults are supplied to com.apple.DebugSymbols, spotlight searches will be disabled unless this default is set to an empty array: |
|