void (int firstFrameIndex, XStackFrameContainer container) { if (myThreadInfo.getState() != PyThreadInfo.State.SUSPENDED) { container.errorOccurred(PyBundle.message("debugger.stack.frames.not.available.in.non.suspended.state")); return; } final List<PyStackFrameInfo> frames = myThreadInfo.getFrames(); if (frames != null && firstFrameIndex <= frames.size()) { final List<PyStackFrame> xFrames = new LinkedList<>(); for (int i = firstFrameIndex; i < frames.size(); i++) { xFrames.add(convert(myDebugProcess, frames.get(i))); } container.addStackFrames(xFrames, true); } else { container.addStackFrames(Collections.emptyList(), true); } }