*/
protected StackFrame getUnderlyingStackFrame() throws DebugException {
synchronized (fThread) {
if (fStackFrame == null) {
if (fDepth == -1) {
throw new DebugException(new Status(IStatus.ERROR,
JDIDebugPlugin.getUniqueIdentifier(),
IJavaStackFrame.ERR_INVALID_STACK_FRAME,
JDIDebugModelMessages.JDIStackFrame_25, null));
}
if (fThread.isSuspended()) {
// re-index stack frames - See Bug 47198
fThread.computeStackFrames();
if (fDepth == -1) {
// If depth is -1, then this is an invalid frame
throw new DebugException(new Status(IStatus.ERROR,
JDIDebugPlugin.getUniqueIdentifier(),
IJavaStackFrame.ERR_INVALID_STACK_FRAME,
JDIDebugModelMessages.JDIStackFrame_25, null));
}
} else {
throw new DebugException(new Status(IStatus.ERROR,
JDIDebugPlugin.getUniqueIdentifier(),
IJavaThread.ERR_THREAD_NOT_SUSPENDED,
JDIDebugModelMessages.JDIStackFrame_25, null));
}
}