@licq/nwjs-minidump
v2.0.3
Published
decode a nwjs crashed dump file
Downloads
2
Maintainers
Readme
@licq/nwjs-minidump
decode a nwjs crashed dump file
Install
npm add @licq/nwjs-minidump
Usage
const minidump = require("@licq/nwjs-minidump");
const testCases = [
["./dump-examples/0.57.1-osx64.dmp", "0.57.1-sdk"],
["./dump-examples/0.57.1-win64.dmp", "0.57.1-sdk"],
["./dump-examples/0.54.1-arm64.dmp", "0.54.1-sdk"],
];
getSymbols
(async function () {
await minidump.getSymbols({
dumpFile: testCases[0][0],
nwVersion: testCases[0][1],
});
})();
decodeDmp
(async function () {
const res = await main.decodeDmp({
dumpFile: testCases[0][0],
nwVersion: testCases[0][1],
symbolsPath: 'path/to/symbols', // optional
tagetDumpTxtPath: 'path/to/dumpTxt' // optional
});
console.log(res);
})();
CLI
dmp -f [dumpFilePath] -v [nwjsVersion] -o [outputPath] -s [symbolsPath]
-f
required-v
required-o
optional
help
$ dmp -h
Usage: dmp [options] [command]
Options:
-V, --version output the version number
-h, --help display help for command
Commands:
decode [options] decode a nwjs dump file
help [command] display help for command
$ dmp decode -h
Usage: dmp decode [options]
decode a nwjs dump file
Options:
-f, --dumpFile <path> path of the .dmp file, eg: /path/to/demo.dmp or https://cos.xxx.com/path/to/demo.dmp
-v, --nwVersion <semver> nwjs version eg: 0.57.1|0.57.1-sdk. see <https://dl.nwjs.io/>
-s, --symbolsPath <path> path of the symbols. If this parameter is not specified, it will be downloaded by default
-o, --output <path> path of the output. The default value is the same as the .dmp file
-h, --help display help for command
- example
$ npm i -g @licq/nwjs-minidump
$ dmp decode -f path/to/xxx.dmp -v 0.57.1 # support url: dmp decode -f https://miniapp.gtimg.cn/qqdevtools/crash_dump_files/cc25ec86-5346-4a4d-b442-74a3de9fd4ee.dmp -v 0.57.1-sdk
# output example:
Operating system: Mac OS X
12.3.1 21E258
CPU: amd64
family 6 model 165 stepping 5
16 CPUs
GPU: UNKNOWN
Crash reason: EXC_BAD_ACCESS / KERN_INVALID_ADDRESS
Crash address: 0x0
Process uptime: 1063 seconds
Thread 0 (crashed)
0 nwjs Framework!GetRenderWidgetHost [render_frame_host_impl.cc : 10935 + 0x0]
rax = 0x0000000119b067a8 rdx = 0x00000000000c81b0
rcx = 0x00000000430254d1 rbx = 0x00007fe040073e00
rsi = 0x00007fdfeeff84b8 rdi = 0x0000000000000000
rbp = 0x00007ff7bf664f40 rsp = 0x00007ff7bf664f30
r8 = 0x0000000000000427 r9 = 0x0000000000000029
r10 = 0x00007fdfcff00000 r11 = 0x0000000000000000
r12 = 0x00007fdfcf16e720 r13 = 0x00007fe040880438
r14 = 0x0000000000000000 r15 = 0x00007ff7bf664f78
rip = 0x0000000110d288e7
Found by: given as instruction pointer in context
1 nwjs Framework!GetView [render_frame_host_impl.cc : 4171 + 0x9]
rbp = 0x00007ff7bf664f50 rsp = 0x00007ff7bf664f50
rip = 0x0000000110d2894d
Found by: previous frame's frame pointer
References
Note
On linux system, May report this error:
libstdc++.so.6: version `GLIBCXX_3.4.20’ not found
Solution
# find / -name "libstdc++.so.6*"
wget http://www.vuln.cn/wp-content/uploads/2019/08/libstdc.so_.6.0.26.zip
unzip libstdc.so_.6.0.26.zip
cp libstdc.so_.6.0.26 /usr/lib64
cd /usr/lib64
rm -f libstdc.so_.6
ln -f libstdc.so_.6.0.26 libstdc.so_.6
Verify
strings libstdc++.so.6.0 | grep GLIBCXX_*