Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] DSF Stack Frame nodes continually refresh

Hi Ken,
I'm glad you found the cause of the problem.  Without reproducing the problem I can only speculate, but...
I think the behavior you saw can be explain by the following scenario:
  1. Viewer requests the number of stack frames
  2. Model returns 5 (as an example)
  3. Viewer requests elements 1-3.
  4. Model returns the first three elements
  5. Viewer requests element 4-5
  6. Model returns the first two elements again.
  7. Now for the first five elements, viewer contains elements 1, 2, 3, 1, 2.  However, the viewer does not allow duplicate children of an element.
  8. Viewer requests elements 1-2 again.
  9. and the cycle begins...
Cheers,
Pawel


ken.ryall@xxxxxxxxx wrote:
Re: [cdt-dev] DSF Stack Frame nodes continually refresh Pawel,

It was in a state where drawing the Tree would trigger a ChildUpdate which would draw the tree etc etc. I’m not exactly sure how it got there but it turns out my implementation of IStack.getFrames(IDMContext execContext, int startIndex, int endIndex..). was always returning ALL of the frames, not just the requested sub-set of them. When I fixed it to return the correct sub-set of frames the problem went away.

Thanks - Ken


From: ext Pawel Piech <pawel.piech@xxxxxxxxxxxxx>
Reply-To: "CDT General developers list." <cdt-dev@xxxxxxxxxxx>
Date: Thu, 9 Jul 2009 19:18:08 +0200
To: "CDT General developers list." <cdt-dev@xxxxxxxxxxx>
Subject: Re: [cdt-dev] DSF Stack Frame nodes continually refresh

Hi Ken,
The StackFrameVMNode and AbstractLaunchVMProvider contain the following optimization:
  1.  When a a suspended event is received, StackFrameVMNode requests that only the top stack frame be repainted in Debug view.
  2. At the same time AbstractLaunchVMProvider.handleEvent() queues an event (FullStackRefreshEvent) to be generated with a fixed delay (200ms). 

  3. When FullStackRefreshEvent is posted after the delay, StackFrameVMNode requests that all stack frames be refreshed in Debug View.

  4. If a resumed or another suspended event is received before the FullStackRefreshEvent is posted, the FullStackRefreshEvent is canceled.
The optimization is intended to minimize refreshes when debugger is stepping fast, but it seems that in your case it gets into some kind of a cycle.  If you set breakpoints in the places where this event is queued, I think you should be able to figure out what causes the cycle.

Cheers,
Pawel


ken.ryall@xxxxxxxxx wrote:
 DSF Stack Frame nodes continually refresh DSF folks,
 
While working on our DSF integration we occasionally get in a state where the stack frame nodes in the Debug View constantly refresh. This usually happens the first time execution is suspended and the stack frames become available. Sometimes it will append on the next suspend. It happens even if we don’t send a suspend event and then expand the parent thread node manually. Once the refreshing starts it will continue even if you collapse the tree items back up to the launch and then expand then out again.
 
We don’t see this when running the dsf/gdb debugger so we must be doing something a little wrong. Before I spend a lot more time looking into this I thought I would ask if anyone had run into it before.
 
Thanks - Ken



_______________________________________________
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