diff options
author | Mikhail Khodjaiants | 2003-04-23 14:34:47 +0000 |
---|---|---|
committer | Mikhail Khodjaiants | 2003-04-23 14:34:47 +0000 |
commit | e01e638264348531ad16e7663c6190b3d08cb42a (patch) | |
tree | 9d772a05239485bbf98e6518577436948725bf22 | |
parent | 980603505905d6c96c17fbbda1f7c91712f56fc7 (diff) | |
download | org.eclipse.cdt-e01e638264348531ad16e7663c6190b3d08cb42a.tar.gz org.eclipse.cdt-e01e638264348531ad16e7663c6190b3d08cb42a.tar.xz org.eclipse.cdt-e01e638264348531ad16e7663c6190b3d08cb42a.zip |
Additional checks for the situation when the stack depth is not 0 and the frame array is empty.
-rw-r--r-- | debug/org.eclipse.cdt.debug.core/ChangeLog | 5 | ||||
-rw-r--r-- | debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CThread.java | 6 |
2 files changed, 8 insertions, 3 deletions
diff --git a/debug/org.eclipse.cdt.debug.core/ChangeLog b/debug/org.eclipse.cdt.debug.core/ChangeLog index 5b98ecf3d67..421c321bf3e 100644 --- a/debug/org.eclipse.cdt.debug.core/ChangeLog +++ b/debug/org.eclipse.cdt.debug.core/ChangeLog @@ -1,3 +1,8 @@ +2003-04-23 Mikhail Khodjaiants + Additional checks for the situation when the stack depth is not 0 and + the frame array is empty. + * CThread.java + 2003-04-22 Mikhail Khodjaiants Disconnect: terminate should be called from the disconnect event handler. * CDebugTarget.java 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 7464db74549..b87ed9c4385 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 @@ -218,9 +218,9 @@ public class CThread extends CDebugElement if ( depth != 0 ) { // same number of frames - if top frames are in different - // method, replace all frames - ICDIStackFrame newTopFrame = frames[0]; - ICDIStackFrame oldTopFrame = ((CStackFrame)fStackFrames.get( 0 ) ).getLastCDIStackFrame(); + // function, replace all frames + ICDIStackFrame newTopFrame = ( frames.length > 0 ) ? frames[0] : null; + ICDIStackFrame oldTopFrame = ( fStackFrames.size() > 0 ) ? ((CStackFrame)fStackFrames.get( 0 ) ).getLastCDIStackFrame() : null; if ( !CStackFrame.equalFrame( newTopFrame, oldTopFrame ) ) { disposeStackFrames( 0, fStackFrames.size() ); |