diff --git a/debug/org.eclipse.cdt.debug.core/ChangeLog b/debug/org.eclipse.cdt.debug.core/ChangeLog index 4d118e0cbb6..7cc600aed7e 100644 --- a/debug/org.eclipse.cdt.debug.core/ChangeLog +++ b/debug/org.eclipse.cdt.debug.core/ChangeLog @@ -1,3 +1,9 @@ +2004-11-23 Mikhail Khodjaiants + The enablement of the step actions is calculated in the UI thread. This causes + the UI locks for slow or unresponsive targets. Use the cached stack frames to + calculate the enablement instead of requesting gdb. + * CThread.java + 2004-11-22 Mikhail Khodjaiants Check if the pointer value is not null before pass it to the address factory. * CValue.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 e5a9a415e24..a5017202ff8 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 @@ -462,13 +462,7 @@ public class CThread extends CDebugElement implements ICThread, IRestart, IResum if ( !fConfig.supportsStepping() || !canResume() ) { return false; } - try { - List c = computeStackFrames(); - return ( c.size() > 1 ); - } - catch( DebugException e ) { - } - return false; + return ( fStackFrames.size() > 1 ); } /** @@ -477,12 +471,10 @@ public class CThread extends CDebugElement implements ICThread, IRestart, IResum * @return whether this thread is in a valid state to step */ protected boolean canStep() { - try { - return fConfig.supportsStepping() && isSuspended() && getTopStackFrame() != null; - } - catch( DebugException e ) { + if ( !fConfig.supportsStepping() || !isSuspended() ) { return false; } + return !fStackFrames.isEmpty(); } /* (non-Javadoc)