HackStudio: Allow changing variable values in debugger

This patch adds a context menu to variables in the debugger variable
tree view that has an option to set the value of a variable. An input
box will pop up asking for the new value of the variable, which
is then parsed and used to set the actual variable.
This commit is contained in:
FalseHonesty 2020-05-30 14:19:49 -04:00 committed by Andreas Kling
parent ab40cc60d1
commit 75e42648e1
Notes: sideshowbarker 2024-07-19 05:55:34 +09:00
5 changed files with 108 additions and 14 deletions

View file

@ -36,6 +36,8 @@ class VariablesModel final : public GUI::Model {
public:
static RefPtr<VariablesModel> create(const PtraceRegisters& regs);
void set_variable_value(const GUI::ModelIndex&, const StringView&, GUI::Window*);
virtual int row_count(const GUI::ModelIndex& = GUI::ModelIndex()) const override;
virtual int column_count(const GUI::ModelIndex& = GUI::ModelIndex()) const override { return 1; }
virtual GUI::Variant data(const GUI::ModelIndex& index, Role role = Role::Display) const override;