mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-23 14:42:11 +02:00
Fix for PR 60664
This commit is contained in:
parent
ee00ba1b15
commit
21b56220d7
2 changed files with 16 additions and 6 deletions
|
@ -1,3 +1,9 @@
|
|||
2004-05-07 Alain Magloire
|
||||
|
||||
Patch from Keith Rolling(Palm Source).
|
||||
PR 60664
|
||||
* src/org/eclipse/cdt/debug/mi/core/MIInferior.java
|
||||
|
||||
2004-04-01 Alain Magloire
|
||||
|
||||
GDBServer configuration should be "*" not "native"
|
||||
|
|
|
@ -17,7 +17,6 @@ import org.eclipse.cdt.debug.mi.core.command.MIGDBShowExitCode;
|
|||
import org.eclipse.cdt.debug.mi.core.command.MIInfoProgram;
|
||||
import org.eclipse.cdt.debug.mi.core.event.MIInferiorExitEvent;
|
||||
import org.eclipse.cdt.debug.mi.core.output.MIGDBShowExitCodeInfo;
|
||||
import org.eclipse.cdt.debug.mi.core.output.MIInfo;
|
||||
import org.eclipse.cdt.debug.mi.core.output.MIInfoProgramInfo;
|
||||
import org.eclipse.cdt.utils.pty.PTY;
|
||||
import org.eclipse.cdt.utils.spawner.Spawner;
|
||||
|
@ -109,13 +108,17 @@ public class MIInferior extends Process {
|
|||
return err;
|
||||
}
|
||||
|
||||
public synchronized void waitForSync() throws InterruptedException {
|
||||
while (state != TERMINATED) {
|
||||
wait();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @see java.lang.Process#waitFor()
|
||||
*/
|
||||
public synchronized int waitFor() throws InterruptedException {
|
||||
while (state != TERMINATED) {
|
||||
wait();
|
||||
}
|
||||
public int waitFor() throws InterruptedException {
|
||||
waitForSync();
|
||||
return exitValue();
|
||||
}
|
||||
|
||||
|
@ -180,7 +183,8 @@ public class MIInferior extends Process {
|
|||
if (interrupt != null) {
|
||||
try {
|
||||
session.postCommand(interrupt);
|
||||
MIInfo info = interrupt.getMIInfo();
|
||||
// call getMIInfo() even if we discard the value;
|
||||
interrupt.getMIInfo();
|
||||
// Allow (5 secs) for the interrupt to propagate.
|
||||
for (int i = 0;(state == RUNNING) && i < 5; i++) {
|
||||
try {
|
||||
|
|
Loading…
Add table
Reference in a new issue