1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-29 19:45:01 +02:00

Bug 310914: Fix to avoid fallback of obtaining process list natively when debugging remotely

This commit is contained in:
John Cortell 2010-04-29 19:17:18 +00:00
parent cffc49b240
commit 2fd8cfac1d

View file

@ -823,8 +823,13 @@ public class GDBProcesses_7_0 extends AbstractDsfService
rm.setData(makeProcessDMCAndData(controlDmc, getData().getGroupList()));
} else {
// Looks like this gdb doesn't truly support
// "-list-thread-groups --available". Resort to
// how we do things with gdb 6.8
// "-list-thread-groups --available". If we're
// debugging locally, resort to getting the
// list natively (as we do with gdb 6.8). If
// we're debugging remotely, the user is out
// of luck
IGDBBackend backend = getServicesTracker().getService(IGDBBackend.class);
if (backend.getSessionType() == SessionType.LOCAL) {
IProcessList list = null;
try {
list = CCorePlugin.getDefault().getProcessList();
@ -838,6 +843,10 @@ public class GDBProcesses_7_0 extends AbstractDsfService
rm.setData(makeProcessDMCAndData(controlDmc, procInfos));
}
}
else {
rm.setData(new IProcessDMContext[0]);
}
}
rm.done();
}
});
@ -1038,7 +1047,9 @@ public class GDBProcesses_7_0 extends AbstractDsfService
else {
// Looks like this gdb doesn't truly support
// "-list-thread-groups --available". Get the
// process list natively
// process list natively if we're debugging locally
IGDBBackend backend = getServicesTracker().getService(IGDBBackend.class);
if (backend.getSessionType() == SessionType.LOCAL) {
IProcessList list = null;
try {
list = CCorePlugin.getDefault().getProcessList();
@ -1052,6 +1063,7 @@ public class GDBProcesses_7_0 extends AbstractDsfService
}
}
}
}
});
} else if ("thread-group-exited".equals(miEvent)) { //$NON-NLS-1$
// GDB is no longer debugging this process. Remove it from our list.