Added unsigned indicator to integer data type in focused memory region manager
This commit is contained in:
@@ -9,7 +9,7 @@ namespace Bloom
|
|||||||
enum class MemoryRegionDataType: std::uint8_t
|
enum class MemoryRegionDataType: std::uint8_t
|
||||||
{
|
{
|
||||||
UNKNOWN,
|
UNKNOWN,
|
||||||
INTEGER,
|
UNSIGNED_INTEGER,
|
||||||
ASCII_STRING,
|
ASCII_STRING,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ void ValueAnnotationItem::refreshLabelText() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
switch (this->focusedMemoryRegion.dataType) {
|
switch (this->focusedMemoryRegion.dataType) {
|
||||||
case MemoryRegionDataType::INTEGER: {
|
case MemoryRegionDataType::UNSIGNED_INTEGER: {
|
||||||
std::uint64_t integerValue = 0;
|
std::uint64_t integerValue = 0;
|
||||||
for (const auto& byte : data) {
|
for (const auto& byte : data) {
|
||||||
integerValue = (integerValue << 8) | byte;
|
integerValue = (integerValue << 8) | byte;
|
||||||
|
|||||||
@@ -55,8 +55,10 @@ void FocusedRegionItem::initFormInputs() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
switch (region.dataType) {
|
switch (region.dataType) {
|
||||||
case MemoryRegionDataType::INTEGER: {
|
case MemoryRegionDataType::UNSIGNED_INTEGER: {
|
||||||
this->dataTypeInput->setCurrentText(FocusedRegionItem::dataTypeOptionsByName.at("integer").text);
|
this->dataTypeInput->setCurrentText(FocusedRegionItem::dataTypeOptionsByName.at("unsigned_integer").text);
|
||||||
|
break;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case MemoryRegionDataType::ASCII_STRING: {
|
case MemoryRegionDataType::ASCII_STRING: {
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ namespace Bloom::Widgets
|
|||||||
QString, DataTypeOption
|
QString, DataTypeOption
|
||||||
>({
|
>({
|
||||||
{"other", DataTypeOption("Other", MemoryRegionDataType::UNKNOWN)},
|
{"other", DataTypeOption("Other", MemoryRegionDataType::UNKNOWN)},
|
||||||
{"integer", DataTypeOption("Integer", MemoryRegionDataType::INTEGER)},
|
{"unsigned_integer", DataTypeOption("Unsigned Integer", MemoryRegionDataType::UNSIGNED_INTEGER)},
|
||||||
{"ascii", DataTypeOption("ASCII String", MemoryRegionDataType::ASCII_STRING)},
|
{"ascii", DataTypeOption("ASCII String", MemoryRegionDataType::ASCII_STRING)},
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user