Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 330975

Summary: When I select a different stack frame in the Debug View the Modules View flickers
Product: [Tools] CDT Reporter: Dobrin Alexiev <dalexiev>
Component: cdt-debug-dsfAssignee: Project Inbox <cdt-debug-dsf-inbox>
Status: NEW --- QA Contact: Jonah Graham <jonah>
Severity: normal    
Priority: P3 CC: cdtdoug, marc.khouzam
Version: 8.0   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description Dobrin Alexiev CLA 2010-11-23 16:52:01 EST
Build Identifier: Build id: M20100909-0800

I noticed that RegisterVMProvider work arounds that problem by overriding 
	public void update(IViewerInputUpdate update)
and changing the input element to a private ViewInputElement with a DMContext set to the parent IExecutionDMContext. 

I tested the same approach in my private ModuleVMProvider and it worked. 

Is this the right approach to prevent the flickering of the Module View? 

If so I can created a patch that is common between the RegisterVMProvider  and the ModuleVMProvider and submit it as a patch to DSF? 

I believe in the real patch IExecutionDMContext has to somehow be negotiated. 


Reproducible: Always

Steps to Reproduce:
Open the Modules view. 
Click on different stack frames in the debug view. 
See how the modules view flickers.
Comment 1 Pawel Piech CLA 2010-11-29 17:44:02 EST
I agree, the modules view should update in response to a modules changed event, rather than execution context state changes.
Comment 2 Dobrin Alexiev CLA 2010-11-30 16:35:45 EST
Currently MIModules.getModules() is requesting GDB for the set of loaded modules after every step. 

To change the module view to respond only to modules change events, that means that someone has to request GDB for the set of loaded modules after every step and fire the modules change event if there is a difference. 

That also mean that if the user doesn't open the Modules View the event will still be fired even though nothing will update. 

BTW, if we go this way that will also fix: https://bugs.eclipse.org/bugs/show_bug.cgi?id=324011

Is this what we want?
Comment 3 Marc Khouzam CLA 2010-12-01 20:09:37 EST
(In reply to comment #2)
> Currently MIModules.getModules() is requesting GDB for the set of loaded
> modules after every step. 

I guess you meant "is NOT requesting"? (because of the cache).

> To change the module view to respond only to modules change events, that means
> that someone has to request GDB for the set of loaded modules after every step
> and fire the modules change event if there is a difference. 

The services are usually driven by the views.  So, having the service figure out on its own if the modules changed may not be the standard way of doing things.  

I'm not familiar with the flickering problem, but isn't there an event that is already being sent that would tell the modules view that it should request the list of modules (even if it may not actually have changed, by simply that it may have changed)?  Like a containerSuspendedEvent maybe.

> That also mean that if the user doesn't open the Modules View the event will
> still be fired even though nothing will update. 

That is why the view should be the one telling the service to request the list of modules.  If there is no view, the service won't request that list.