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

Fire the suspend event for the current thread on the target creation.

This commit is contained in:
Mikhail Khodjaiants 2004-10-22 15:46:51 +00:00
parent 4d146140b3
commit 8c61386cb2
2 changed files with 17 additions and 0 deletions

View file

@ -1,3 +1,7 @@
2004-10-22 Mikhail Khodjaiants
Fire the suspend event for the current thread on the target creation.
* CDebugTarget.java
2004-10-21 Mikhail Khodjaiants
Thread should handle CDI events from the corresponding CDI thread only.
"canSuspend" should return true if the thread is stepping.

View file

@ -279,9 +279,22 @@ public class CDebugTarget extends CDebugElement implements ICDebugTarget, ICDIEv
catch( CDIException e ) {
// ignore
}
DebugEvent suspendEvent = null;
for( int i = 0; i < cdiThreads.length; ++i ) {
CThread thread = createThread( cdiThreads[i] );
debugEvents.add( thread.createCreateEvent() );
try {
if ( cdiThreads[i].equals( getCDITarget().getCurrentThread() ) ) {
// Use BREAKPOINT as a detail to force perspective switch
suspendEvent = thread.createSuspendEvent( DebugEvent.BREAKPOINT );
}
}
catch( CDIException e ) {
// ignore
}
}
if ( suspendEvent != null ) {
debugEvents.add( suspendEvent );
}
}