2024.8.17
This commit is contained in:
39
cpu/cpu.cpp
Normal file
39
cpu/cpu.cpp
Normal 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
20
cpu/cpu.h
Normal 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
|
||||
Reference in New Issue
Block a user