diff --git a/debug/org.eclipse.cdt.debug.core/ChangeLog b/debug/org.eclipse.cdt.debug.core/ChangeLog index 2b62b7473ff..35887993214 100644 --- a/debug/org.eclipse.cdt.debug.core/ChangeLog +++ b/debug/org.eclipse.cdt.debug.core/ChangeLog @@ -1,3 +1,12 @@ +2004-11-19 Alain Magloire + + Clear the confusion about sublist of stackframes. + PR 78611 + + * cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIStackFrame.java + * cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIThread.java + * src/org/eclipse/cdt/debug/internal/model/CThread.java + 2004-11-17 David Inglis Change debug target to use IBinaryObject instead of IBinaryExecutable diff --git a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIStackFrame.java b/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIStackFrame.java index 0e4ca2527a8..410001d8cff 100644 --- a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIStackFrame.java +++ b/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIStackFrame.java @@ -58,7 +58,7 @@ public interface ICDIStackFrame extends ICDIExecuteStepReturn, ICDIObject { ICDIThread getThread(); /** - * Returns the level of the stack frame. + * Returns the level of the stack frame, 1 based. * * @return the level of the stack frame */ diff --git a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIThread.java b/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIThread.java index b890e6021cd..86591b3214e 100644 --- a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIThread.java +++ b/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIThread.java @@ -36,16 +36,19 @@ public interface ICDIThread extends ICDIExecuteStep, ICDIExecuteResume, ICDISusp ICDIStackFrame[] getStackFrames() throws CDIException; /** - * Returns the stack frames contained in this thread whose levels - * are between the two arguments(inclusive). + * Returns the stack frames contained in this thread between the specified + * fromIndex, inclusive, and toIndex, exclusive. * An empty collection is returned if this thread contains * no stack frames, or is not currently suspended. Stack frames * are returned in top down order. * * @return a collection of stack frames * @throws CDIException if this method fails. Reasons include: + * @throws IndexOutOfBoundsException for an illegal endpoint index value + * (fromIndex < 0 || toIndex > size || fromIndex > toIndex). + */ - ICDIStackFrame[] getStackFrames(int lowFrame, int highFrame) throws CDIException; + ICDIStackFrame[] getStackFrames(int fromIndex, int len) throws CDIException; /** * Returns the depth of the stack frames. diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CThread.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CThread.java index 5d7b46320ba..e5a9a415e24 100644 --- a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CThread.java +++ b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CThread.java @@ -154,7 +154,7 @@ public class CThread extends CDebugElement implements ICThread, IRestart, IResum } } int depth = getStackDepth(); - ICDIStackFrame[] frames = (depth != 0) ? getCDIStackFrames( 0, (depth > getMaxStackDepth()) ? getMaxStackDepth() - 1 : depth - 1 ) : new ICDIStackFrame[0]; + ICDIStackFrame[] frames = (depth != 0) ? getCDIStackFrames( 0, (depth > getMaxStackDepth()) ? getMaxStackDepth() : depth ) : new ICDIStackFrame[0]; if ( fStackFrames.isEmpty() ) { addStackFrames( frames, 0, frames.length ); }