|
Lines 17-22
Link Here
|
| 17 |
import java.io.InputStreamReader; |
17 |
import java.io.InputStreamReader; |
| 18 |
import java.io.OutputStream; |
18 |
import java.io.OutputStream; |
| 19 |
import java.util.ArrayList; |
19 |
import java.util.ArrayList; |
|
|
20 |
import java.util.LinkedList; |
| 20 |
import java.util.List; |
21 |
import java.util.List; |
| 21 |
|
22 |
|
| 22 |
import org.eclipse.cdt.debug.mi.core.command.CLICommand; |
23 |
import org.eclipse.cdt.debug.mi.core.command.CLICommand; |
|
Lines 66-72
Link Here
|
| 66 |
public class RxThread extends Thread { |
67 |
public class RxThread extends Thread { |
| 67 |
|
68 |
|
| 68 |
final MISession session; |
69 |
final MISession session; |
| 69 |
List<MIStreamRecord> oobList; |
70 |
LinkedList<MIStreamRecord> oobList; |
| 70 |
CLIProcessor cli; |
71 |
CLIProcessor cli; |
| 71 |
int prompt = 1; // 1 --> Primary prompt "(gdb)"; 2 --> Secondary Prompt ">" |
72 |
int prompt = 1; // 1 --> Primary prompt "(gdb)"; 2 --> Secondary Prompt ">" |
| 72 |
boolean fEnableConsole = true; |
73 |
boolean fEnableConsole = true; |
|
Lines 75-81
Link Here
|
| 75 |
super("MI RX Thread"); //$NON-NLS-1$ |
76 |
super("MI RX Thread"); //$NON-NLS-1$ |
| 76 |
session = s; |
77 |
session = s; |
| 77 |
cli = new CLIProcessor(session); |
78 |
cli = new CLIProcessor(session); |
| 78 |
oobList = new ArrayList<MIStreamRecord>(); |
79 |
oobList = new LinkedList<MIStreamRecord>(); |
| 79 |
} |
80 |
} |
| 80 |
|
81 |
|
| 81 |
/* |
82 |
/* |
|
Lines 259-268
Link Here
|
| 259 |
for (int i = 0; i < oobs.length; i++) { |
260 |
for (int i = 0; i < oobs.length; i++) { |
| 260 |
processMIOOBRecord(oobs[i], list); |
261 |
processMIOOBRecord(oobs[i], list); |
| 261 |
} |
262 |
} |
| 262 |
// If not waiting for any command results, don't need the result in the oobList |
263 |
// If not waiting for any command results, prune the oobList |
| 263 |
// This breaks detecting shared library event handling. See bug 302927 |
264 |
if (rxQueue.isEmpty() && oobList.size() > 4) |
| 264 |
// if (rxQueue.isEmpty()) |
265 |
oobList.removeFirst(); |
| 265 |
// oobList.clear(); |
|
|
| 266 |
} |
266 |
} |
| 267 |
|
267 |
|
| 268 |
MIEvent[] events = list.toArray(new MIEvent[list.size()]); |
268 |
MIEvent[] events = list.toArray(new MIEvent[list.size()]); |