mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-09-08 02:53:12 +02:00
Bug 337927: Invalid assert when fetching process information
This commit is contained in:
parent
3974422239
commit
35b59fe446
2 changed files with 8 additions and 5 deletions
|
@ -172,14 +172,14 @@ public class GDBProcesses extends MIProcesses implements IGDBProcesses {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (name == null) {
|
if (name == null) {
|
||||||
// Should not happen.
|
// This could happen if a process has terminated but the
|
||||||
|
// debug session is not terminated because the preference
|
||||||
|
// to keep GDB running has been selected.
|
||||||
name = "Unknown name"; //$NON-NLS-1$
|
name = "Unknown name"; //$NON-NLS-1$
|
||||||
|
|
||||||
// Until bug 305385 is fixed, the above code will not work, so we assume we
|
// Until bug 305385 is fixed, the above code will not work, so we assume we
|
||||||
// are looking for our own process
|
// are looking for our own process
|
||||||
// assert false : "Don't have entry for process ID: " + pid; //$NON-NLS-1$
|
|
||||||
name = fBackend.getProgramPath().lastSegment();
|
name = fBackend.getProgramPath().lastSegment();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
rm.setData(new MIThreadDMData(name, pidStr));
|
rm.setData(new MIThreadDMData(name, pidStr));
|
||||||
|
|
|
@ -654,9 +654,12 @@ public class GDBProcesses_7_0 extends AbstractDsfService
|
||||||
} else {
|
} else {
|
||||||
name = fDebuggedProcessesAndNames.get(id);
|
name = fDebuggedProcessesAndNames.get(id);
|
||||||
if (name == null) {
|
if (name == null) {
|
||||||
// We don't have the name in our map. Should not happen.
|
// We don't have the name in our map. This could happen
|
||||||
|
// if a process has terminated but the
|
||||||
|
// debug session is not terminated because the preference
|
||||||
|
// to keep GDB running has been selected or because there
|
||||||
|
// are other processes part of that session.
|
||||||
name = "Unknown name"; //$NON-NLS-1$
|
name = "Unknown name"; //$NON-NLS-1$
|
||||||
assert false : "Don't have entry for process ID: " + id; //$NON-NLS-1$
|
|
||||||
} else if (name.length() == 0) {
|
} else if (name.length() == 0) {
|
||||||
// Probably will not happen, but just in case...use the
|
// Probably will not happen, but just in case...use the
|
||||||
// binary file name (absolute path)
|
// binary file name (absolute path)
|
||||||
|
|
Loading…
Add table
Reference in a new issue