@@ -6,6 +6,7 @@ const format = require('./format')
66const exe = process . platform === 'win32' ? '.exe' : ''
77const commands = {
88 minidump_stackwalk : path . resolve ( __dirname , '..' , 'build' , 'src' , 'processor' , 'minidump_stackwalk' ) + exe ,
9+ minidump_dump : path . resolve ( __dirname , '..' , 'build' , 'src' , 'processor' , 'minidump_dump' ) + exe ,
910 dump_syms : ( ( ) => {
1011 if ( process . platform === 'darwin' ) {
1112 return path . resolve ( __dirname , '..' , 'build' , 'src' , 'tools' , 'mac' , 'dump_syms' , 'dump_syms_mac' )
@@ -27,7 +28,7 @@ function execute (command, args, callback) {
2728 } )
2829 child . on ( 'close' , function ( code ) {
2930 if ( code !== 0 ) {
30- callback ( stderr ? new Error ( stderr . toString ( ) ) : new Error ( 'Command `' + command + '` failed: ' + code ) )
31+ callback ( stderr ? new Error ( stderr . toString ( ) ) : new Error ( 'Command `' + command + '` failed: ' + code ) , stdout )
3132 } else {
3233 callback ( null , stdout )
3334 }
@@ -75,6 +76,10 @@ module.exports.walkStack = function (minidump, symbolPaths, callback, commandArg
7576 execute ( stackwalk , args , callback )
7677}
7778
79+ module . exports . dump = function ( minidump , callback , commandArgs ) {
80+ execute ( commands . minidump_dump , [ minidump ] . concat ( commandArgs || [ ] ) , callback )
81+ }
82+
7883module . exports . dumpSymbol = function ( binary , callback ) {
7984 var dumpsyms = commands . dump_syms
8085 if ( ! dumpsyms ) {
0 commit comments