1
0
Fork 0

DBG+GUI: minor improvements

This commit is contained in:
mrexodia 2017-03-19 08:56:53 +01:00
parent de9f4b03bf
commit a14c534282
No known key found for this signature in database
GPG Key ID: FC89E0AAA0C1AAD8
4 changed files with 13 additions and 5 deletions

View File

@ -569,7 +569,11 @@ void DebugUpdateGui(duint disasm_addr, bool stack)
static volatile duint cacheCsp = 0;
if(csp != cacheCsp)
{
InterlockedExchange((volatile long*)&cacheCsp, csp);
#ifdef _WIN64
InterlockedExchange((volatile unsigned long long*)&cacheCsp, csp);
#else
InterlockedExchange((volatile unsigned long*)&cacheCsp, csp);
#endif //_WIN64
updateCallStackAsync(csp);
updateSEHChainAsync();
}

View File

@ -691,7 +691,13 @@ extern "C" DLL_EXPORT const char* _dbg_dbginit()
SCRIPTTYPEINFO info;
strcpy_s(info.name, GuiTranslateText(QT_TRANSLATE_NOOP("DBG", "Default")));
info.id = 0;
info.execute = DbgCmdExec;
info.execute = [](const char* cmd)
{
if(!DbgCmdExec(cmd))
return false;
GuiFlushLog();
return true;
};
info.completeCommand = nullptr;
GuiRegisterScriptLanguage(&info);
dputs(QT_TRANSLATE_NOOP("DBG", "Registering Script DLL command handler..."));

View File

@ -116,7 +116,6 @@ void CommandLineEdit::execute()
{
// Send this string directly to the user
exec(cmd.toUtf8().constData());
DbgCmdExec("flushlog");
}
// Add this line to the history and clear text, regardless if it was executed

View File

@ -1680,8 +1680,7 @@ void MainWindow::clickFavouriteTool()
else if(data.startsWith("Script,"))
{
QString scriptPath = data.mid(7);
DbgScriptUnload();
DbgScriptLoad(scriptPath.toUtf8().constData());
mScriptView->openRecentFile(scriptPath);
displayScriptWidget();
}
else if(data.compare("Command") == 0)