Updated DebuggerWindow Files for Tracer
This commit is contained in:
parent
bf1d51b5d8
commit
c9b75f7490
|
@ -121,6 +121,22 @@ void DebuggerWindow::onDumpAddressTriggered()
|
||||||
scrollToMemoryAddress(address.value());
|
scrollToMemoryAddress(address.value());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void DebuggerWindow::onTraceTriggered()
|
||||||
|
{
|
||||||
|
if (!CPU::IsTraceEnabled())
|
||||||
|
{
|
||||||
|
QMessageBox::critical(
|
||||||
|
this, windowTitle(),
|
||||||
|
tr("Trace logging started to cpu_log.txt.\nThis file can be several gigabytes, so be aware of SSD wear."));
|
||||||
|
CPU::StartTrace();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
CPU::StopTrace();
|
||||||
|
QMessageBox::critical(this, windowTitle(), tr("Trace logging to cpu_log.txt stopped."));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void DebuggerWindow::onFollowAddressTriggered()
|
void DebuggerWindow::onFollowAddressTriggered()
|
||||||
{
|
{
|
||||||
//
|
//
|
||||||
|
@ -129,7 +145,7 @@ void DebuggerWindow::onFollowAddressTriggered()
|
||||||
void DebuggerWindow::onAddBreakpointTriggered()
|
void DebuggerWindow::onAddBreakpointTriggered()
|
||||||
{
|
{
|
||||||
std::optional<VirtualMemoryAddress> address =
|
std::optional<VirtualMemoryAddress> address =
|
||||||
QtUtils::PromptForAddress(this, windowTitle(), tr("Enter code address:") , true);
|
QtUtils::PromptForAddress(this, windowTitle(), tr("Enter code address:"), true);
|
||||||
if (!address.has_value())
|
if (!address.has_value())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -372,6 +388,7 @@ void DebuggerWindow::connectSignals()
|
||||||
connect(m_ui.actionGoToPC, &QAction::triggered, this, &DebuggerWindow::onGoToPCTriggered);
|
connect(m_ui.actionGoToPC, &QAction::triggered, this, &DebuggerWindow::onGoToPCTriggered);
|
||||||
connect(m_ui.actionGoToAddress, &QAction::triggered, this, &DebuggerWindow::onGoToAddressTriggered);
|
connect(m_ui.actionGoToAddress, &QAction::triggered, this, &DebuggerWindow::onGoToAddressTriggered);
|
||||||
connect(m_ui.actionDumpAddress, &QAction::triggered, this, &DebuggerWindow::onDumpAddressTriggered);
|
connect(m_ui.actionDumpAddress, &QAction::triggered, this, &DebuggerWindow::onDumpAddressTriggered);
|
||||||
|
connect(m_ui.actionTrace, &QAction::triggered, this, &DebuggerWindow::onTraceTriggered);
|
||||||
connect(m_ui.actionStepInto, &QAction::triggered, this, &DebuggerWindow::onStepIntoActionTriggered);
|
connect(m_ui.actionStepInto, &QAction::triggered, this, &DebuggerWindow::onStepIntoActionTriggered);
|
||||||
connect(m_ui.actionStepOver, &QAction::triggered, this, &DebuggerWindow::onStepOverActionTriggered);
|
connect(m_ui.actionStepOver, &QAction::triggered, this, &DebuggerWindow::onStepOverActionTriggered);
|
||||||
connect(m_ui.actionStepOut, &QAction::triggered, this, &DebuggerWindow::onStepOutActionTriggered);
|
connect(m_ui.actionStepOut, &QAction::triggered, this, &DebuggerWindow::onStepOutActionTriggered);
|
||||||
|
@ -379,7 +396,6 @@ void DebuggerWindow::connectSignals()
|
||||||
connect(m_ui.actionToggleBreakpoint, &QAction::triggered, this, &DebuggerWindow::onToggleBreakpointTriggered);
|
connect(m_ui.actionToggleBreakpoint, &QAction::triggered, this, &DebuggerWindow::onToggleBreakpointTriggered);
|
||||||
connect(m_ui.actionClearBreakpoints, &QAction::triggered, this, &DebuggerWindow::onClearBreakpointsTriggered);
|
connect(m_ui.actionClearBreakpoints, &QAction::triggered, this, &DebuggerWindow::onClearBreakpointsTriggered);
|
||||||
connect(m_ui.actionClose, &QAction::triggered, this, &DebuggerWindow::close);
|
connect(m_ui.actionClose, &QAction::triggered, this, &DebuggerWindow::close);
|
||||||
|
|
||||||
connect(m_ui.codeView, &QTreeView::activated, this, &DebuggerWindow::onCodeViewItemActivated);
|
connect(m_ui.codeView, &QTreeView::activated, this, &DebuggerWindow::onCodeViewItemActivated);
|
||||||
|
|
||||||
connect(m_ui.memoryRegionRAM, &QRadioButton::clicked, [this]() { setMemoryViewRegion(Bus::MemoryRegion::RAM); });
|
connect(m_ui.memoryRegionRAM, &QRadioButton::clicked, [this]() { setMemoryViewRegion(Bus::MemoryRegion::RAM); });
|
||||||
|
@ -440,6 +456,7 @@ void DebuggerWindow::setUIEnabled(bool enabled)
|
||||||
m_ui.actionStepOut->setEnabled(enabled);
|
m_ui.actionStepOut->setEnabled(enabled);
|
||||||
m_ui.actionGoToAddress->setEnabled(enabled);
|
m_ui.actionGoToAddress->setEnabled(enabled);
|
||||||
m_ui.actionGoToPC->setEnabled(enabled);
|
m_ui.actionGoToPC->setEnabled(enabled);
|
||||||
|
m_ui.actionTrace->setEnabled(enabled);
|
||||||
m_ui.memoryRegionRAM->setEnabled(enabled);
|
m_ui.memoryRegionRAM->setEnabled(enabled);
|
||||||
m_ui.memoryRegionEXP1->setEnabled(enabled);
|
m_ui.memoryRegionEXP1->setEnabled(enabled);
|
||||||
m_ui.memoryRegionScratchpad->setEnabled(enabled);
|
m_ui.memoryRegionScratchpad->setEnabled(enabled);
|
||||||
|
|
|
@ -43,6 +43,7 @@ private Q_SLOTS:
|
||||||
void onGoToAddressTriggered();
|
void onGoToAddressTriggered();
|
||||||
void onDumpAddressTriggered();
|
void onDumpAddressTriggered();
|
||||||
void onFollowAddressTriggered();
|
void onFollowAddressTriggered();
|
||||||
|
void onTraceTriggered();
|
||||||
void onAddBreakpointTriggered();
|
void onAddBreakpointTriggered();
|
||||||
void onToggleBreakpointTriggered();
|
void onToggleBreakpointTriggered();
|
||||||
void onClearBreakpointsTriggered();
|
void onClearBreakpointsTriggered();
|
||||||
|
@ -53,6 +54,7 @@ private Q_SLOTS:
|
||||||
void onMemorySearchTriggered();
|
void onMemorySearchTriggered();
|
||||||
void onMemorySearchStringChanged(const QString&);
|
void onMemorySearchStringChanged(const QString&);
|
||||||
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void setupAdditionalUi();
|
void setupAdditionalUi();
|
||||||
void connectSignals();
|
void connectSignals();
|
||||||
|
|
|
@ -36,12 +36,15 @@
|
||||||
<addaction name="actionGoToPC"/>
|
<addaction name="actionGoToPC"/>
|
||||||
<addaction name="actionGoToAddress"/>
|
<addaction name="actionGoToAddress"/>
|
||||||
<addaction name="actionDumpAddress"/>
|
<addaction name="actionDumpAddress"/>
|
||||||
|
<addaction name="separator"/>
|
||||||
|
<addaction name="actionTrace"/>
|
||||||
<addaction name="separator"/>
|
<addaction name="separator"/>
|
||||||
<addaction name="actionStepInto"/>
|
<addaction name="actionStepInto"/>
|
||||||
<addaction name="actionStepOver"/>
|
<addaction name="actionStepOver"/>
|
||||||
<addaction name="actionStepOut"/>
|
<addaction name="actionStepOut"/>
|
||||||
<addaction name="separator"/>
|
<addaction name="separator"/>
|
||||||
<addaction name="actionClose"/>
|
<addaction name="actionClose"/>
|
||||||
|
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QMenu" name="menuBreakpoints">
|
<widget class="QMenu" name="menuBreakpoints">
|
||||||
<property name="title">
|
<property name="title">
|
||||||
|
@ -79,6 +82,8 @@
|
||||||
<addaction name="actionStepInto"/>
|
<addaction name="actionStepInto"/>
|
||||||
<addaction name="actionStepOver"/>
|
<addaction name="actionStepOver"/>
|
||||||
<addaction name="actionStepOut"/>
|
<addaction name="actionStepOut"/>
|
||||||
|
<addaction name="separator"/>
|
||||||
|
<addaction name="actionTrace"/>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QDockWidget" name="dockWidget_2">
|
<widget class="QDockWidget" name="dockWidget_2">
|
||||||
<property name="features">
|
<property name="features">
|
||||||
|
@ -461,6 +466,23 @@
|
||||||
<string>Ctrl+D</string>
|
<string>Ctrl+D</string>
|
||||||
</property>
|
</property>
|
||||||
</action>
|
</action>
|
||||||
|
<action name="actionTrace">
|
||||||
|
<property name="icon">
|
||||||
|
<iconset resource="resources/resources.qrc">
|
||||||
|
<normaloff>:/icons/debug-trace.png</normaloff>:/icons/debug-trace.png</iconset>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Trace</string>
|
||||||
|
</property>
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>&Trace</string>
|
||||||
|
</property>
|
||||||
|
<property name="shortcut">
|
||||||
|
<string>Ctrl+T</string>
|
||||||
|
</property>
|
||||||
|
</action>
|
||||||
|
|
||||||
|
|
||||||
</widget>
|
</widget>
|
||||||
<customwidgets>
|
<customwidgets>
|
||||||
<customwidget>
|
<customwidget>
|
||||||
|
|
Loading…
Reference in New Issue