Skip to content
Alexander Makarov edited this page Sep 19, 2016 · 1 revision

How to decode minidumps

Build dump_syms

Mac example:

#check SDK versions
$> xcodebuild -sdk -version
$ ...
$ MacOSX10.10.sdk - OS X 10.10(macosx10.10)
$ SDKVersion: 10.10
$ ...
$> cd $BREAKPAD_SOURCE_TREE
#use proper SDKVersion = 10.10
$> xcodebuild -sdk macosx10.10 -project src/tools/mac/dump_syms/dump_syms.xcodeproj -configuration Release -target dump_syms ARCHS=x86_64 ONLY_ACTIVE_ARCH=YES MACOSX_DEPLOYMENT_TARGET=10.10 GCC_VERSION=com.apple.compilers.llvm.clang.1_0

Generate symbol file for your app

Mac example:

First generate applocation version binary with proper function names with source file line numbers. Go to non-stripped binary (e.g. application) and use dsymutil util

$> dsymutil ./application.app/Content/MacOS/application

now you have a DWARF debugging format version of you application at "application.dSYM/Contents/Resources/DWARF/application" near original binary

Next generate symbol file:

#generate .sym file
$> dump_syms ./application.app/Content/MacOS/application.dSYM/Contents/Resources/DWARF/application > ./application.app/Content/MacOS/application.sym
			 
#store sym file in the correct location
#this step is necessary. Without that minidump_stackwalk tool doesn't work
			 
$> head -n1 application.sym
$ MODULE mac x86_64 C5CAE9D1E51536DF95C4F0CB5CCDAB270 application
			 
$> mkdir -p ./symbols/application/C5CAE9D1E51536DF95C4F0CB5CCDAB270
$> mv application.sym ./symbols/application/C5CAE9D1E51536DF95C4F0CB5CCDAB270

Show stack trace

Use minidump_stackwalk tool with symbol file for show stack with full convinience

$> minidump_stackwalk ./crash.dmp ./symbols 2>&1 | grep my_symbols