mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-10 09:45:39 +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.OutputStream;
|
||||
import java.util.ArrayList;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
|
||||
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 {
|
||||
|
||||
final MISession session;
|
||||
List<MIStreamRecord> oobList;
|
||||
LinkedList<MIStreamRecord> oobList;
|
||||
CLIProcessor cli;
|
||||
int prompt = 1; // 1 --> Primary prompt "(gdb)"; 2 --> Secondary Prompt ">"
|
||||
boolean fEnableConsole = true;
|
||||
|
@ -75,7 +76,7 @@ public class RxThread extends Thread {
|
|||
super("MI RX Thread"); //$NON-NLS-1$
|
||||
session = s;
|
||||
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++) {
|
||||
processMIOOBRecord(oobs[i], list);
|
||||
}
|
||||
// If not waiting for any command results, don't need the result in the oobList
|
||||
// This breaks detecting shared library event handling. See bug 302927
|
||||
// if (rxQueue.isEmpty())
|
||||
// oobList.clear();
|
||||
// If not waiting for any command results, ensure the oobList doesn't
|
||||
// get too large. See Bug 302927 for more
|
||||
if (rxQueue.isEmpty() && oobList.size() > 20)
|
||||
oobList.removeFirst();
|
||||
}
|
||||
|
||||
MIEvent[] events = list.toArray(new MIEvent[list.size()]);
|
||||
|
|
Loading…
Add table
Reference in a new issue