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:
parent
807a391399
commit
ad50df009d
1 changed files with 20 additions and 22 deletions
|
@ -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;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue