Community
Participate
Working Groups
Create a hello, world program, and add a global variable "int foobar;" to that problem as well. Build and launch it under debugger. Right click the source, select "add watch expression" and type 'foobar' as the name. The "Expressions" window appears. Right click on the 'foobar' there, and observe "Change Value" menu item, grayed out. An expression can be either lvalue or rvalue, and lvalues should be editable via UI. One can use GDB -var-show-attributes command to discover is a variable object is editable or not.
The enablement of "Change Value" depends on IValueModification interface. The WatchExpression object created by "Add Watch Expression" command doesn't implement IValueModification interface. This code is part of the Platform and we don't have access to it. cc-ing to platform for comment.
The platform models a watch expression as an expression that changes value based on the context in which it is evaluated. It is not something that is assigned a value - the value comes from the evaluation.
I can't resist making a shameless plug for DSF, which does support editing in the Expressions view... For standard debug model/CDI, it's probably safe to mark it as WONTFIX.
If DSF can do it, we can do it too :). Marking as "enhancement".
(In reply to comment #4) Wisely you speak :-) I definitely won't deny that it's possible.