mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-24 01:15:29 +02:00
This is a major cleanup, by boosting the number of warnings in
the compiler, for unuse vairables, imports etc ...
This commit is contained in:
parent
426a675867
commit
975236b144
23 changed files with 23 additions and 74 deletions
|
@ -4,10 +4,6 @@
|
|||
*/
|
||||
package org.eclipse.cdt.debug.mi.core;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
|
||||
import org.eclipse.cdt.debug.mi.core.command.Command;
|
||||
|
||||
/**
|
||||
|
|
|
@ -5,8 +5,6 @@
|
|||
|
||||
package org.eclipse.cdt.debug.mi.core;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
import org.eclipse.cdt.debug.mi.core.event.MIEvent;
|
||||
|
||||
/**
|
||||
|
|
|
@ -13,11 +13,9 @@ import java.io.PipedOutputStream;
|
|||
import org.eclipse.cdt.debug.mi.core.command.CLICommand;
|
||||
import org.eclipse.cdt.debug.mi.core.command.CommandFactory;
|
||||
import org.eclipse.cdt.debug.mi.core.command.MIExecAbort;
|
||||
import org.eclipse.cdt.debug.mi.core.command.MIExecInterrupt;
|
||||
import org.eclipse.cdt.debug.mi.core.command.MIGDBShowExitCode;
|
||||
import org.eclipse.cdt.debug.mi.core.event.MIInferiorExitEvent;
|
||||
import org.eclipse.cdt.debug.mi.core.output.MIGDBShowExitCodeInfo;
|
||||
import org.eclipse.cdt.debug.mi.core.output.MIInfo;
|
||||
import org.eclipse.cdt.utils.pty.PTY;
|
||||
import org.eclipse.cdt.utils.spawner.Spawner;
|
||||
|
||||
|
@ -169,7 +167,7 @@ public class MIInferior extends Process {
|
|||
// Try to interrupt the inferior, first.
|
||||
interrupt();
|
||||
session.postCommand(abort);
|
||||
MIInfo info = abort.getMIInfo();
|
||||
abort.getMIInfo();
|
||||
setTerminated(true);
|
||||
} catch (MIException e) {
|
||||
}
|
||||
|
|
|
@ -68,7 +68,7 @@ public class MIPlugin extends Plugin {
|
|||
MIPlugin plugin = getDefault();
|
||||
Preferences prefs = plugin.getPluginPreferences();
|
||||
int timeout = prefs.getInt(IMIConstants.PREF_REQUEST_TIMEOUT);
|
||||
return createMISession(process, pty, timeout, 0);
|
||||
return createMISession(process, pty, timeout, type);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -81,7 +81,6 @@ public class MIPlugin extends Plugin {
|
|||
PTY pty = null;
|
||||
try {
|
||||
pty = new PTY();
|
||||
String ttyName = pty.getSlaveName();
|
||||
} catch (IOException e) {
|
||||
}
|
||||
return createCSession(gdb, program, pty);
|
||||
|
|
|
@ -13,13 +13,10 @@ import java.util.Observable;
|
|||
|
||||
import org.eclipse.cdt.debug.mi.core.command.Command;
|
||||
import org.eclipse.cdt.debug.mi.core.command.CommandFactory;
|
||||
import org.eclipse.cdt.debug.mi.core.command.MIExecAbort;
|
||||
import org.eclipse.cdt.debug.mi.core.command.MIExecInterrupt;
|
||||
import org.eclipse.cdt.debug.mi.core.command.MIGDBExit;
|
||||
import org.eclipse.cdt.debug.mi.core.command.MIGDBSet;
|
||||
import org.eclipse.cdt.debug.mi.core.event.MIEvent;
|
||||
import org.eclipse.cdt.debug.mi.core.event.MIGDBExitEvent;
|
||||
import org.eclipse.cdt.debug.mi.core.output.MIInfo;
|
||||
import org.eclipse.cdt.debug.mi.core.output.MIOutput;
|
||||
import org.eclipse.cdt.debug.mi.core.output.MIParser;
|
||||
import org.eclipse.cdt.utils.pty.PTY;
|
||||
|
@ -115,19 +112,18 @@ public class MISession extends Observable {
|
|||
|
||||
// Disable a certain number of irritations from gdb.
|
||||
// Like confirmation and screen size.
|
||||
MIInfo info;
|
||||
|
||||
MIGDBSet confirm = new MIGDBSet(new String[]{"confirm", "off"});
|
||||
postCommand(confirm);
|
||||
info = confirm.getMIInfo();
|
||||
confirm.getMIInfo();
|
||||
|
||||
MIGDBSet width = new MIGDBSet(new String[]{"width", "0"});
|
||||
postCommand(width);
|
||||
info = confirm.getMIInfo();
|
||||
confirm.getMIInfo();
|
||||
|
||||
MIGDBSet height = new MIGDBSet(new String[]{"height", "0"});
|
||||
postCommand(height);
|
||||
info = confirm.getMIInfo();
|
||||
confirm.getMIInfo();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -24,7 +24,6 @@ import org.eclipse.cdt.debug.mi.core.MIException;
|
|||
import org.eclipse.cdt.debug.mi.core.MISession;
|
||||
import org.eclipse.cdt.debug.mi.core.command.CommandFactory;
|
||||
import org.eclipse.cdt.debug.mi.core.command.MIEnvironmentDirectory;
|
||||
import org.eclipse.cdt.debug.mi.core.output.MIInfo;
|
||||
|
||||
/**
|
||||
* @see org.eclipse.cdt.debug.core.cdi.ICDISession
|
||||
|
@ -203,7 +202,7 @@ public class CSession implements ICDISession, ICDISessionObject {
|
|||
MIEnvironmentDirectory dir = factory.createMIEnvironmentDirectory(dirs);
|
||||
try {
|
||||
session.postCommand(dir);
|
||||
MIInfo info = dir.getMIInfo();
|
||||
dir.getMIInfo();
|
||||
} catch (MIException e) {
|
||||
throw new CDIException(e.getMessage());
|
||||
}
|
||||
|
|
|
@ -21,7 +21,6 @@ import org.eclipse.cdt.debug.core.cdi.model.ICDIValue;
|
|||
import org.eclipse.cdt.debug.mi.core.MIException;
|
||||
import org.eclipse.cdt.debug.mi.core.MISession;
|
||||
import org.eclipse.cdt.debug.mi.core.command.CommandFactory;
|
||||
import org.eclipse.cdt.debug.mi.core.command.MICommand;
|
||||
import org.eclipse.cdt.debug.mi.core.command.MIDataEvaluateExpression;
|
||||
import org.eclipse.cdt.debug.mi.core.command.MIExecContinue;
|
||||
import org.eclipse.cdt.debug.mi.core.command.MIExecFinish;
|
||||
|
@ -356,7 +355,6 @@ public class CTarget implements ICDITarget {
|
|||
public void suspend() throws CDIException {
|
||||
// send a noop to see if we get an aswer.
|
||||
MISession mi = session.getMISession();
|
||||
MICommand noop = new MICommand("");
|
||||
try {
|
||||
mi.getMIInferior().interrupt();
|
||||
} catch (MIException e) {
|
||||
|
|
|
@ -55,7 +55,6 @@ public class CThread extends CObject implements ICDIThread {
|
|||
|
||||
StackFrame[] stack = noStack;
|
||||
CSession session = getCTarget().getCSession();
|
||||
VariableManager mgr = (VariableManager)session.getVariableManager();
|
||||
|
||||
MISession mi = session.getMISession();
|
||||
CommandFactory factory = mi.getCommandFactory();
|
||||
|
|
|
@ -62,7 +62,6 @@ public class EventManager extends SessionObject implements ICDIEventManager, Obs
|
|||
cdiEvent = new DestroyedEvent(session, (MIVarChangedEvent)miEvent);
|
||||
}
|
||||
} else if (miEvent instanceof MIRegisterChangedEvent) {
|
||||
MIRegisterChangedEvent eventChanged = (MIRegisterChangedEvent)miEvent;
|
||||
cdiEvent = new ChangedEvent(session, (MIRegisterChangedEvent)miEvent);
|
||||
}
|
||||
} else if (miEvent instanceof MIThreadExitEvent) {
|
||||
|
@ -151,7 +150,7 @@ public class EventManager extends SessionObject implements ICDIEventManager, Obs
|
|||
}
|
||||
|
||||
void processRunningEvent() {
|
||||
CTarget target = getCSession().getCTarget();
|
||||
//CTarget target = getCSession().getCTarget();
|
||||
//target.clearState();
|
||||
}
|
||||
|
||||
|
|
|
@ -19,7 +19,6 @@ import org.eclipse.cdt.debug.mi.core.command.MIGDBShowDirectories;
|
|||
import org.eclipse.cdt.debug.mi.core.command.MIGDBShowSolibSearchPath;
|
||||
import org.eclipse.cdt.debug.mi.core.output.MIGDBShowDirectoriesInfo;
|
||||
import org.eclipse.cdt.debug.mi.core.output.MIGDBShowSolibSearchPathInfo;
|
||||
import org.eclipse.cdt.debug.mi.core.output.MIInfo;
|
||||
|
||||
|
||||
/**
|
||||
|
@ -58,7 +57,7 @@ public class SourceManager extends SessionObject implements ICDISourceManager {
|
|||
MIEnvironmentDirectory dir = factory.createMIEnvironmentDirectory(dirs);
|
||||
try {
|
||||
mi.postCommand(dir);
|
||||
MIInfo info = dir.getMIInfo();
|
||||
dir.getMIInfo();
|
||||
} catch (MIException e) {
|
||||
throw new CDIException(e.getMessage());
|
||||
}
|
||||
|
@ -86,7 +85,7 @@ public class SourceManager extends SessionObject implements ICDISourceManager {
|
|||
MIGDBSetSolibSearchPath solib = factory.createMIGDBSetSolibSearchPath(libPaths);
|
||||
try {
|
||||
mi.postCommand(solib);
|
||||
MIInfo info = solib.getMIInfo();
|
||||
solib.getMIInfo();
|
||||
} catch (MIException e) {
|
||||
throw new CDIException(e.getMessage());
|
||||
}
|
||||
|
@ -111,7 +110,7 @@ public class SourceManager extends SessionObject implements ICDISourceManager {
|
|||
MIGDBSetAutoSolib solib = factory.createMIGDBSetAutoSolib(true);
|
||||
try {
|
||||
mi.postCommand(solib);
|
||||
MIInfo info = solib.getMIInfo();
|
||||
solib.getMIInfo();
|
||||
} catch (MIException e) {
|
||||
throw new CDIException(e.getMessage());
|
||||
}
|
||||
|
|
|
@ -21,7 +21,6 @@ import org.eclipse.cdt.debug.mi.core.command.MIVarDelete;
|
|||
import org.eclipse.cdt.debug.mi.core.command.MIVarUpdate;
|
||||
import org.eclipse.cdt.debug.mi.core.event.MIEvent;
|
||||
import org.eclipse.cdt.debug.mi.core.event.MIVarChangedEvent;
|
||||
import org.eclipse.cdt.debug.mi.core.output.MIInfo;
|
||||
import org.eclipse.cdt.debug.mi.core.output.MIVar;
|
||||
import org.eclipse.cdt.debug.mi.core.output.MIVarChange;
|
||||
import org.eclipse.cdt.debug.mi.core.output.MIVarCreateInfo;
|
||||
|
@ -162,7 +161,7 @@ public class VariableManager extends SessionObject implements ICDIExpressionMana
|
|||
MIVarDelete var = factory.createMIVarDelete(miVar.getVarName());
|
||||
try {
|
||||
mi.postCommand(var);
|
||||
MIInfo info = var.getMIInfo();
|
||||
var.getMIInfo();
|
||||
} catch (MIException e) {
|
||||
throw new CDIException(e.getMessage());
|
||||
}
|
||||
|
|
|
@ -6,8 +6,7 @@
|
|||
|
||||
package org.eclipse.cdt.debug.mi.core.command;
|
||||
|
||||
import org.eclipse.cdt.debug.mi.core.output.MIInfo;
|
||||
import org.eclipse.cdt.debug.mi.core.output.MIOutput;
|
||||
|
||||
|
||||
/**
|
||||
* Represents a CLI command.
|
||||
|
|
|
@ -6,9 +6,7 @@
|
|||
|
||||
package org.eclipse.cdt.debug.mi.core.command;
|
||||
|
||||
import org.eclipse.cdt.debug.mi.core.MIException;
|
||||
import org.eclipse.cdt.debug.mi.core.output.MIInfo;
|
||||
import org.eclipse.cdt.debug.mi.core.output.MIOutput;
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
|
|
|
@ -6,9 +6,7 @@
|
|||
|
||||
package org.eclipse.cdt.debug.mi.core.command;
|
||||
|
||||
import org.eclipse.cdt.debug.mi.core.MIException;
|
||||
import org.eclipse.cdt.debug.mi.core.output.MIInfo;
|
||||
import org.eclipse.cdt.debug.mi.core.output.MIOutput;
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
|
|
|
@ -6,9 +6,7 @@
|
|||
|
||||
package org.eclipse.cdt.debug.mi.core.command;
|
||||
|
||||
import org.eclipse.cdt.debug.mi.core.MIException;
|
||||
import org.eclipse.cdt.debug.mi.core.output.MIInfo;
|
||||
import org.eclipse.cdt.debug.mi.core.output.MIOutput;
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
|
|
|
@ -6,9 +6,7 @@
|
|||
|
||||
package org.eclipse.cdt.debug.mi.core.command;
|
||||
|
||||
import org.eclipse.cdt.debug.mi.core.MIException;
|
||||
import org.eclipse.cdt.debug.mi.core.output.MIInfo;
|
||||
import org.eclipse.cdt.debug.mi.core.output.MIOutput;
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
|
|
|
@ -5,13 +5,7 @@
|
|||
*/
|
||||
package org.eclipse.cdt.debug.mi.core.event;
|
||||
|
||||
import org.eclipse.cdt.debug.mi.core.output.MIConst;
|
||||
import org.eclipse.cdt.debug.mi.core.output.MIExecAsyncOutput;
|
||||
import org.eclipse.cdt.debug.mi.core.output.MIFrame;
|
||||
import org.eclipse.cdt.debug.mi.core.output.MIResult;
|
||||
import org.eclipse.cdt.debug.mi.core.output.MIResultRecord;
|
||||
import org.eclipse.cdt.debug.mi.core.output.MITuple;
|
||||
import org.eclipse.cdt.debug.mi.core.output.MIValue;
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
|
|
|
@ -5,13 +5,7 @@
|
|||
*/
|
||||
package org.eclipse.cdt.debug.mi.core.event;
|
||||
|
||||
import org.eclipse.cdt.debug.mi.core.output.MIConst;
|
||||
import org.eclipse.cdt.debug.mi.core.output.MIExecAsyncOutput;
|
||||
import org.eclipse.cdt.debug.mi.core.output.MIFrame;
|
||||
import org.eclipse.cdt.debug.mi.core.output.MIResult;
|
||||
import org.eclipse.cdt.debug.mi.core.output.MIResultRecord;
|
||||
import org.eclipse.cdt.debug.mi.core.output.MITuple;
|
||||
import org.eclipse.cdt.debug.mi.core.output.MIValue;
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
|
|
|
@ -5,13 +5,7 @@
|
|||
*/
|
||||
package org.eclipse.cdt.debug.mi.core.event;
|
||||
|
||||
import org.eclipse.cdt.debug.mi.core.output.MIConst;
|
||||
import org.eclipse.cdt.debug.mi.core.output.MIExecAsyncOutput;
|
||||
import org.eclipse.cdt.debug.mi.core.output.MIFrame;
|
||||
import org.eclipse.cdt.debug.mi.core.output.MIResult;
|
||||
import org.eclipse.cdt.debug.mi.core.output.MIResultRecord;
|
||||
import org.eclipse.cdt.debug.mi.core.output.MITuple;
|
||||
import org.eclipse.cdt.debug.mi.core.output.MIValue;
|
||||
|
||||
|
||||
/**
|
||||
* *stopped
|
||||
|
|
|
@ -5,8 +5,7 @@
|
|||
|
||||
package org.eclipse.cdt.debug.mi.core.output;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* GDB/MI data read memor info extraction.
|
||||
|
|
|
@ -5,8 +5,7 @@
|
|||
|
||||
package org.eclipse.cdt.debug.mi.core.output;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
|
|
|
@ -4,8 +4,7 @@
|
|||
*/
|
||||
package org.eclipse.cdt.debug.mi.core.output;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
|
|
|
@ -4,8 +4,7 @@
|
|||
*/
|
||||
package org.eclipse.cdt.debug.mi.core.output;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Reference in a new issue