Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] multi debug context stepping in DSF

The Tree part of the debug view updates perfectly ( shows the new stack of the threads, their running state, etc.). 
I have hard time updating the Step/Resume/Suspend actions/toolbars. 
If I call Refresh will that update the actions on the toolbar too? 

By examining the call graph of DsfResumeCommand.canExecute() I couldn't see that will happen. 
I'll try calling refresh() anyway, see if that will do. 

Thanks
Dobrin


-----Original Message-----
From: cdt-dev-bounces@xxxxxxxxxxx [mailto:cdt-dev-bounces@xxxxxxxxxxx] On Behalf Of Marc Khouzam
Sent: Thursday, July 21, 2011 3:27 PM
To: 'CDT General developers list.'
Subject: Re: [cdt-dev] multi debug context stepping in DSF

> -----Original Message-----
> From: cdt-dev-bounces@xxxxxxxxxxx 
> [mailto:cdt-dev-bounces@xxxxxxxxxxx] On Behalf Of Alexiev, Dobrin
> Sent: Thursday, July 21, 2011 11:26 AM
> To: CDT General developers list.
> Subject: Re: [cdt-dev] multi debug context stepping in DSF
> 
> I don't know how to update a specific debug view button in DSF. 
> If there is such way, please let me know. 

Would the generic event we talked about do it?
https://bugs.eclipse.org/bugs/show_bug.cgi?id=350170

> >>> Should the Suspended or Resumed event cause the views to 
> refresh?  
> I think platform doesn't know anything about DSF Suspend and 
> Resume events therefore can't handle them. 

The VMNodes listen for those events and generate deltas.
I thought that could trigger a refresh.

I cheated myself for Tracepoints by calling the refresh()
method.  You can have a look at how LaunchVMProvider
handles ITracingStoppedDMEvent.  But I'm hoping
https://bugs.eclipse.org/bugs/show_bug.cgi?id=350170
will make this cleaner.

Marc

> Here is my stack trace when DsfResumeCommand.canExecute() 
> gets called. 
> 
> Thread [main] (Suspended (breakpoint at line 45 in 
> org.eclipse.cdt.dsf.debug.ui.actions.DsfResumeCommand))	
> 	
> org.eclipse.cdt.dsf.debug.ui.actions.DsfResumeCommand.canExecu
> te(org.eclipse.debug.core.commands.IEnabledStateRequest) line: 45	
> 	
> org.eclipse.debug.internal.ui.commands.actions.DebugCommandSer
> vice.updateCommand(java.lang.Class, java.lang.Object[], 
> org.eclipse.debug.internal.ui.commands.actions.IEnabledTarget[
> ]) line: 182	
> 	
> org.eclipse.debug.internal.ui.commands.actions.DebugCommandSer
> vice.postUpdate(org.eclipse.jface.viewers.ISelection) line: 153	
> 	
> org.eclipse.debug.internal.ui.commands.actions.DebugCommandSer
> vice.debugContextChanged(org.eclipse.debug.ui.contexts.DebugCo
> ntextEvent) line: 245	
> 	
> org.eclipse.debug.internal.ui.contexts.DebugWindowContextServi
> ce$1.run() line: 194	
> 	
> org.eclipse.core.runtime.SafeRunner.run(org.eclipse.core.runti
> me.ISafeRunnable) line: 42	
> 	
> org.eclipse.debug.internal.ui.contexts.DebugWindowContextServi
> ce.notify(org.eclipse.debug.ui.contexts.DebugContextEvent, 
> java.lang.Object[]) line: 192	
> 	
> org.eclipse.debug.internal.ui.contexts.DebugWindowContextServi
> ce.notify(org.eclipse.debug.ui.contexts.DebugContextEvent) line: 181	
> 	
> org.eclipse.debug.internal.ui.contexts.DebugWindowContextServi
> ce.debugContextChanged(org.eclipse.debug.ui.contexts.DebugCont
> extEvent) line: 390	
> 	
> org.eclipse.debug.ui.contexts.AbstractDebugContextProvider$1.r
> un() line: 79	
> 
> going throw the call graph of 
> IDebugCommandHandler.canExecute() I didn't see anything 
> useful I can hang on to. 
> 
> Dobrin
> 
> 
> -----Original Message-----
> From: cdt-dev-bounces@xxxxxxxxxxx 
> [mailto:cdt-dev-bounces@xxxxxxxxxxx] On Behalf Of Marc Khouzam
> Sent: Thursday, July 21, 2011 11:02 AM
> To: 'CDT General developers list.'
> Subject: Re: [cdt-dev] multi debug context stepping in DSF
> 
> > -----Original Message-----
> > From: cdt-dev-bounces@xxxxxxxxxxx 
> > [mailto:cdt-dev-bounces@xxxxxxxxxxx] On Behalf Of Alexiev, Dobrin
> > Sent: Wednesday, July 20, 2011 5:26 PM
> > To: CDT General developers list.
> > Subject: [cdt-dev] multi debug context stepping in DSF
> > 
> > I am trying to implement multi context stepping. 
> > 
> > First, I overwrote DsfSuspendCommand, DsfResumeCommand and 
> > DsfStep*Command to enabled the commands if multiple execution 
> > context are selected.
> > 
> > Next, When I multi select and execute Suspend/Step/Resume I 
> > don't want the selection to change, because the assumption is 
> > the user will continue with multi select operations. To 
> > achieve that I overwrote DefaultDsfSelectionPolicy to block 
> > the change of selection if currently multiple execution 
> > context are selected. 
> > 
> > Now the next problem - since there is no debug context 
> > change, my Suspend/Step/Resume commands don't update - they 
> > reflect the old state. 
> 
> I'm not entirely sure how the view refreshing logic works.
> Should the Suspended or Resumed event cause the views
> to refresh?  Or do we really need a new selection to happen?
> 
> > 
> > Does anyone know what is the right way to update the 
> > Suspend/Step/Resume when at the same time the selection 
> > change is being blocked. 
> > 
> > Thanks
> > Dobrin
> > 
> > 
> > 
> > 
> > _______________________________________________
> > cdt-dev mailing list
> > cdt-dev@xxxxxxxxxxx
> > https://dev.eclipse.org/mailman/listinfo/cdt-dev
> > 
> _______________________________________________
> cdt-dev mailing list
> cdt-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/cdt-dev
> _______________________________________________
> cdt-dev mailing list
> cdt-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/cdt-dev
> 
_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/cdt-dev


Back to the top