Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames Blackburn2010-02-22 09:41:47 -0500
committerJames Blackburn2010-02-22 09:41:47 -0500
commit0d3f70517e4ffca0d1353c409141f8cbdccac23a (patch)
tree668b010b1ca5d7df0158417768516242ceb5d17e /debug/org.eclipse.cdt.debug.mi.core
parentf2530640603a5703f5df03ce9d4bc49050263421 (diff)
downloadorg.eclipse.cdt-0d3f70517e4ffca0d1353c409141f8cbdccac23a.tar.gz
org.eclipse.cdt-0d3f70517e4ffca0d1353c409141f8cbdccac23a.tar.xz
org.eclipse.cdt-0d3f70517e4ffca0d1353c409141f8cbdccac23a.zip
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.
Diffstat (limited to 'debug/org.eclipse.cdt.debug.mi.core')
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/RxThread.java13
1 files changed, 7 insertions, 6 deletions
diff --git a/debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/RxThread.java b/debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/RxThread.java
index 98d858fbbc..8edffa637b 100644
--- a/debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/RxThread.java
+++ b/debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/RxThread.java
@@ -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()]);

Back to the top