Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[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