Reputation: 153
On iOS, the Debug symbols are stripped from the release binaries for security reasons. So how does a crash reporting tool like Fabric,Hockey etc "desymbolicate" and show a nice stack trace of the crash point from a release build???
Do they capture/trace the crashes on their own, rather than relying on OS generated traces?
Upvotes: 0
Views: 791
Reputation: 15329
The following applies to OS X, iOS, tvOS and also watchOS:
DEBUG_INFORMATION_FORMAT
set to DWARF with dSYM File
), then ever single time you do build you'll also get a dSYM package with a dwarf file that contains everything needed to symbolicate and also getting filenames and line numbers.So how do iTunes Connect, Xcode, Fabric, HockeyApp and others actually do symbolication?
They are all using the dwarf files in the dSYM package. They take the memory address from a stack frame, find the corresponding binary image in the Binary Images section of the crash report by matching the address ranges, take the UUID of the binary image, find the dSYM package which contains the matching UUID for the matching CPU architecture and then run a tool like atos
against it to get the (demangled) symbols.
And how do they get the stack traces?
Upvotes: 2