Fix issue in setting central address across memory/cache tab
MODIFY
src/mainwindow.cpp
src/mainwindow.cpp
@@ -117,6 +117,8 @@ MainWindow::MainWindow(QWidget* parent) : QMainWindow(parent), m_ui(new Ui::Main
connect(m_ui->actionVersion, &QAction::triggered, this, &MainWindow::version);
connect(m_ui->actionSettings, &QAction::triggered, this, &MainWindow::settingsTriggered);
+ connect(m_cacheTab, &CacheTab::focusAddressChanged, m_memoryTab, &MemoryTab::setCentralAddress);
+
m_ui->tabbar->setActiveIndex(1);
}

MODIFY
src/memorytab.cpp
src/memorytab.cpp
@@ -18,9 +18,6 @@ MemoryTab::MemoryTab(QToolBar* toolbar, QWidget* parent) : RipesTab(toolbar, par
m_ui->memoryViewerWidget->updateModel();
m_ui->memoryViewerWidget->updateView();
- connect(m_ui->cacheTabWidget, &CacheTabWidget::focusAddressChanged, m_ui->memoryViewerWidget,
- &MemoryViewerWidget::setCentralAddress);
-
// During processor running, it should not be possible to interact with the memory viewer or cache widgets
connect(ProcessorHandler::get(), &ProcessorHandler::runStarted, [=] { setEnabled(false); });
connect(ProcessorHandler::get(), &ProcessorHandler::runFinished, [=] { setEnabled(true); });
@@ -40,4 +37,9 @@ MemoryTab::MemoryTab(QToolBar* toolbar, QWidget* parent) : RipesTab(toolbar, par
MemoryTab::~MemoryTab() {
delete m_ui;
}
+
+void MemoryTab::setCentralAddress(unsigned int address) {
+ m_ui->memoryViewerWidget->setCentralAddress(address);
+}
+
} // namespace Ripes

MODIFY
src/memorytab.h
src/memorytab.h
@@ -24,6 +24,8 @@ public:
MemoryTab(QToolBar* toolbar, QWidget* parent = nullptr);
~MemoryTab() override;
+ void setCentralAddress(unsigned address);
+
private:
Ui::MemoryTab* m_ui = nullptr;
};

Fix issue in setting central address across memory/cache tab