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'm sorry, I guess I wasn't clear in my response.  Stack frame indexes and levels both are counted starting with the top stack frame at 0.  The logic here is that calculating the full stack depth can be expensive for some debuggers, so we don't want to force the service to retrieve this information up front.  But as you point out, the API documentation is not clear on this, so I filed bug 285723 to improve the javadoc.

Thanks
Pawel

Mario Pierro wrote:
Hello Pawel,

Thanks for the explanation.

  
  
I have the following questions:

1. What should the getLevel() method implementation report? Is that
      
the
  
number of valid stack frames that precede a given frame in the call
stack? 
  
      
Yes,
    
2. What is the relation between the indexes passed to

public void getFrames(IDMContext execContext, int startIndex, int
endIndex, DataRequestMonitor<IFrameDMContext[]> rm);

and stack frame levels?

      
Does this mean that an implementation of IStack has to report stack
frames in "ascending" order? That is, the bottom frame context would be
the first in the returned array and the topmost (i.e. more recent) frame
would be the last?

This would make indexes and depths the same.

When I tried to do this, I got the most recent frames at the _bottom_ of
the stack in the Debug view.

Weird thing is, the StackFramesVMNode always updates the top frame but
seems to "cache" the frames in the middle, querying only the frame which
is at the bottom of the stack.

Is this the expected behavior?

Thanks,

Mario

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


Back to the top