1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-19 00:55:08 +00:00

HackStudio: Support debugging variables with Enum types

Variables with enum types can now be both viewed and modified in the
variables view!
This commit is contained in:
FalseHonesty 2020-05-31 22:51:12 -04:00 committed by Andreas Kling
parent a4f23429aa
commit f958c693ee
3 changed files with 41 additions and 10 deletions

View file

@ -71,7 +71,7 @@ DebugInfoWidget::DebugInfoWidget()
auto* variable = static_cast<const DebugInfo::VariableInfo*>(index.internal_data());
if (variable->location_type != DebugInfo::VariableInfo::LocationType::Address)
return false;
return variable->type.is_one_of("int", "bool");
return variable->is_enum_type() || variable->type_name.is_one_of("int", "bool");
};
m_variables_view->on_context_menu_request = [this, is_valid_index](auto& index, auto& event) {