1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-06-05 08:46:02 +02:00

SuspendedEvent always return a thread as the source

This commit is contained in:
Alain Magloire 2002-08-14 17:19:58 +00:00
parent 807a391399
commit ad50df009d

View file

@ -29,7 +29,8 @@ public class SuspendedEvent implements ICDISuspendedEvent {
} }
public ICDISessionObject getReason() { public ICDISessionObject getReason() {
if (event instanceof MIBreakpointEvent || event instanceof MIWatchpointEvent) { if (event instanceof MIBreakpointEvent
|| event instanceof MIWatchpointEvent) {
MIBreakpointEvent breakEvent = (MIBreakpointEvent) event; MIBreakpointEvent breakEvent = (MIBreakpointEvent) event;
int number = breakEvent.getNumber(); int number = breakEvent.getNumber();
ICDIBreakpointManager mgr = session.getBreakpointManager(); ICDIBreakpointManager mgr = session.getBreakpointManager();
@ -87,7 +88,6 @@ public class SuspendedEvent implements ICDISuspendedEvent {
} }
// If it came from a thread return it as the source. // If it came from a thread return it as the source.
if (threadId > 0) {
CThread[] cthreads = target.getCThreads(); CThread[] cthreads = target.getCThreads();
for (int i = 0; i < cthreads.length; i++) { for (int i = 0; i < cthreads.length; i++) {
if (cthreads[i].getId() == threadId) { if (cthreads[i].getId() == threadId) {
@ -99,6 +99,4 @@ public class SuspendedEvent implements ICDISuspendedEvent {
target.addCThread(cthread); target.addCThread(cthread);
return cthread; return cthread;
} }
return target;
}
} }