Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Debugger: Add Reset button #12082

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions pcsx2-qt/Debugger/DebuggerWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ DebuggerWindow::DebuggerWindow(QWidget* parent)
#endif

connect(m_ui.actionRun, &QAction::triggered, this, &DebuggerWindow::onRunPause);
connect(m_ui.actionReset, &QAction::triggered, this, &DebuggerWindow::onReset);
connect(m_ui.actionStepInto, &QAction::triggered, this, &DebuggerWindow::onStepInto);
connect(m_ui.actionStepOver, &QAction::triggered, this, &DebuggerWindow::onStepOver);
connect(m_ui.actionStepOut, &QAction::triggered, this, &DebuggerWindow::onStepOut);
Expand Down Expand Up @@ -113,6 +114,11 @@ void DebuggerWindow::onRunPause()
g_emu_thread->setVMPaused(!QtHost::IsVMPaused());
}

void DebuggerWindow::onReset()
{
g_emu_thread->resetVM();
}

void DebuggerWindow::onStepInto()
{
CpuWidget* currentCpu = static_cast<CpuWidget*>(m_ui.cpuTabs->currentWidget());
Expand Down
2 changes: 2 additions & 0 deletions pcsx2-qt/Debugger/DebuggerWindow.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ class DebuggerWindow : public QMainWindow
public slots:
void onVMStateChanged();
void onRunPause();
void onReset();
void onStepInto();
void onStepOver();
void onStepOut();
Expand All @@ -30,6 +31,7 @@ public slots:
private:
Ui::DebuggerWindow m_ui;
QAction* m_actionRunPause;
QAction* m_actionReset;
QAction* m_actionStepInto;
QAction* m_actionStepOver;
QAction* m_actionStepOut;
Expand Down
9 changes: 9 additions & 0 deletions pcsx2-qt/Debugger/DebuggerWindow.ui
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
<bool>false</bool>
</attribute>
<addaction name="actionRun"/>
<addaction name="actionReset"/>
<addaction name="actionStepInto"/>
<addaction name="actionStepOver"/>
<addaction name="actionStepOut"/>
Expand All @@ -65,6 +66,14 @@
<string>Run</string>
</property>
</action>
<action name="actionReset">
<property name="icon">
<iconset theme="restart-line"/>
</property>
<property name="text">
<string>Reset</string>
</property>
</action>
<action name="actionStepInto">
<property name="icon">
<iconset theme="debug-step-into-line"/>
Expand Down
Loading