summaryrefslogtreecommitdiff
path: root/Base
diff options
context:
space:
mode:
authorFalseHonesty <thefalsehonesty@gmail.com>2020-05-30 14:19:49 -0400
committerAndreas Kling <kling@serenityos.org>2020-05-31 10:52:25 +0200
commit75e42648e11511401721da3ee00ca68afd1d4366 (patch)
tree2ea7ff16404cd59c6c4f89ccff988baaa5000d32 /Base
parentab40cc60d1304cba602edf648a2bda79aed1485c (diff)
downloadserenity-75e42648e11511401721da3ee00ca68afd1d4366.zip
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.
Diffstat (limited to 'Base')
-rw-r--r--Base/home/anon/little/main.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/Base/home/anon/little/main.cpp b/Base/home/anon/little/main.cpp
index 3cd4932ea5..e5f35cda0f 100644
--- a/Base/home/anon/little/main.cpp
+++ b/Base/home/anon/little/main.cpp
@@ -1,8 +1,16 @@
#include <stdio.h>
#include <sys/stat.h>
+struct MyStruct {
+ int x { -1 };
+ bool status { false };
+};
+
int main(int, char**)
{
+ MyStruct my_struct;
+ my_struct.status = !my_struct.status;
+ printf("my_struct.x is %d\n", my_struct.x);
for (int i = 0; i < 3; ++i) {
// This is a comment :^)
printf("Hello friends!\n");