disassembly and new font
This commit is contained in:
53
src/data.h
53
src/data.h
@@ -7,6 +7,36 @@
|
||||
|
||||
namespace dbgui::data
|
||||
{
|
||||
struct TypeInfo
|
||||
{
|
||||
enum class Type
|
||||
{
|
||||
custom,
|
||||
u8,
|
||||
u16,
|
||||
u32,
|
||||
u64,
|
||||
i8,
|
||||
i16,
|
||||
i32,
|
||||
i64,
|
||||
f32,
|
||||
f64,
|
||||
|
||||
// ptr,
|
||||
// arr,
|
||||
// complex,
|
||||
};
|
||||
|
||||
Type type;
|
||||
// std::variant<std::monostate, PtrInfo, ComplexInfo> add;
|
||||
|
||||
bool operator==(const TypeInfo &rhs) const
|
||||
{
|
||||
return this->type == rhs.type;
|
||||
}
|
||||
};
|
||||
|
||||
struct DataSource
|
||||
{
|
||||
enum class Type : uint8_t
|
||||
@@ -28,15 +58,34 @@ namespace dbgui::data
|
||||
std::variant<std::monostate, Reg> data;
|
||||
};
|
||||
|
||||
struct DataNode
|
||||
struct Disassemble
|
||||
{
|
||||
size_t id;
|
||||
// Node that provides the address to disassemble
|
||||
// type must be integer
|
||||
size_t src_id;
|
||||
};
|
||||
|
||||
struct DataNode
|
||||
{
|
||||
enum class Type : uint8_t
|
||||
{
|
||||
data_source,
|
||||
disassemble,
|
||||
};
|
||||
|
||||
size_t id;
|
||||
Type type;
|
||||
std::variant<DataSource, Disassemble> data;
|
||||
};
|
||||
|
||||
// TODO: this should allow only updating part of arrays
|
||||
// and moving in it
|
||||
struct DataResult
|
||||
{
|
||||
// TODO: needs indicator that data was failed to be retrieved
|
||||
size_t id;
|
||||
bool success;
|
||||
TypeInfo type;
|
||||
std::vector<uint8_t> data;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user