Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ Add search paths for looking up symbol files.
Get the stack trace from `minidumpFilePath`, the `callback` would be called
with `callback(error, report)` upon completion.

### minidump.dump(minidumpFilePath, callback)

Parse and dump the raw contents of the minidump as text using `minidump_dump`.

### minidump.dumpSymbol(binaryPath, callback)

Dump debug symbols in minidump format from `binaryPath`, the `callback` would
Expand Down
2 changes: 1 addition & 1 deletion build.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ spawnSync(path.join(__dirname, 'deps', 'breakpad', 'configure'), [], {
},
stdio: 'inherit'
})
const targets = ['src/processor/minidump_stackwalk']
const targets = ['src/processor/minidump_stackwalk', 'src/processor/minidump_dump']
if (process.platform === 'linux') {
targets.push('src/tools/linux/dump_syms/dump_syms')
}
Expand Down
5 changes: 5 additions & 0 deletions lib/minidump.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ const format = require('./format')
const exe = process.platform === 'win32' ? '.exe' : ''
const commands = {
minidump_stackwalk: path.resolve(__dirname, '..', 'build', 'src', 'processor', 'minidump_stackwalk') + exe,
minidump_dump: path.resolve(__dirname, '..', 'build', 'src', 'processor', 'minidump_dump') + exe,
dump_syms: (() => {
if (process.platform === 'darwin') {
return path.resolve(__dirname, '..', 'build', 'src', 'tools', 'mac', 'dump_syms', 'dump_syms_mac')
Expand Down Expand Up @@ -75,6 +76,10 @@ module.exports.walkStack = function (minidump, symbolPaths, callback, commandArg
execute(stackwalk, args, callback)
}

module.exports.dump = function (minidump, callback, commandArgs) {
execute(commands.minidump_dump, [minidump].concat(commandArgs || []), callback)
}

module.exports.dumpSymbol = function (binary, callback) {
var dumpsyms = commands.dump_syms
if (!dumpsyms) {
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
"description": "Read and process minidump file",
"version": "0.19.0",
"bin": {
"minidump_stackwalk": "build/src/processor/minidump_stackwalk"
"minidump_stackwalk": "build/src/processor/minidump_stackwalk",
"minidump_dump": "build/src/processor/minidump_dump"
},
"types": "index.d.ts",
"license": "MIT",
Expand Down