1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-29 19:45:01 +02:00

[249209] With the new GDB, asynchronous events do not have tokens. So, *running,

*stopped, etc will not have a token.  However, in our traces, we somehow print
the token as -1.  This is the fix.
This commit is contained in:
Marc Khouzam 2008-09-30 20:19:06 +00:00
parent 4edeecf7f8
commit 5b0f17bcfc
2 changed files with 6 additions and 3 deletions

View file

@ -21,7 +21,7 @@ public abstract class MIAsyncRecord extends MIOOBRecord {
MIResult[] results = null;
String asynClass = ""; //$NON-NLS-1$
int token = 0;
int token = -1;
public int getToken() {
return token;
@ -53,7 +53,7 @@ public abstract class MIAsyncRecord extends MIOOBRecord {
@Override
public String toString() {
StringBuffer buffer = new StringBuffer();
if (token != 0) {
if (token > 0) {
buffer.append(token);
}
if (this instanceof MIExecAsyncOutput) {

View file

@ -57,7 +57,10 @@ public class MIResultRecord {
@Override
public String toString() {
StringBuffer buffer = new StringBuffer();
buffer.append(token).append('^').append(resultClass);
if (token > 0) {
buffer.append(token);
}
buffer.append('^').append(resultClass);
for (int i = 0; i < results.length; i++) {
buffer.append(',').append(results[i].toString());
}