var fs = require('fs');
var path = require('path');
var spawn = require('child_process').spawn;

var searchPaths = [
  path.resolve(__dirname, '..', 'build', 'Release'),
  path.resolve(__dirname, '..', 'build', 'Debug'),
  path.resolve(__dirname, '..', 'bin'),
];
function findMinidumpProcessorPath() {
  for (var i in searchPaths) {
    var binaryPath = path.join(searchPaths[i], 'minidump_stackwalk');
    if (fs.existsSync(binaryPath))
      return binaryPath;
  }
}

var globalSymbolPaths = [];
module.exports.addSymbolPath = Array.prototype.push.bind(globalSymbolPaths);

module.exports.walkStack = function (minidump, symbolPaths, callback) {
  if (!callback) {
    callback = symbolPaths;
    symbolPaths = [];
  }

  var minidumpProcessorPath = findMinidumpProcessorPath();
  if (!minidumpProcessorPath) {
    callback('Unable to find the "minidump_stackwalk"');
    return;
  }

  var stderr = '';
  var stdout = '';
  var child = spawn(minidumpProcessorPath, [minidump].concat(symbolPaths, globalSymbolPaths));
  child.stdout.on('data', function (chunk) { stdout += chunk; });
  child.stderr.on('data', function (chunk) { stderr += chunk; });
  child.on('close', function (code) {
    if (code != 0)
      callback(stderr);
    else
      callback(null, stdout);
  });
}

@@ -270,38 +270,232 @@
 ion 
-findMinidumpProcessorPath()
+searchCommand(command) %7B%0A  if (process.platform == 'win32') %7B%0A    command += '.exe'%0A    var binaryPath = path.join(__dirname, '..', 'deps', 'breakpad', command)%0A    if (fs.existsSync(binaryPath))%0A      return b%0A  %7D else
  %7B%0A
+  
   fo
@@ -517,24 +517,26 @@
 rchPaths) %7B%0A
+  
     var bina
@@ -574,31 +574,20 @@
 i%5D, 
-'minidump_stackwalk'
+command
 );%0A
+  
     
@@ -615,32 +615,34 @@
 aryPath))%0A      
+  
 return binaryPat
@@ -644,16 +644,22 @@
 ryPath;%0A
+    %7D%0A
   %7D%0A%7D%0A%0Av
@@ -919,89 +919,73 @@
 var 
-minidumpProcessorPath = findMinidumpProcessorPath();%0A  if (!minidumpProcessorPath
+stackwalk = searchCommand('minidump_stackwalk');%0A  if (!stackwalk
 ) %7B%0A
@@ -1120,29 +1120,17 @@
 awn(
-minidumpProcessorPath
+stackwalk
 , %5Bm

Fix searching command under Windows.