DBG+BRIDGE+GUI: nastry hack to force-flush the log on user commands
This commit is contained in:
parent
0a8091bc85
commit
e58bc13526
|
|
@ -1599,6 +1599,11 @@ BRIDGE_IMPEXP void GuiCloseApplication()
|
|||
_gui_sendmessage(GUI_CLOSE_APPLICATION, nullptr, nullptr);
|
||||
}
|
||||
|
||||
BRIDGE_IMPEXP void GuiFlushLog()
|
||||
{
|
||||
_gui_sendmessage(GUI_FLUSH_LOG, nullptr, nullptr);
|
||||
}
|
||||
|
||||
BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
|
||||
{
|
||||
hInst = hinstDLL;
|
||||
|
|
|
|||
|
|
@ -997,6 +997,7 @@ typedef enum
|
|||
GUI_MENU_SET_ENTRY_VISIBLE, // param1=int hEntry, param2=bool visible
|
||||
GUI_MENU_SET_NAME, // param1=int hMenu, param2=const char* name
|
||||
GUI_MENU_SET_ENTRY_NAME, // param1=int hEntry, param2=const char* name
|
||||
GUI_FLUSH_LOG, // param1=unused, param2=unused
|
||||
} GUIMSG;
|
||||
|
||||
//GUI Typedefs
|
||||
|
|
@ -1164,6 +1165,7 @@ BRIDGE_IMPEXP void* GuiTypeAddNode(void* parent, const TYPEDESCRIPTOR* type);
|
|||
BRIDGE_IMPEXP bool GuiTypeClear();
|
||||
BRIDGE_IMPEXP void GuiUpdateTypeWidget();
|
||||
BRIDGE_IMPEXP void GuiCloseApplication();
|
||||
BRIDGE_IMPEXP void GuiFlushLog();
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
|
|||
|
|
@ -469,3 +469,9 @@ bool cbInstrFocusinfo(int argc, char* argv[])
|
|||
dprintf("activeTitle: %s, activeClass: %s\n", activeView.title, activeView.className);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool cbInstrFlushlog(int argc, char* argv[])
|
||||
{
|
||||
GuiFlushLog();
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,4 +11,5 @@ bool cbInstrCapstone(int argc, char* argv[]);
|
|||
bool cbInstrVisualize(int argc, char* argv[]);
|
||||
bool cbInstrMeminfo(int argc, char* argv[]);
|
||||
bool cbInstrBriefcheck(int argc, char* argv[]);
|
||||
bool cbInstrFocusinfo(int argc, char* argv[]);
|
||||
bool cbInstrFocusinfo(int argc, char* argv[]);
|
||||
bool cbInstrFlushlog(int argc, char* argv[]);
|
||||
|
|
@ -430,6 +430,7 @@ static void registercommands()
|
|||
dbgcmdnew("briefcheck", cbInstrBriefcheck, true); //check if mnemonic briefs are missing
|
||||
dbgcmdnew("focusinfo", cbInstrFocusinfo, false);
|
||||
dbgcmdnew("printstack,logstack", cbInstrPrintStack, true); //print the call stack
|
||||
dbgcmdnew("flushlog", cbInstrFlushlog, false); //flush the log
|
||||
};
|
||||
|
||||
bool cbCommandProvider(char* cmd, int maxlen)
|
||||
|
|
|
|||
|
|
@ -778,6 +778,10 @@ void* Bridge::processMessage(GUIMSG type, void* param1, void* param2)
|
|||
case GUI_CLOSE_APPLICATION:
|
||||
emit closeApplication();
|
||||
break;
|
||||
|
||||
case GUI_FLUSH_LOG:
|
||||
emit flushLog();
|
||||
break;
|
||||
}
|
||||
|
||||
return nullptr;
|
||||
|
|
|
|||
|
|
@ -151,6 +151,7 @@ signals:
|
|||
void typeClear();
|
||||
void typeUpdateWidget();
|
||||
void closeApplication();
|
||||
void flushLog();
|
||||
|
||||
private:
|
||||
QMutex* mBridgeMutex;
|
||||
|
|
|
|||
|
|
@ -116,6 +116,7 @@ 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
|
||||
|
|
|
|||
|
|
@ -31,6 +31,7 @@ LogView::LogView(QWidget* parent) : QTextBrowser(parent), logRedirection(NULL)
|
|||
connect(Bridge::getBridge(), SIGNAL(addMsgToLog(QByteArray)), this, SLOT(addMsgToLogSlot(QByteArray)));
|
||||
connect(Bridge::getBridge(), SIGNAL(clearLog()), this, SLOT(clearLogSlot()));
|
||||
connect(Bridge::getBridge(), SIGNAL(setLogEnabled(bool)), this, SLOT(setLoggingEnabled(bool)));
|
||||
connect(Bridge::getBridge(), SIGNAL(flushLog()), this, SLOT(flushTimerSlot()));
|
||||
connect(this, SIGNAL(anchorClicked(QUrl)), this, SLOT(onAnchorClicked(QUrl)));
|
||||
|
||||
duint setting;
|
||||
|
|
|
|||
Loading…
Reference in New Issue