mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-14 19:55:45 +02:00
Bug 302927 (again) ensure the oobList doesn't get too large, but keep it non-zero (<=20) so we handle unexpected stopping on shared lib load, for example.
This commit is contained in:
parent
f253064060
commit
0d3f70517e
1 changed files with 7 additions and 6 deletions
|
@ -17,6 +17,7 @@ import java.io.IOException;
|
||||||
import java.io.InputStreamReader;
|
import java.io.InputStreamReader;
|
||||||
import java.io.OutputStream;
|
import java.io.OutputStream;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.LinkedList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import org.eclipse.cdt.debug.mi.core.command.CLICommand;
|
import org.eclipse.cdt.debug.mi.core.command.CLICommand;
|
||||||
|
@ -66,7 +67,7 @@ import org.eclipse.cdt.debug.mi.core.output.MIValue;
|
||||||
public class RxThread extends Thread {
|
public class RxThread extends Thread {
|
||||||
|
|
||||||
final MISession session;
|
final MISession session;
|
||||||
List<MIStreamRecord> oobList;
|
LinkedList<MIStreamRecord> oobList;
|
||||||
CLIProcessor cli;
|
CLIProcessor cli;
|
||||||
int prompt = 1; // 1 --> Primary prompt "(gdb)"; 2 --> Secondary Prompt ">"
|
int prompt = 1; // 1 --> Primary prompt "(gdb)"; 2 --> Secondary Prompt ">"
|
||||||
boolean fEnableConsole = true;
|
boolean fEnableConsole = true;
|
||||||
|
@ -75,7 +76,7 @@ public class RxThread extends Thread {
|
||||||
super("MI RX Thread"); //$NON-NLS-1$
|
super("MI RX Thread"); //$NON-NLS-1$
|
||||||
session = s;
|
session = s;
|
||||||
cli = new CLIProcessor(session);
|
cli = new CLIProcessor(session);
|
||||||
oobList = new ArrayList<MIStreamRecord>();
|
oobList = new LinkedList<MIStreamRecord>();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -259,10 +260,10 @@ public class RxThread extends Thread {
|
||||||
for (int i = 0; i < oobs.length; i++) {
|
for (int i = 0; i < oobs.length; i++) {
|
||||||
processMIOOBRecord(oobs[i], list);
|
processMIOOBRecord(oobs[i], list);
|
||||||
}
|
}
|
||||||
// If not waiting for any command results, don't need the result in the oobList
|
// If not waiting for any command results, ensure the oobList doesn't
|
||||||
// This breaks detecting shared library event handling. See bug 302927
|
// get too large. See Bug 302927 for more
|
||||||
// if (rxQueue.isEmpty())
|
if (rxQueue.isEmpty() && oobList.size() > 20)
|
||||||
// oobList.clear();
|
oobList.removeFirst();
|
||||||
}
|
}
|
||||||
|
|
||||||
MIEvent[] events = list.toArray(new MIEvent[list.size()]);
|
MIEvent[] events = list.toArray(new MIEvent[list.size()]);
|
||||||
|
|
Loading…
Add table
Reference in a new issue