electron-extract-dump
A tool to batch extract stack info from dmp + sym file to human readable content.
简体中文
English |.dmp
Extract Crash Stack from a Use Case
batch parse the exeception stack of C++ code on Chromium/Electron/Node Addon from .dmp
file.
Instruction
wget -i list.txt --tries=3 --continue ‐‐no-clobber
, and download those.dmp
files.- put
.dmp
files to/path/to/your/dump/dir
(Default:dump
). - unzip
electron-v{version}-{platform}-{arch}-symbols.zip
of each platforms and arches and then copy all the files/folder frombreakpad_symbol
to/path/to/electron-extract-dump/symbols
(must make sure the structure looks likefilename
-breakpadId
-filename.sym
). - then execute
npm run stackwalk /path/to/your/dump/dir
. - open the
/path/to/your/dump/dir
and debug those.stack.txt
stack.
Notice: you can only do this on a Mac or Linux!!
.dSYM
, .pdb
, .debug
) to .sym
Convert Debug Symbol (Use Case
Sometimes, we may need to use debug symbol to generate .sym
, this is for it.
Instruction
- put those
.pdb
or.dSYM
or.debug
into/path/to/your/debug-symbols/dir/electron-v${electronVersion}/${platform}-${arch}
dir. - then execute
npm run extract /path/to/your/debug-symbols/dir
- the
.sym
file will be auto generated tosymbols/electron-v${electronVersion}/${platform}-${arch}/${name}/${crashpadId}
dir. - and then you can use those
.sym
to stackwalk the.dmp
file.
.pdb
to .sym
.
Notice 1: Different platfrom debug symbol can only be converted on the corresponding platform, eg: you can only use a Windows Pc to operate conversion from can't find dll
error, you may need to execute regsvr32 \path\to\electron-extract-dump\dll\win32-x64\msdia140.dll
.
Notice 2: If windows shows you a .pdb
file, then you must put the PE
file (eg: electron.exe.pdb 's PE
file is electron.exe) nearby that .pdb
. for x86 (ia32) arch, PE
file is not the necessary part.
Notice 3: If you are trying to convert a x64 .dmp
Extract MDRaw from a Use Case
Convert a .dmp
file and get the minidump raw content from it, if you use crashReport.start
with globalExtra
passed, this will help you get those args.
Instruction
wget -i list.txt --tries=3 --continue ‐‐no-clobber
, and download those.dmp
files.- put
.dmp
files to/path/to/your/dump/dir
(Default:dump
). - then execute
npm run dump /path/to/your/dump/dir
. - open the
/path/to/your/dump/dir
and debug those.dump.txt
stack.
.dmp
Enum the dynamic link files and versions stored in Use Case
Enum all the dynamic link files and version stored in .dmp
file
to .module.txt
.
Instruction
wget -i list.txt --tries=3 --continue ‐‐no-clobber
, and download those.dmp
files.- put
.dmp
files to/path/to/your/dump/dir
(Default:dump
). - then execute
npm run modulelist /path/to/your/dump/dir
. - open the
/path/to/your/dump/dir
and debug those.module.txt
stack.
Analyse the crash reason & count
Use Case
Analyze crash reason and count from the generated stacks.
Instruction
- make sure you have already run
npm run stackwalk /path/to/your/dump/dir
and generated those stack file. - then execute
npm run analyze /path/to/your/dump/dir
to analyze crash reason and count.
.stack.txt
Cluster crash from Use Case
Use the last function line name to cluster all crash files from the generated stacks.
Instruction
- make sure you have already run
npm run stackwalk /path/to/your/dump/dir
and generated those stack file. - then execute
npm run cluster /path/to/your/dump/dir
to cluster the crash reason. - open the
cluster
folder and you will see crash dump and stack in that folder named with(total: ${count}) ${last line function name}
.
License
MIT