mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-04 14:55:41 +02:00
Use MI2CDIException
This commit is contained in:
parent
cc16047077
commit
c18e72426c
12 changed files with 35 additions and 54 deletions
|
@ -145,7 +145,7 @@ public class BreakpointManager extends SessionObject implements ICDIBreakpointMa
|
|||
throw new CDIException("No answer");
|
||||
}
|
||||
} catch (MIException e) {
|
||||
throw new CDIException(e.getMessage());
|
||||
throw new MI2CDIException(e);
|
||||
} finally {
|
||||
resumeInferior(state);
|
||||
}
|
||||
|
@ -174,7 +174,7 @@ public class BreakpointManager extends SessionObject implements ICDIBreakpointMa
|
|||
throw new CDIException("No answer");
|
||||
}
|
||||
} catch (MIException e) {
|
||||
throw new CDIException(e.getMessage());
|
||||
throw new MI2CDIException(e);
|
||||
} finally {
|
||||
// Resume the program and enable events.
|
||||
resumeInferior(state);
|
||||
|
@ -202,7 +202,7 @@ public class BreakpointManager extends SessionObject implements ICDIBreakpointMa
|
|||
throw new CDIException("No answer");
|
||||
}
|
||||
} catch (MIException e) {
|
||||
throw new CDIException(e.getMessage());
|
||||
throw new MI2CDIException(e);
|
||||
} finally {
|
||||
resumeInferior(state);
|
||||
}
|
||||
|
@ -248,7 +248,7 @@ public class BreakpointManager extends SessionObject implements ICDIBreakpointMa
|
|||
throw new CDIException("No answer");
|
||||
}
|
||||
} catch (MIException e) {
|
||||
throw new CDIException(e.getMessage());
|
||||
throw new MI2CDIException(e);
|
||||
} finally {
|
||||
resumeInferior(state);
|
||||
}
|
||||
|
@ -276,7 +276,7 @@ public class BreakpointManager extends SessionObject implements ICDIBreakpointMa
|
|||
}
|
||||
// FIXME: Generate a DestroyEvent for deleted ones.
|
||||
} catch (MIException e) {
|
||||
throw new CDIException(e.getMessage());
|
||||
throw new MI2CDIException(e);
|
||||
}
|
||||
return (ICDIBreakpoint[]) listBreakpoints();
|
||||
}
|
||||
|
@ -342,7 +342,7 @@ public class BreakpointManager extends SessionObject implements ICDIBreakpointMa
|
|||
throw new CDIException("Error parsing");
|
||||
}
|
||||
} catch (MIException e) {
|
||||
throw new CDIException(e.getMessage());
|
||||
throw new MI2CDIException(e);
|
||||
} finally {
|
||||
resumeInferior(state);
|
||||
}
|
||||
|
@ -377,7 +377,7 @@ public class BreakpointManager extends SessionObject implements ICDIBreakpointMa
|
|||
throw new CDIException("Parsing Error");
|
||||
}
|
||||
} catch (MIException e) {
|
||||
throw new CDIException(e.getMessage());
|
||||
throw new MI2CDIException(e);
|
||||
} finally {
|
||||
resumeInferior(state);
|
||||
}
|
||||
|
|
|
@ -107,7 +107,7 @@ public class CTarget implements ICDITarget {
|
|||
}
|
||||
currentThreadId = info.getNewThreadId();
|
||||
} catch (MIException e) {
|
||||
throw new CDIException(e.getMessage());
|
||||
throw new MI2CDIException(e);
|
||||
}
|
||||
|
||||
// Resetting threads may change the value of
|
||||
|
@ -246,7 +246,7 @@ public class CTarget implements ICDITarget {
|
|||
throw new CDIException("No answer");
|
||||
}
|
||||
} catch (MIException e) {
|
||||
throw new CDIException(e.getMessage());
|
||||
throw new MI2CDIException(e);
|
||||
}
|
||||
lastExecutionToken = run.getToken();
|
||||
}
|
||||
|
@ -268,7 +268,7 @@ public class CTarget implements ICDITarget {
|
|||
throw new CDIException("No answer");
|
||||
}
|
||||
} catch (MIException e) {
|
||||
throw new CDIException(e.getMessage());
|
||||
throw new MI2CDIException(e);
|
||||
}
|
||||
lastExecutionToken = cont.getToken();
|
||||
} else if (mi.getMIInferior().isTerminated()) {
|
||||
|
@ -293,7 +293,7 @@ public class CTarget implements ICDITarget {
|
|||
throw new CDIException("No answer");
|
||||
}
|
||||
} catch (MIException e) {
|
||||
throw new CDIException(e.getMessage());
|
||||
throw new MI2CDIException(e);
|
||||
}
|
||||
lastExecutionToken = step.getToken();
|
||||
}
|
||||
|
@ -312,7 +312,7 @@ public class CTarget implements ICDITarget {
|
|||
throw new CDIException("No answer");
|
||||
}
|
||||
} catch (MIException e) {
|
||||
throw new CDIException(e.getMessage());
|
||||
throw new MI2CDIException(e);
|
||||
}
|
||||
lastExecutionToken = stepi.getToken();
|
||||
}
|
||||
|
@ -331,7 +331,7 @@ public class CTarget implements ICDITarget {
|
|||
throw new CDIException("No answer");
|
||||
}
|
||||
} catch (MIException e) {
|
||||
throw new CDIException(e.getMessage());
|
||||
throw new MI2CDIException(e);
|
||||
}
|
||||
lastExecutionToken = next.getToken();
|
||||
}
|
||||
|
@ -350,7 +350,7 @@ public class CTarget implements ICDITarget {
|
|||
throw new CDIException("No answer");
|
||||
}
|
||||
} catch (MIException e) {
|
||||
throw new CDIException(e.getMessage());
|
||||
throw new MI2CDIException(e);
|
||||
}
|
||||
lastExecutionToken = nexti.getToken();
|
||||
}
|
||||
|
@ -369,7 +369,7 @@ public class CTarget implements ICDITarget {
|
|||
throw new CDIException("No answer");
|
||||
}
|
||||
} catch (MIException e) {
|
||||
throw new CDIException(e.getMessage());
|
||||
throw new MI2CDIException(e);
|
||||
}
|
||||
lastExecutionToken = finish.getToken();
|
||||
}
|
||||
|
@ -383,7 +383,7 @@ public class CTarget implements ICDITarget {
|
|||
try {
|
||||
mi.getMIInferior().interrupt();
|
||||
} catch (MIException e) {
|
||||
throw new CDIException(e.getMessage());
|
||||
throw new MI2CDIException(e);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -401,7 +401,7 @@ public class CTarget implements ICDITarget {
|
|||
throw new CDIException("No answer");
|
||||
}
|
||||
} catch (MIException e) {
|
||||
throw new CDIException(e.getMessage());
|
||||
throw new MI2CDIException(e);
|
||||
}
|
||||
// Unfortunately -target-detach does not generate an
|
||||
// event so we do it here.
|
||||
|
@ -424,7 +424,7 @@ public class CTarget implements ICDITarget {
|
|||
throw new CDIException("No answer");
|
||||
}
|
||||
} catch (MIException e) {
|
||||
throw new CDIException(e.getMessage());
|
||||
throw new MI2CDIException(e);
|
||||
}
|
||||
lastExecutionToken = finish.getToken();
|
||||
}
|
||||
|
@ -451,7 +451,7 @@ public class CTarget implements ICDITarget {
|
|||
throw new CDIException("No answer");
|
||||
}
|
||||
} catch (MIException e) {
|
||||
throw new CDIException(e.getMessage());
|
||||
throw new MI2CDIException(e);
|
||||
}
|
||||
lastExecutionToken = until.getToken();
|
||||
|
||||
|
@ -475,7 +475,7 @@ public class CTarget implements ICDITarget {
|
|||
}
|
||||
return info.getExpression();
|
||||
} catch (MIException e) {
|
||||
throw new CDIException(e.getMessage());
|
||||
throw new MI2CDIException(e);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -106,7 +106,7 @@ public class CThread extends CObject implements ICDIThread {
|
|||
getCTarget().setCurrentThread(oldThread);
|
||||
return info.getDepth();
|
||||
} catch (MIException e) {
|
||||
throw new CDIException(e.getMessage());
|
||||
throw new MI2CDIException(e);
|
||||
//System.out.println(e);
|
||||
}
|
||||
}
|
||||
|
@ -189,7 +189,7 @@ public class CThread extends CObject implements ICDIThread {
|
|||
regMgr.update();
|
||||
|
||||
} catch (MIException e) {
|
||||
throw new CDIException(e.getMessage());
|
||||
throw new MI2CDIException(e);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -177,7 +177,7 @@ public class MemoryBlock extends CObject implements ICDIMemoryBlock {
|
|||
throw new CDIException("No answer");
|
||||
}
|
||||
} catch (MIException e) {
|
||||
throw new CDIException(e.getMessage());
|
||||
throw new MI2CDIException(e);
|
||||
}
|
||||
}
|
||||
// If the assign was succesfull fire a MIChangedEvent() via refresh.
|
||||
|
|
|
@ -130,7 +130,7 @@ public class MemoryManager extends SessionObject implements ICDIMemoryManager {
|
|||
}
|
||||
return info;
|
||||
} catch (MIException e) {
|
||||
throw new CDIException(e.getMessage());
|
||||
throw new MI2CDIException(e);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -168,7 +168,7 @@ public class Register extends CObject implements ICDIRegister, ICDIValue {
|
|||
}
|
||||
}
|
||||
} catch (MIException e) {
|
||||
throw new CDIException(e.getMessage());
|
||||
throw new MI2CDIException(e);
|
||||
}
|
||||
} else {
|
||||
String u = getUniqName();
|
||||
|
@ -214,7 +214,7 @@ public class Register extends CObject implements ICDIRegister, ICDIValue {
|
|||
throw new CDIException("No answer");
|
||||
}
|
||||
} catch (MIException e) {
|
||||
throw new CDIException(e.getMessage());
|
||||
throw new MI2CDIException(e);
|
||||
}
|
||||
// If the assign was succesfull fire a MIRegisterChangedEvent()
|
||||
MIRegisterChangedEvent change = new MIRegisterChangedEvent(registers.getToken(),
|
||||
|
|
|
@ -52,7 +52,7 @@ public class RegisterManager extends SessionObject {
|
|||
}
|
||||
return regs;
|
||||
} catch (MIException e) {
|
||||
throw new CDIException(e.getMessage());
|
||||
throw new MI2CDIException(e);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -119,7 +119,7 @@ public class RegisterManager extends SessionObject {
|
|||
MIEvent[] events = (MIEvent[])eventList.toArray(new MIEvent[0]);
|
||||
mi.fireEvents(events);
|
||||
} catch (MIException e) {
|
||||
throw new CDIException(e.getMessage());
|
||||
throw new MI2CDIException(e);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -18,12 +18,6 @@ import org.eclipse.cdt.debug.mi.core.command.MIGDBSet;
|
|||
import org.eclipse.cdt.debug.mi.core.output.MIInfo;
|
||||
|
||||
/**
|
||||
* @author alain
|
||||
*
|
||||
* To change this generated comment edit the template variable "typecomment":
|
||||
* Window>Preferences>Java>Templates.
|
||||
* To enable and disable the creation of type comments go to
|
||||
* Window>Preferences>Java>Code Generation.
|
||||
*/
|
||||
public class RuntimeOptions implements ICDIRuntimeOptions {
|
||||
|
||||
|
|
|
@ -18,12 +18,6 @@ import org.eclipse.cdt.debug.mi.core.output.MIVarEvaluateExpressionInfo;
|
|||
import org.eclipse.cdt.debug.mi.core.output.MIVarListChildrenInfo;
|
||||
|
||||
/**
|
||||
* @author alain
|
||||
*
|
||||
* To change this generated comment edit the template variable "typecomment":
|
||||
* Window>Preferences>Java>Templates.
|
||||
* To enable and disable the creation of type comments go to
|
||||
* Window>Preferences>Java>Code Generation.
|
||||
*/
|
||||
public class Value extends CObject implements ICDIValue {
|
||||
|
||||
|
@ -120,7 +114,7 @@ public class Value extends CObject implements ICDIValue {
|
|||
|
||||
}
|
||||
} catch (MIException e) {
|
||||
throw new CDIException(e.getMessage());
|
||||
throw new MI2CDIException(e);
|
||||
}
|
||||
return variables;
|
||||
}
|
||||
|
|
|
@ -20,7 +20,6 @@ import org.eclipse.cdt.debug.mi.core.output.MIVar;
|
|||
import org.eclipse.cdt.debug.mi.core.output.MIVarShowAttributesInfo;
|
||||
|
||||
/**
|
||||
* @author alain
|
||||
*/
|
||||
public class Variable extends CObject implements ICDIVariable {
|
||||
|
||||
|
@ -89,7 +88,7 @@ public class Variable extends CObject implements ICDIVariable {
|
|||
throw new CDIException("No answer");
|
||||
}
|
||||
} catch (MIException e) {
|
||||
throw new CDIException(e.getMessage());
|
||||
throw new MI2CDIException(e);
|
||||
}
|
||||
|
||||
// If the assign was succesfull fire a MIVarChangedEvent()
|
||||
|
@ -112,7 +111,7 @@ public class Variable extends CObject implements ICDIVariable {
|
|||
}
|
||||
return info.isEditable();
|
||||
} catch (MIException e) {
|
||||
throw new CDIException(e.getMessage());
|
||||
throw new MI2CDIException(e);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -131,7 +130,7 @@ public class Variable extends CObject implements ICDIVariable {
|
|||
throw new CDIException("No answer");
|
||||
}
|
||||
} catch (MIException e) {
|
||||
throw new CDIException(e.getMessage());
|
||||
throw new MI2CDIException(e);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -117,7 +117,7 @@ public class VariableManager extends SessionObject implements ICDIExpressionMana
|
|||
MIEvent[] events = (MIEvent[])eventList.toArray(new MIEvent[0]);
|
||||
mi.fireEvents(events);
|
||||
} catch (MIException e) {
|
||||
throw new CDIException(e.getMessage());
|
||||
throw new MI2CDIException(e);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -139,7 +139,7 @@ public class VariableManager extends SessionObject implements ICDIExpressionMana
|
|||
element.name = name;
|
||||
element.stackframe = stack;
|
||||
} catch (MIException e) {
|
||||
throw new CDIException(e.getMessage());
|
||||
throw new MI2CDIException(e);
|
||||
}
|
||||
}
|
||||
return element;
|
||||
|
@ -163,7 +163,7 @@ public class VariableManager extends SessionObject implements ICDIExpressionMana
|
|||
mi.postCommand(var);
|
||||
var.getMIInfo();
|
||||
} catch (MIException e) {
|
||||
throw new CDIException(e.getMessage());
|
||||
throw new MI2CDIException(e);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -10,12 +10,6 @@ import org.eclipse.cdt.debug.core.cdi.model.ICDIWatchpoint;
|
|||
import org.eclipse.cdt.debug.mi.core.output.MIBreakPoint;
|
||||
|
||||
/**
|
||||
* @author alain
|
||||
*
|
||||
* To change this generated comment edit the template variable "typecomment":
|
||||
* Window>Preferences>Java>Templates.
|
||||
* To enable and disable the creation of type comments go to
|
||||
* Window>Preferences>Java>Code Generation.
|
||||
*/
|
||||
public class Watchpoint extends Breakpoint implements ICDIWatchpoint {
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue