From 733056197809ae6c2fca9ec379989eaa1250416b Mon Sep 17 00:00:00 2001 From: tintinweb Date: Wed, 20 Jul 2022 15:43:17 +0200 Subject: [PATCH] ida error output window --- src/features/commands/default.js | 9 ++++++++- src/features/decompile.js | 3 ++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/features/commands/default.js b/src/features/commands/default.js index 03ada5b..94026aa 100644 --- a/src/features/commands/default.js +++ b/src/features/commands/default.js @@ -172,7 +172,7 @@ ${fs.readFileSync(outputFilePath, 'utf8')};`; }); } - idaDecompile(binaryPath, progressCallback, token) { + idaDecompile(binaryPath, progressCallback, token, onErrorCallback) { let ctrl = this.ctrl; return new Promise((resolve, reject) => { let toolpath = settings.extensionConfig().tool.idaPro.path; @@ -331,6 +331,13 @@ ${fs.readFileSync(outputFilePath, 'utf8')};`; console.log(`${cmd.pid} - process killed - ${cmd.killed}`); }); } + }, + onStdErr: (data) => { + data = `${data}`; + console.log(data); + if(onErrorCallback){ + onErrorCallback(data); + } } } ); diff --git a/src/features/decompile.js b/src/features/decompile.js index d6d048f..a885a56 100644 --- a/src/features/decompile.js +++ b/src/features/decompile.js @@ -46,7 +46,8 @@ class DecompileCtrl { vscode.window.outputChannel.appendLine(` Decompiling ${uri.fsPath}`); vscode.window.outputChannel.appendLine("===================================================================="); vscode.window.outputChannel.appendLine(""); - vscode.window.outputChannel.appendLine("StdErr:"); + vscode.window.outputChannel.appendLine("Errors: "); + vscode.window.outputChannel.appendLine("------- "); vscode.window.outputChannel.appendLine(""); return this.decompile(