diff options
author | Alain Magloire | 2004-11-18 16:12:19 +0000 |
---|---|---|
committer | Alain Magloire | 2004-11-18 16:12:19 +0000 |
commit | 554047151e93a2adb5dfaf160ccce2f6d98646fe (patch) | |
tree | a630acca50101c3ad81c81e807fa77f5fd3ca534 | |
parent | 95d9f1a5685476e2a543249a64f679b768c742e9 (diff) | |
download | org.eclipse.cdt-554047151e93a2adb5dfaf160ccce2f6d98646fe.tar.gz org.eclipse.cdt-554047151e93a2adb5dfaf160ccce2f6d98646fe.tar.xz org.eclipse.cdt-554047151e93a2adb5dfaf160ccce2f6d98646fe.zip |
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
4 files changed, 17 insertions, 5 deletions
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 + * <tt>fromIndex</tt>, inclusive, and <tt>toIndex</tt>, 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 ); } |