|
Lines 797-809
Link Here
|
| 797 |
} |
797 |
} |
| 798 |
// END OF WORKAROUND to be removed when GDB 7.2 is available |
798 |
// END OF WORKAROUND to be removed when GDB 7.2 is available |
| 799 |
|
799 |
|
| 800 |
IMIContainerDMContext[] containerDmcs = new IMIContainerDMContext[groups.length]; |
800 |
// With GDB 7.1, we can receive a bogus process when we are not debugging anything |
| 801 |
for (int i = 0; i < groups.length; i++) { |
801 |
// -list-thread-groups |
| 802 |
String groupId = groups[i].getGroupId(); |
802 |
// ^done,groups=[{id="0",type="process",pid="0"}] |
|
|
803 |
// As for GDB 7.2, the pid field is missing altogether in this case |
| 804 |
// -list-thread-groups |
| 805 |
// ^done,groups=[{id="i1",type="process"}] |
| 806 |
// Just ignore that entry |
| 807 |
List<IMIContainerDMContext> containerDmcs = new ArrayList<IMIContainerDMContext>(groups.length); |
| 808 |
for (IThreadGroupInfo group : groups) { |
| 809 |
if (group.getPid() == null || |
| 810 |
group.getPid().equals("") || group.getPid().equals("0")) { //$NON-NLS-1$ //$NON-NLS-2$ |
| 811 |
continue; |
| 812 |
} |
| 813 |
String groupId = group.getGroupId(); |
| 803 |
IProcessDMContext procDmc = createProcessContext(controlDmc, groupId); |
814 |
IProcessDMContext procDmc = createProcessContext(controlDmc, groupId); |
| 804 |
containerDmcs[i] = createContainerContext(procDmc, groupId); |
815 |
containerDmcs.add(createContainerContext(procDmc, groupId)); |
| 805 |
} |
816 |
} |
| 806 |
return containerDmcs; |
817 |
return containerDmcs.toArray(new IMIContainerDMContext[containerDmcs.size()]); |
| 807 |
} |
818 |
} |
| 808 |
|
819 |
|
| 809 |
public void getRunningProcesses(final IDMContext dmc, final DataRequestMonitor<IProcessDMContext[]> rm) { |
820 |
public void getRunningProcesses(final IDMContext dmc, final DataRequestMonitor<IProcessDMContext[]> rm) { |