Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jdt-debug-dev] JDIThread.computeStackFrames()


The code is there becuase it is possible to step out of "main" and into "Thread.exit()". In this case the stack depth is the same (1). We used to assume that if the stack depth was the same, that the step ended in the same method in which it began. However, it was not always the case.

Darin




jared_burns@xxxxxxx
Sent by: jdt-debug-dev-admin@xxxxxxxxxxx

12/01/2001 03:54 PM
Please respond to jdt-debug-dev

       
        To:        jdt-debug-dev@xxxxxxxxxxx
        cc:        
        Subject:        [jdt-debug-dev] JDIThread.computeStackFrames()



When we are asked to compute stack frames, we make a JDI call to get the current StackFrames. We then compare the number of StackFrames (underlying frames) that returned to the number of JDIStackFrames (model frames) that we currently have. If the number is greater, we create more model objects (JDIStackFrames), if it is lesser, we remove the excess. Great.


However, if the number is equal we check the top stack frame of both collections to see if they're in the same method. If they *aren't* we discard all model frames and create new ones. Does anyone know why this code exists? Excluding step filtering (which this code both predates and doesn't handle fully), what condition are we checking for with this? Why compare only the top stack frame and why do so only when the stacks are equally deep?


- Jared



Back to the top