Hello Pawel,
Thanks for the explanation. The problem
was actually due to our LaunchVMProvider. Being developed for DSF 1.0, it only
extended AbstractDMVMProvider instead of the newer 1.1
AbstractLaunchVMProvider.
For what I have understood, it is mandatory
for launch providers to extend that class, otherwise the “smart”
update mechanism will not work and the stack will not refresh properly. Obviously
the “reversed stack levels” workaround forced the stack to refresh
but caused other problems in other views e.g. variables and expressions.
Thanks again for the help!
/Mario
From: cdt-dev-bounces@xxxxxxxxxxx
[mailto:cdt-dev-bounces@xxxxxxxxxxx] On
Behalf Of Pawel Piech
Sent: den 6 augusti 2009 18:55
To: CDT General developers list.
Subject: 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