Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] DSF and VMProviders

Hi Mark,

On 05/16/2011 07:14 AM, Marc Khouzam wrote:

I'm not very knowledgeable about the debug platform so I'm seeing things I don't understand with DSF.

DSF creates different VMProvider such as ExpressionVMProvider.  Those Providers don't seem to get
disposed/removed when I change the debug context to a non-DSF debugger.  Maybe that is normal?
Yes, this is normal. The main reason why we persist the vm providers this way is to keep cached data between changes in active context and between steps... and the cache is firstly needed for keeping track of changed values.
The problem is that ExpressionVMProvider is an IExpressionsListener2 and can be used to format
expressions.  Since ExpressionVMProvider is not disposed/removed once I select a different
debugger, it keeps modifying my expresions, even though I'm not using it anymore.
Could you give more detail here. Is the listener modifying the expressions in the platform expression manager?

In either case, the expression listener can be configured not to do anything if the given vm provider is not currently used in any particular view. To do this you can look at the VM model proxies that are owned by the vm provider. If all of them are disposed, then the VM provider is not currently active.

In normal event processing (AbstractCachingVMProvider.handleEvent), if all proxies are disposed then the VM provider will not issue any deltas, but it will still process the event so that the cache for each proxy is updated.
Does this mean that the VMProvider should indeed be removed as soon as the current
debug context changes?
This would break the current cache implementation. But a VM provider could also be implemented without caching, in which case you could dispose it on debug context change.



cdt-dev mailing list

Back to the top