From fe72065b4daa120cff2d26e2da313fea62d19f5a Mon Sep 17 00:00:00 2001 From: dreg_fr33project Date: Thu, 14 Aug 2014 05:10:09 +0200 Subject: [PATCH] more info in the jit stuff --- x64_dbg_dbg/_dbgfunctions.cpp | 2 +- x64_dbg_gui/Project/Src/Gui/SettingsDialog.cpp | 12 +++++++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/x64_dbg_dbg/_dbgfunctions.cpp b/x64_dbg_dbg/_dbgfunctions.cpp index 815d8568..8caa2ec3 100644 --- a/x64_dbg_dbg/_dbgfunctions.cpp +++ b/x64_dbg_dbg/_dbgfunctions.cpp @@ -122,7 +122,7 @@ static bool _getjit(char* jit, bool jit64) return false; strcpy(jit, jit_tmp); } - else + else // if jit input == NULL: it returns false if there are not an OLD JIT STORED. { char oldjit[MAX_SETTING_SIZE] = ""; if(!BridgeSettingGet("JIT", "Old", (char*) & oldjit)) diff --git a/x64_dbg_gui/Project/Src/Gui/SettingsDialog.cpp b/x64_dbg_gui/Project/Src/Gui/SettingsDialog.cpp index b6b1cda2..437dd82c 100644 --- a/x64_dbg_gui/Project/Src/Gui/SettingsDialog.cpp +++ b/x64_dbg_gui/Project/Src/Gui/SettingsDialog.cpp @@ -367,8 +367,18 @@ void SettingsDialog::on_chkSetJIT_stateChanged(int arg1) qsjit_def_entry = jit_def_entry; - if(!DbgFunctions()->GetJit(NULL, true) && ui->editJIT->text() == qsjit_def_entry) + // if there are not an OLD JIT Stored GetJit(NULL,) returns false. + if((DbgFunctions()->GetJit(NULL, true) == false) && (ui->editJIT->text() == qsjit_def_entry)) { + /* + * Only do this when the user wants uncheck the JIT and there are not an OLD JIT Stored + * and the JIT in Windows registry its this debugger. + * Scenario 1: the JIT in Windows registry its this debugger, if the database of the + * debugger was removed and the user wants uncheck the JIT: he cant (this block its executed then) + * - + * Scenario 2: the JIT in Windows registry its NOT this debugger, if the database of the debugger + * was removed and the user in MISC tab wants check and uncheck the JIT checkbox: he can (this block its NOT executed then). + */ QMessageBox msg(QMessageBox::Warning, "ERROR NOT FOUND OLD JIT", "NOT FOUND OLD JIT ENTRY STORED, USE SETJIT COMMAND"); msg.setWindowIcon(QIcon(":/icons/images/compile-warning.png")); msg.setParent(this, Qt::Dialog);