Skip to content

Commit

Permalink
Merge pull request #8387 from sepalani/reg-view-in
Browse files Browse the repository at this point in the history
RegisterWidget: Fix view in code/memory
  • Loading branch information
JosJuice committed Oct 16, 2019
2 parents d6a394e + beeb68d commit a6daed2
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Source/Core/DolphinQt/Debugger/RegisterWidget.cpp
Expand Up @@ -123,8 +123,10 @@ void RegisterWidget::ShowContextMenu()
// It's not related to timekeeping devices.
menu->addAction(tr("Add to &watch"), this,
[this, item] { emit RequestMemoryBreakpoint(item->GetValue()); });
menu->addAction(tr("View &memory"));
menu->addAction(tr("View &code"));
menu->addAction(tr("View &memory"), this,
[this, item] { emit RequestViewInMemory(item->GetValue()); });
menu->addAction(tr("View &code"), this,
[this, item] { emit RequestViewInCode(item->GetValue()); });

menu->addSeparator();

Expand Down
2 changes: 2 additions & 0 deletions Source/Core/DolphinQt/Debugger/RegisterWidget.h
Expand Up @@ -24,6 +24,8 @@ class RegisterWidget : public QDockWidget

signals:
void RequestTableUpdate();
void RequestViewInCode(u32 addr);
void RequestViewInMemory(u32 addr);
void RequestMemoryBreakpoint(u32 addr);
void UpdateTable();
void UpdateValue(QTableWidgetItem* item);
Expand Down
5 changes: 5 additions & 0 deletions Source/Core/DolphinQt/MainWindow.cpp
Expand Up @@ -394,6 +394,11 @@ void MainWindow::CreateComponents()
[this](u32 addr) { m_breakpoint_widget->AddAddressMBP(addr); });
connect(m_register_widget, &RegisterWidget::RequestMemoryBreakpoint,
[this](u32 addr) { m_breakpoint_widget->AddAddressMBP(addr); });
connect(m_register_widget, &RegisterWidget::RequestViewInMemory, m_memory_widget,
[this](u32 addr) { m_memory_widget->SetAddress(addr); });
connect(m_register_widget, &RegisterWidget::RequestViewInCode, m_code_widget, [this](u32 addr) {
m_code_widget->SetAddress(addr, CodeViewWidget::SetAddressUpdate::WithUpdate);
});

connect(m_code_widget, &CodeWidget::BreakpointsChanged, m_breakpoint_widget,
&BreakpointWidget::Update);
Expand Down

0 comments on commit a6daed2

Please sign in to comment.