Making the internal logger work

This commit is contained in:
Anonymus Raccoon
2020-03-24 02:56:46 +01:00
parent 95f17c06a8
commit 51ddb1f1cb
2 changed files with 33 additions and 6 deletions

View File

@@ -14,9 +14,11 @@ namespace ComSquare::Debugger
{
//! @brief The struct used to represent memory bus logs.
struct BusLog {
BusLog(bool write, uint24_t addr, std::shared_ptr<Memory::AMemory> &accessor, uint8_t oldData, uint8_t newData);
bool write;
uint24_t addr;
Memory::AMemory &accessor;
std::shared_ptr<Memory::AMemory> &accessor;
uint8_t oldData;
uint8_t newData;
};
@@ -36,6 +38,9 @@ public:
const BusLogModel &operator=(const BusLogModel &) = delete;
~BusLogModel() override = default;
//! @brief Add a log to the model
void log(ComSquare::Debugger::BusLog log);
//! @brief The number of row the table has.
int rowCount(const QModelIndex &parent) const override;
//! @brief The number of column the table has.
@@ -60,9 +65,6 @@ namespace ComSquare::Debugger
Ui::BusView _ui;
//! @brief The Log visualizer model for QT.
BusLogModel _model;
//! @brief Log a read/write to the debugger.
// void log()
public:
//! @brief Called when the window is closed. Turn off the debugger and revert to a basic CPU.
void disableViewer();