mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 05:17:35 +00:00
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:
parent
ab40cc60d1
commit
75e42648e1
5 changed files with 108 additions and 14 deletions
|
@ -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");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue