mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-22 06:02:11 +02:00
remove dead code we are now return target as the source.
This commit is contained in:
parent
6004ffc528
commit
6306e33ea1
1 changed files with 4 additions and 37 deletions
|
@ -53,43 +53,10 @@ public class SuspendedEvent implements ICDISuspendedEvent {
|
||||||
*/
|
*/
|
||||||
public ICDIObject getSource() {
|
public ICDIObject getSource() {
|
||||||
CTarget target = session.getCTarget();
|
CTarget target = session.getCTarget();
|
||||||
|
// We can send the target as the Source. CDI
|
||||||
// This not necessary, we can send the target as the source
|
// Will assume that all threads are supended for this.
|
||||||
// it will mean to cdi that all threads are suspended.
|
// This is true for gdb when it suspend the inferior
|
||||||
// FIXME: Remove this comment code after testing.
|
// all threads are suspended.
|
||||||
/*
|
|
||||||
int threadId = 0;
|
|
||||||
if (event instanceof MIBreakpointEvent) {
|
|
||||||
MIBreakpointEvent breakEvent = (MIBreakpointEvent) event;
|
|
||||||
threadId = breakEvent.getThreadId();
|
|
||||||
} else if (event instanceof MIWatchpointEvent) {
|
|
||||||
MIWatchpointEvent watchEvent = (MIWatchpointEvent) event;
|
|
||||||
threadId = watchEvent.getThreadId();
|
|
||||||
} else if (event instanceof MISteppingRangeEvent) {
|
|
||||||
MISteppingRangeEvent rangeEvent = (MISteppingRangeEvent) event;
|
|
||||||
threadId = rangeEvent.getThreadId();
|
|
||||||
} else if (event instanceof MISignalEvent) {
|
|
||||||
MISignalEvent sigEvent = (MISignalEvent) event;
|
|
||||||
threadId = sigEvent.getThreadId();
|
|
||||||
} else if (event instanceof MILocationReachedEvent) {
|
|
||||||
MILocationReachedEvent locEvent = (MILocationReachedEvent) event;
|
|
||||||
threadId = locEvent.getThreadId();
|
|
||||||
} else if (event instanceof MIFunctionFinishedEvent) {
|
|
||||||
MIFunctionFinishedEvent funcEvent = (MIFunctionFinishedEvent) event;
|
|
||||||
threadId = funcEvent.getThreadId();
|
|
||||||
}
|
|
||||||
|
|
||||||
try {
|
|
||||||
// If it came from a thread return it as the source.
|
|
||||||
ICDIThread[] cthreads = target.getThreads();
|
|
||||||
for (int i = 0; i < cthreads.length; i++) {
|
|
||||||
if (((CThread)cthreads[i]).getId() == threadId) {
|
|
||||||
return cthreads[i];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} catch (CDIException e) {
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
return target;
|
return target;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue