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:
parent
4d146140b3
commit
8c61386cb2
2 changed files with 17 additions and 0 deletions
|
@ -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.
|
||||
|
|
|
@ -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 );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue