2024.8.17

This commit is contained in:
rootacite
2024-08-17 17:09:05 +08:00
committed by acite
parent 6d950b92f7
commit 4a7622807a
14 changed files with 1176 additions and 0 deletions

39
cpu/cpu.cpp Normal file
View File

@@ -0,0 +1,39 @@
//
// Created by acite on 5/1/24.
//
#include "cpu.h"
using namespace std;
using namespace Gtk;
extern TreeView* codeView;
extern Glib::RefPtr<ListStore> codeViewStore;
void add_row(const string& addr,
const string& data,
const string& dasm,
const string& sts
){
auto mm = codeViewStore->append();
Gtk::TreeModel::Row row = *mm;
row.set_value(0, addr);
row.set_value(1, data);
row.set_value(2, dasm);
row.set_value(3, sts);
}
void set_row_status(uint64_t index_addr, const string& sts)
{
string addr;
for(auto i : codeViewStore->children())
{
i.get_value(0, addr);
if(to_string(index_addr) == addr)
{
i.set_value(3, sts);
break;
}
}
}

20
cpu/cpu.h Normal file
View File

@@ -0,0 +1,20 @@
//
// Created by acite on 5/1/24.
//
#ifndef ALDBG_CPU_H
#define ALDBG_CPU_H
#include <gtkmm.h>
#include <iostream>
#include <string>
void add_row(const std::string &addr,
const std::string &data,
const std::string &dasm,
const std::string &sts
);
void set_row_status(uint64_t index_addr, const std::string& sts);
#endif //ALDBG_CPU_H