1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-23 14:42:11 +02:00

Only assume that all threads are suspended or resumed if the target does not support per thread control.

This commit is contained in:
Ken Ryall 2006-04-28 03:23:09 +00:00
parent 41b04c93d1
commit 9d411ea3bc

View file

@ -60,6 +60,7 @@ import org.eclipse.cdt.debug.core.cdi.model.ICDISharedLibrary;
import org.eclipse.cdt.debug.core.cdi.model.ICDISignal;
import org.eclipse.cdt.debug.core.cdi.model.ICDITarget;
import org.eclipse.cdt.debug.core.cdi.model.ICDITargetConfiguration;
import org.eclipse.cdt.debug.core.cdi.model.ICDITargetConfiguration2;
import org.eclipse.cdt.debug.core.cdi.model.ICDIThread;
import org.eclipse.cdt.debug.core.cdi.model.ICDIVariableDescriptor;
import org.eclipse.cdt.debug.core.model.CDebugElementState;
@ -1032,8 +1033,9 @@ public class CDebugTarget extends CDebugElement implements ICDebugTarget, ICDIEv
getRegisterManager().targetSuspended();
getBreakpointManager().skipBreakpoints( false );
List newThreads = refreshThreads();
if ( event.getSource() instanceof ICDITarget ) {
suspendThreads( event );
if (event.getSource() instanceof ICDITarget) {
if (!(this.getConfiguration() instanceof ICDITargetConfiguration2) || !((ICDITargetConfiguration2)this.getConfiguration()).supportsThreadControl())
suspendThreads(event);
}
// We need this for debuggers that don't have notifications
// for newly created threads.
@ -1093,7 +1095,10 @@ public class CDebugTarget extends CDebugElement implements ICDebugTarget, ICDIEv
break;
}
debugEvents.add( createResumeEvent( detail ) );
resumeThreads( debugEvents, detail );
if (!(this.getConfiguration() instanceof ICDITargetConfiguration2) || !((ICDITargetConfiguration2)this.getConfiguration()).supportsThreadControl())
resumeThreads( debugEvents, detail );
fireEventSet( (DebugEvent[])debugEvents.toArray( new DebugEvent[debugEvents.size()] ) );
}