GUI: added "run until expression" feature
This commit is contained in:
parent
07ca0a45c3
commit
2d4a463d12
|
@ -244,6 +244,7 @@ MainWindow::MainWindow(QWidget* parent)
|
||||||
connect(ui->actionSkipNextInstruction, SIGNAL(triggered()), this, SLOT(execSkip()));
|
connect(ui->actionSkipNextInstruction, SIGNAL(triggered()), this, SLOT(execSkip()));
|
||||||
connect(ui->actionScript, SIGNAL(triggered()), this, SLOT(displayScriptWidget()));
|
connect(ui->actionScript, SIGNAL(triggered()), this, SLOT(displayScriptWidget()));
|
||||||
connect(ui->actionRunSelection, SIGNAL(triggered()), this, SLOT(runSelection()));
|
connect(ui->actionRunSelection, SIGNAL(triggered()), this, SLOT(runSelection()));
|
||||||
|
connect(ui->actionRunExpression, SIGNAL(triggered(bool)), this, SLOT(runExpression()));
|
||||||
connect(ui->actionHideDebugger, SIGNAL(triggered()), this, SLOT(hideDebugger()));
|
connect(ui->actionHideDebugger, SIGNAL(triggered()), this, SLOT(hideDebugger()));
|
||||||
connect(ui->actionCpu, SIGNAL(triggered()), this, SLOT(displayCpuWidget()));
|
connect(ui->actionCpu, SIGNAL(triggered()), this, SLOT(displayCpuWidget()));
|
||||||
connect(ui->actionSymbolInfo, SIGNAL(triggered()), this, SLOT(displaySymbolWidget()));
|
connect(ui->actionSymbolInfo, SIGNAL(triggered()), this, SLOT(displaySymbolWidget()));
|
||||||
|
@ -448,6 +449,7 @@ void MainWindow::refreshShortcuts()
|
||||||
setGlobalShortcut(ui->actionRun, ConfigShortcut("DebugRun"));
|
setGlobalShortcut(ui->actionRun, ConfigShortcut("DebugRun"));
|
||||||
setGlobalShortcut(ui->actioneRun, ConfigShortcut("DebugeRun"));
|
setGlobalShortcut(ui->actioneRun, ConfigShortcut("DebugeRun"));
|
||||||
setGlobalShortcut(ui->actionRunSelection, ConfigShortcut("DebugRunSelection"));
|
setGlobalShortcut(ui->actionRunSelection, ConfigShortcut("DebugRunSelection"));
|
||||||
|
setGlobalShortcut(ui->actionRunExpression, ConfigShortcut("DebugRunExpression"));
|
||||||
setGlobalShortcut(ui->actionPause, ConfigShortcut("DebugPause"));
|
setGlobalShortcut(ui->actionPause, ConfigShortcut("DebugPause"));
|
||||||
setGlobalShortcut(ui->actionRestart, ConfigShortcut("DebugRestart"));
|
setGlobalShortcut(ui->actionRestart, ConfigShortcut("DebugRestart"));
|
||||||
setGlobalShortcut(ui->actionClose, ConfigShortcut("DebugClose"));
|
setGlobalShortcut(ui->actionClose, ConfigShortcut("DebugClose"));
|
||||||
|
@ -1127,6 +1129,20 @@ void MainWindow::runSelection()
|
||||||
DbgCmdExecDirect("run");
|
DbgCmdExecDirect("run");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void MainWindow::runExpression()
|
||||||
|
{
|
||||||
|
if(!DbgIsDebugging())
|
||||||
|
return;
|
||||||
|
|
||||||
|
GotoDialog gotoDialog(this);
|
||||||
|
gotoDialog.setWindowTitle(tr("Enter expression to run to..."));
|
||||||
|
if(gotoDialog.exec() != QDialog::Accepted)
|
||||||
|
return;
|
||||||
|
|
||||||
|
if(DbgCmdExecDirect(QString("bp \"%1\", ss").arg(gotoDialog.expressionText).toUtf8().constData()))
|
||||||
|
DbgCmdExecDirect("run");
|
||||||
|
}
|
||||||
|
|
||||||
void MainWindow::getStrWindow(const QString title, QString* text)
|
void MainWindow::getStrWindow(const QString title, QString* text)
|
||||||
{
|
{
|
||||||
LineEditDialog mLineEdit(this);
|
LineEditDialog mLineEdit(this);
|
||||||
|
|
|
@ -108,6 +108,7 @@ public slots:
|
||||||
void setIconMenuEntry(int hEntry, QIcon icon);
|
void setIconMenuEntry(int hEntry, QIcon icon);
|
||||||
void setIconMenu(int hMenu, QIcon icon);
|
void setIconMenu(int hMenu, QIcon icon);
|
||||||
void runSelection();
|
void runSelection();
|
||||||
|
void runExpression();
|
||||||
void getStrWindow(const QString title, QString* text);
|
void getStrWindow(const QString title, QString* text);
|
||||||
void patchWindow();
|
void patchWindow();
|
||||||
void displayComments();
|
void displayComments();
|
||||||
|
|
|
@ -96,6 +96,7 @@
|
||||||
<addaction name="actionRun"/>
|
<addaction name="actionRun"/>
|
||||||
<addaction name="actioneRun"/>
|
<addaction name="actioneRun"/>
|
||||||
<addaction name="actionRunSelection"/>
|
<addaction name="actionRunSelection"/>
|
||||||
|
<addaction name="actionRunExpression"/>
|
||||||
<addaction name="actionPause"/>
|
<addaction name="actionPause"/>
|
||||||
<addaction name="actionRestart"/>
|
<addaction name="actionRestart"/>
|
||||||
<addaction name="actionClose"/>
|
<addaction name="actionClose"/>
|
||||||
|
@ -856,6 +857,15 @@
|
||||||
<string>Run to &user code</string>
|
<string>Run to &user code</string>
|
||||||
</property>
|
</property>
|
||||||
</action>
|
</action>
|
||||||
|
<action name="actionRunExpression">
|
||||||
|
<property name="icon">
|
||||||
|
<iconset resource="../../resource.qrc">
|
||||||
|
<normaloff>:/icons/images/arrow-run-cursor.png</normaloff>:/icons/images/arrow-run-cursor.png</iconset>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Run until e&xpression</string>
|
||||||
|
</property>
|
||||||
|
</action>
|
||||||
</widget>
|
</widget>
|
||||||
<layoutdefault spacing="6" margin="11"/>
|
<layoutdefault spacing="6" margin="11"/>
|
||||||
<resources>
|
<resources>
|
||||||
|
|
|
@ -279,6 +279,7 @@ Configuration::Configuration() : QObject(), noMoreMsgbox(false)
|
||||||
defaultShortcuts.insert("DebugRun", Shortcut(tr("Debug -> Run"), "F9", true));
|
defaultShortcuts.insert("DebugRun", Shortcut(tr("Debug -> Run"), "F9", true));
|
||||||
defaultShortcuts.insert("DebugeRun", Shortcut(tr("Debug -> Run (skip exceptions)"), "Shift+F9", true));
|
defaultShortcuts.insert("DebugeRun", Shortcut(tr("Debug -> Run (skip exceptions)"), "Shift+F9", true));
|
||||||
defaultShortcuts.insert("DebugRunSelection", Shortcut(tr("Debug -> Run until selection"), "F4", true));
|
defaultShortcuts.insert("DebugRunSelection", Shortcut(tr("Debug -> Run until selection"), "F4", true));
|
||||||
|
defaultShortcuts.insert("DebugRunExpression", Shortcut(tr("Debug -> Run until expression"), "Shift+F4", true));
|
||||||
defaultShortcuts.insert("DebugPause", Shortcut(tr("Debug -> Pause"), "F12", true));
|
defaultShortcuts.insert("DebugPause", Shortcut(tr("Debug -> Pause"), "F12", true));
|
||||||
defaultShortcuts.insert("DebugRestart", Shortcut(tr("Debug -> Restart"), "Ctrl+F2", true));
|
defaultShortcuts.insert("DebugRestart", Shortcut(tr("Debug -> Restart"), "Ctrl+F2", true));
|
||||||
defaultShortcuts.insert("DebugClose", Shortcut(tr("Debug -> Close"), "Alt+F2", true));
|
defaultShortcuts.insert("DebugClose", Shortcut(tr("Debug -> Close"), "Alt+F2", true));
|
||||||
|
|
Loading…
Reference in New Issue