Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] DSF stack frame levels vs indexes

I suspect that the reason for the stack trace not updating is a mis-configured VM provider.  The standard DSF debug view View Model provider includes an optimization such that first only the top stack frame is refreshed, then 200ms later the rest of the stack trace is refreshed.  In your case, it seems that the second event (the one 200ms later) is being suppressed somehow.  Look at how FullStackRefreshEvent is used, set some breakpoints and see if there's an obvious reason for why it's not working.

The levels being in reverse order may be acting as a workaround for the lack of refresh event, because it changes the equals() calculation of the stack frames, when the stack depth changes.

Cheers,
Pawel

Mario Pierro wrote:
Hello Pawel,

Thanks for posting the bug.

  
Stack frame indexes and levels both are counted starting with the top
    
stack frame at 0.
 
This actually works for me only if I set frame levels as the "opposite"
of the array index - that is, the topmost, newest frame has index=0 in
the array and level=array length-1 .

When setting levels and indexes to be the same, my IStack service
implementation gets asked:

- for the stack depth using getStackDepth()
- for the top frame using getTopFrame()
- for the frame which is at the bottom of the stack using getFrames(int,
int)

After that, no further frames are requested and the frames in the middle
are "reused" as they are, so that the bottom frame gets duplicated.

When levels are set as the opposite of indexes, all frames are correctly
queried starting from the last one in the array and ending on the second
one. Is level used to know how many stack frames should be fetched?

Best,

/Mario


_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/cdt-dev
  


Back to the top