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:
parent
cffc49b240
commit
2fd8cfac1d
1 changed files with 34 additions and 22 deletions
|
@ -823,19 +823,28 @@ public class GDBProcesses_7_0 extends AbstractDsfService
|
||||||
rm.setData(makeProcessDMCAndData(controlDmc, getData().getGroupList()));
|
rm.setData(makeProcessDMCAndData(controlDmc, getData().getGroupList()));
|
||||||
} else {
|
} else {
|
||||||
// Looks like this gdb doesn't truly support
|
// Looks like this gdb doesn't truly support
|
||||||
// "-list-thread-groups --available". Resort to
|
// "-list-thread-groups --available". If we're
|
||||||
// how we do things with gdb 6.8
|
// debugging locally, resort to getting the
|
||||||
IProcessList list = null;
|
// list natively (as we do with gdb 6.8). If
|
||||||
try {
|
// we're debugging remotely, the user is out
|
||||||
list = CCorePlugin.getDefault().getProcessList();
|
// of luck
|
||||||
} catch (CoreException e) {
|
IGDBBackend backend = getServicesTracker().getService(IGDBBackend.class);
|
||||||
|
if (backend.getSessionType() == SessionType.LOCAL) {
|
||||||
|
IProcessList list = null;
|
||||||
|
try {
|
||||||
|
list = CCorePlugin.getDefault().getProcessList();
|
||||||
|
} catch (CoreException e) {
|
||||||
|
}
|
||||||
|
|
||||||
|
if (list == null) {
|
||||||
|
rm.setData(new IProcessDMContext[0]);
|
||||||
|
} else {
|
||||||
|
IProcessInfo[] procInfos = list.getProcessList();
|
||||||
|
rm.setData(makeProcessDMCAndData(controlDmc, procInfos));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
if (list == null) {
|
|
||||||
rm.setData(new IProcessDMContext[0]);
|
rm.setData(new IProcessDMContext[0]);
|
||||||
} else {
|
|
||||||
IProcessInfo[] procInfos = list.getProcessList();
|
|
||||||
rm.setData(makeProcessDMCAndData(controlDmc, procInfos));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
rm.done();
|
rm.done();
|
||||||
|
@ -1038,17 +1047,20 @@ public class GDBProcesses_7_0 extends AbstractDsfService
|
||||||
else {
|
else {
|
||||||
// Looks like this gdb doesn't truly support
|
// Looks like this gdb doesn't truly support
|
||||||
// "-list-thread-groups --available". Get the
|
// "-list-thread-groups --available". Get the
|
||||||
// process list natively
|
// process list natively if we're debugging locally
|
||||||
IProcessList list = null;
|
IGDBBackend backend = getServicesTracker().getService(IGDBBackend.class);
|
||||||
try {
|
if (backend.getSessionType() == SessionType.LOCAL) {
|
||||||
list = CCorePlugin.getDefault().getProcessList();
|
IProcessList list = null;
|
||||||
int groupId_int = Integer.parseInt(finalGroupId);
|
try {
|
||||||
for (IProcessInfo procInfo : list.getProcessList()) {
|
list = CCorePlugin.getDefault().getProcessList();
|
||||||
if (procInfo.getPid() == groupId_int) {
|
int groupId_int = Integer.parseInt(finalGroupId);
|
||||||
fDebuggedProcessesAndNames.put(finalGroupId, procInfo.getName());
|
for (IProcessInfo procInfo : list.getProcessList()) {
|
||||||
}
|
if (procInfo.getPid() == groupId_int) {
|
||||||
}
|
fDebuggedProcessesAndNames.put(finalGroupId, procInfo.getName());
|
||||||
} catch (CoreException e) {
|
}
|
||||||
|
}
|
||||||
|
} catch (CoreException e) {
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue