Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[platform-debug-dev] Design of "changed variable" support

I am converting from our own implementation of "changed variable" support
to make use of the core debug support and have run into some problems.

Before I get into the details I understand that by having core do the
implementation, all plugins can benefit from this support.
I would like debug plugins have the option of how to implement this
support.

Here are my reasons:

1) The current implementation relies on a comparison between the current
and previous values to decide if it has changed.

> We have debug engines that can determine that a variable has changed even
when it has been updated with the same value.

> I would like to see a new method on the IVariable interface:
IVariable.hasChanged()  that would be called when the plugin implements
their own support.

2) The use of a "disabled" icon to indicate that a variable has not changed
conflicts with the concept of disabling the monitoring of a variable.  Our
plugin allows a user to enable/disable the monitoring of a variable in the
same way you can enable/disable a breakpoint.

> I suggest using an icon decorator (a small delta symbol) that would
overlay the plugin supplied icon for that variable.
-or-
> Allow us to have muliple icons.   Our model presentation returns
different icons based on the "changed" state.

3) Current support doesn't show the top node of complex variables with
children, as changed if anyone of the children has changed.   This is
especially so if the children are not currently visible.

> Clearly the UI can't be expected to know the state of all the children.
Only the engine would know that some leaf node changed.  To the user it
would be valuable to know without expanding the whole variable tree that
something had changed in it.

> Another problem is that expanding a variable should show the node that
changed, something that the UI change implementation wouldn't be able to
detect.

4) We have other views that also show "changed" state and need to make them
consistent.   Having control ourselves would allow us to do that.
Otherwise we would have to make it look the same as the "Variables" view.

5) This could be memory hungry if the contents of the variables are very
large.

The following I believe are bugs and if you say so I will open them as
such.

Bug 1)   Clicking on one stack frame and then another loses the "changed"
state.    If I haven't moved the program the state should be remembered
even when I change stackframes.

Bug 2) Changed only works if I step.   It doesn't appear to work if I run
to a breakpoint even if it is in the same stackframe, which is a valid
operation.


Bottom line:   As nice as it is to have a common default implementation of
the "changed variable" support I think there are enough problems to either
put the responsiblity back on the IVariable to determine if it has changed.
(IVariable.hasChanged()) or allow a plugin to disable the internal method
and implement their own.




Alan Boxall - IBM Distributed Debugger
D1/121/8200/MKM
internet id : boxall@xxxxxxxxxx
Notes: Alan Boxall/Toronto/IBM @ IBMCA
Phn:(905)413-4117   T.L. 969-4117
Fax:(905)413-4850   T.L. 969-4850



Back to the top