mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-24 01:15:29 +02:00
2004-10-04 Alain Magloire
IllegalMonitorException fix. mi/org/eclipse/cdt/debug/mi/core/MIInferior.java src/org/eclipse/cdt/debug/mi/core/MIProcessAdapter.java
This commit is contained in:
parent
9b1cc11593
commit
edb5e36994
3 changed files with 26 additions and 14 deletions
|
@ -1,3 +1,9 @@
|
|||
2004-10-04 Alain Magloire
|
||||
|
||||
IllegalMonitorException fix.
|
||||
mi/org/eclipse/cdt/debug/mi/core/MIInferior.java
|
||||
src/org/eclipse/cdt/debug/mi/core/MIProcessAdapter.java
|
||||
|
||||
2004-09-22 Alain Magloire
|
||||
Makes the mi/ source folder independant of the cdt.core
|
||||
so we can make it a library.
|
||||
|
|
|
@ -178,7 +178,7 @@ public class MIInferior extends Process {
|
|||
}
|
||||
}
|
||||
|
||||
public synchronized void interrupt() throws MIException {
|
||||
public void interrupt() throws MIException {
|
||||
MIProcess gdb = session.getGDBProcess();
|
||||
// Check if they can handle the interrupt
|
||||
// Try the exec-interrupt; this will be for "gdb --async"
|
||||
|
@ -190,10 +190,12 @@ public class MIInferior extends Process {
|
|||
// 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 {
|
||||
wait(1000);
|
||||
} catch (InterruptedException e) {
|
||||
synchronized(this) {
|
||||
for (int i = 0;(state == RUNNING) && i < 5; i++) {
|
||||
try {
|
||||
wait(1000);
|
||||
} catch (InterruptedException e) {
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (MIException e) {
|
||||
|
|
|
@ -114,21 +114,25 @@ public class MIProcessAdapter implements MIProcess {
|
|||
Spawner gdbSpawner = (Spawner) fGDBProcess;
|
||||
gdbSpawner.interrupt();
|
||||
int state;
|
||||
// Allow (5 secs) for the interrupt to propagate.
|
||||
for (int i = 0; inferior.isRunning() && i < 5; i++) {
|
||||
try {
|
||||
wait(1000);
|
||||
} catch (InterruptedException e) {
|
||||
synchronized (inferior) {
|
||||
// Allow (5 secs) for the interrupt to propagate.
|
||||
for (int i = 0; inferior.isRunning() && i < 5; i++) {
|
||||
try {
|
||||
inferior.wait(1000);
|
||||
} catch (InterruptedException e) {
|
||||
}
|
||||
}
|
||||
}
|
||||
// If we are still running try to drop the sig to the PID
|
||||
if (inferior.isRunning() && inferior.getInferiorPID() > 0) {
|
||||
// lets try something else.
|
||||
gdbSpawner.raise(inferior.getInferiorPID(), gdbSpawner.INT);
|
||||
for (int i = 0; inferior.isRunning() && i < 5; i++) {
|
||||
try {
|
||||
wait(1000);
|
||||
} catch (InterruptedException e) {
|
||||
synchronized (inferior) {
|
||||
for (int i = 0; inferior.isRunning() && i < 5; i++) {
|
||||
try {
|
||||
inferior.wait(1000);
|
||||
} catch (InterruptedException e) {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue