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");
|
throw new CDIException("No answer");
|
||||||
}
|
}
|
||||||
} catch (MIException e) {
|
} catch (MIException e) {
|
||||||
throw new CDIException(e.getMessage());
|
throw new MI2CDIException(e);
|
||||||
} finally {
|
} finally {
|
||||||
resumeInferior(state);
|
resumeInferior(state);
|
||||||
}
|
}
|
||||||
|
@ -174,7 +174,7 @@ public class BreakpointManager extends SessionObject implements ICDIBreakpointMa
|
||||||
throw new CDIException("No answer");
|
throw new CDIException("No answer");
|
||||||
}
|
}
|
||||||
} catch (MIException e) {
|
} catch (MIException e) {
|
||||||
throw new CDIException(e.getMessage());
|
throw new MI2CDIException(e);
|
||||||
} finally {
|
} finally {
|
||||||
// Resume the program and enable events.
|
// Resume the program and enable events.
|
||||||
resumeInferior(state);
|
resumeInferior(state);
|
||||||
|
@ -202,7 +202,7 @@ public class BreakpointManager extends SessionObject implements ICDIBreakpointMa
|
||||||
throw new CDIException("No answer");
|
throw new CDIException("No answer");
|
||||||
}
|
}
|
||||||
} catch (MIException e) {
|
} catch (MIException e) {
|
||||||
throw new CDIException(e.getMessage());
|
throw new MI2CDIException(e);
|
||||||
} finally {
|
} finally {
|
||||||
resumeInferior(state);
|
resumeInferior(state);
|
||||||
}
|
}
|
||||||
|
@ -248,7 +248,7 @@ public class BreakpointManager extends SessionObject implements ICDIBreakpointMa
|
||||||
throw new CDIException("No answer");
|
throw new CDIException("No answer");
|
||||||
}
|
}
|
||||||
} catch (MIException e) {
|
} catch (MIException e) {
|
||||||
throw new CDIException(e.getMessage());
|
throw new MI2CDIException(e);
|
||||||
} finally {
|
} finally {
|
||||||
resumeInferior(state);
|
resumeInferior(state);
|
||||||
}
|
}
|
||||||
|
@ -276,7 +276,7 @@ public class BreakpointManager extends SessionObject implements ICDIBreakpointMa
|
||||||
}
|
}
|
||||||
// FIXME: Generate a DestroyEvent for deleted ones.
|
// FIXME: Generate a DestroyEvent for deleted ones.
|
||||||
} catch (MIException e) {
|
} catch (MIException e) {
|
||||||
throw new CDIException(e.getMessage());
|
throw new MI2CDIException(e);
|
||||||
}
|
}
|
||||||
return (ICDIBreakpoint[]) listBreakpoints();
|
return (ICDIBreakpoint[]) listBreakpoints();
|
||||||
}
|
}
|
||||||
|
@ -342,7 +342,7 @@ public class BreakpointManager extends SessionObject implements ICDIBreakpointMa
|
||||||
throw new CDIException("Error parsing");
|
throw new CDIException("Error parsing");
|
||||||
}
|
}
|
||||||
} catch (MIException e) {
|
} catch (MIException e) {
|
||||||
throw new CDIException(e.getMessage());
|
throw new MI2CDIException(e);
|
||||||
} finally {
|
} finally {
|
||||||
resumeInferior(state);
|
resumeInferior(state);
|
||||||
}
|
}
|
||||||
|
@ -377,7 +377,7 @@ public class BreakpointManager extends SessionObject implements ICDIBreakpointMa
|
||||||
throw new CDIException("Parsing Error");
|
throw new CDIException("Parsing Error");
|
||||||
}
|
}
|
||||||
} catch (MIException e) {
|
} catch (MIException e) {
|
||||||
throw new CDIException(e.getMessage());
|
throw new MI2CDIException(e);
|
||||||
} finally {
|
} finally {
|
||||||
resumeInferior(state);
|
resumeInferior(state);
|
||||||
}
|
}
|
||||||
|
|
|
@ -107,7 +107,7 @@ public class CTarget implements ICDITarget {
|
||||||
}
|
}
|
||||||
currentThreadId = info.getNewThreadId();
|
currentThreadId = info.getNewThreadId();
|
||||||
} catch (MIException e) {
|
} catch (MIException e) {
|
||||||
throw new CDIException(e.getMessage());
|
throw new MI2CDIException(e);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Resetting threads may change the value of
|
// Resetting threads may change the value of
|
||||||
|
@ -246,7 +246,7 @@ public class CTarget implements ICDITarget {
|
||||||
throw new CDIException("No answer");
|
throw new CDIException("No answer");
|
||||||
}
|
}
|
||||||
} catch (MIException e) {
|
} catch (MIException e) {
|
||||||
throw new CDIException(e.getMessage());
|
throw new MI2CDIException(e);
|
||||||
}
|
}
|
||||||
lastExecutionToken = run.getToken();
|
lastExecutionToken = run.getToken();
|
||||||
}
|
}
|
||||||
|
@ -268,7 +268,7 @@ public class CTarget implements ICDITarget {
|
||||||
throw new CDIException("No answer");
|
throw new CDIException("No answer");
|
||||||
}
|
}
|
||||||
} catch (MIException e) {
|
} catch (MIException e) {
|
||||||
throw new CDIException(e.getMessage());
|
throw new MI2CDIException(e);
|
||||||
}
|
}
|
||||||
lastExecutionToken = cont.getToken();
|
lastExecutionToken = cont.getToken();
|
||||||
} else if (mi.getMIInferior().isTerminated()) {
|
} else if (mi.getMIInferior().isTerminated()) {
|
||||||
|
@ -293,7 +293,7 @@ public class CTarget implements ICDITarget {
|
||||||
throw new CDIException("No answer");
|
throw new CDIException("No answer");
|
||||||
}
|
}
|
||||||
} catch (MIException e) {
|
} catch (MIException e) {
|
||||||
throw new CDIException(e.getMessage());
|
throw new MI2CDIException(e);
|
||||||
}
|
}
|
||||||
lastExecutionToken = step.getToken();
|
lastExecutionToken = step.getToken();
|
||||||
}
|
}
|
||||||
|
@ -312,7 +312,7 @@ public class CTarget implements ICDITarget {
|
||||||
throw new CDIException("No answer");
|
throw new CDIException("No answer");
|
||||||
}
|
}
|
||||||
} catch (MIException e) {
|
} catch (MIException e) {
|
||||||
throw new CDIException(e.getMessage());
|
throw new MI2CDIException(e);
|
||||||
}
|
}
|
||||||
lastExecutionToken = stepi.getToken();
|
lastExecutionToken = stepi.getToken();
|
||||||
}
|
}
|
||||||
|
@ -331,7 +331,7 @@ public class CTarget implements ICDITarget {
|
||||||
throw new CDIException("No answer");
|
throw new CDIException("No answer");
|
||||||
}
|
}
|
||||||
} catch (MIException e) {
|
} catch (MIException e) {
|
||||||
throw new CDIException(e.getMessage());
|
throw new MI2CDIException(e);
|
||||||
}
|
}
|
||||||
lastExecutionToken = next.getToken();
|
lastExecutionToken = next.getToken();
|
||||||
}
|
}
|
||||||
|
@ -350,7 +350,7 @@ public class CTarget implements ICDITarget {
|
||||||
throw new CDIException("No answer");
|
throw new CDIException("No answer");
|
||||||
}
|
}
|
||||||
} catch (MIException e) {
|
} catch (MIException e) {
|
||||||
throw new CDIException(e.getMessage());
|
throw new MI2CDIException(e);
|
||||||
}
|
}
|
||||||
lastExecutionToken = nexti.getToken();
|
lastExecutionToken = nexti.getToken();
|
||||||
}
|
}
|
||||||
|
@ -369,7 +369,7 @@ public class CTarget implements ICDITarget {
|
||||||
throw new CDIException("No answer");
|
throw new CDIException("No answer");
|
||||||
}
|
}
|
||||||
} catch (MIException e) {
|
} catch (MIException e) {
|
||||||
throw new CDIException(e.getMessage());
|
throw new MI2CDIException(e);
|
||||||
}
|
}
|
||||||
lastExecutionToken = finish.getToken();
|
lastExecutionToken = finish.getToken();
|
||||||
}
|
}
|
||||||
|
@ -383,7 +383,7 @@ public class CTarget implements ICDITarget {
|
||||||
try {
|
try {
|
||||||
mi.getMIInferior().interrupt();
|
mi.getMIInferior().interrupt();
|
||||||
} catch (MIException e) {
|
} 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");
|
throw new CDIException("No answer");
|
||||||
}
|
}
|
||||||
} catch (MIException e) {
|
} catch (MIException e) {
|
||||||
throw new CDIException(e.getMessage());
|
throw new MI2CDIException(e);
|
||||||
}
|
}
|
||||||
// Unfortunately -target-detach does not generate an
|
// Unfortunately -target-detach does not generate an
|
||||||
// event so we do it here.
|
// event so we do it here.
|
||||||
|
@ -424,7 +424,7 @@ public class CTarget implements ICDITarget {
|
||||||
throw new CDIException("No answer");
|
throw new CDIException("No answer");
|
||||||
}
|
}
|
||||||
} catch (MIException e) {
|
} catch (MIException e) {
|
||||||
throw new CDIException(e.getMessage());
|
throw new MI2CDIException(e);
|
||||||
}
|
}
|
||||||
lastExecutionToken = finish.getToken();
|
lastExecutionToken = finish.getToken();
|
||||||
}
|
}
|
||||||
|
@ -451,7 +451,7 @@ public class CTarget implements ICDITarget {
|
||||||
throw new CDIException("No answer");
|
throw new CDIException("No answer");
|
||||||
}
|
}
|
||||||
} catch (MIException e) {
|
} catch (MIException e) {
|
||||||
throw new CDIException(e.getMessage());
|
throw new MI2CDIException(e);
|
||||||
}
|
}
|
||||||
lastExecutionToken = until.getToken();
|
lastExecutionToken = until.getToken();
|
||||||
|
|
||||||
|
@ -475,7 +475,7 @@ public class CTarget implements ICDITarget {
|
||||||
}
|
}
|
||||||
return info.getExpression();
|
return info.getExpression();
|
||||||
} catch (MIException e) {
|
} 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);
|
getCTarget().setCurrentThread(oldThread);
|
||||||
return info.getDepth();
|
return info.getDepth();
|
||||||
} catch (MIException e) {
|
} catch (MIException e) {
|
||||||
throw new CDIException(e.getMessage());
|
throw new MI2CDIException(e);
|
||||||
//System.out.println(e);
|
//System.out.println(e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -189,7 +189,7 @@ public class CThread extends CObject implements ICDIThread {
|
||||||
regMgr.update();
|
regMgr.update();
|
||||||
|
|
||||||
} catch (MIException e) {
|
} 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");
|
throw new CDIException("No answer");
|
||||||
}
|
}
|
||||||
} catch (MIException e) {
|
} catch (MIException e) {
|
||||||
throw new CDIException(e.getMessage());
|
throw new MI2CDIException(e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// If the assign was succesfull fire a MIChangedEvent() via refresh.
|
// If the assign was succesfull fire a MIChangedEvent() via refresh.
|
||||||
|
|
|
@ -130,7 +130,7 @@ public class MemoryManager extends SessionObject implements ICDIMemoryManager {
|
||||||
}
|
}
|
||||||
return info;
|
return info;
|
||||||
} catch (MIException e) {
|
} 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) {
|
} catch (MIException e) {
|
||||||
throw new CDIException(e.getMessage());
|
throw new MI2CDIException(e);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
String u = getUniqName();
|
String u = getUniqName();
|
||||||
|
@ -214,7 +214,7 @@ public class Register extends CObject implements ICDIRegister, ICDIValue {
|
||||||
throw new CDIException("No answer");
|
throw new CDIException("No answer");
|
||||||
}
|
}
|
||||||
} catch (MIException e) {
|
} catch (MIException e) {
|
||||||
throw new CDIException(e.getMessage());
|
throw new MI2CDIException(e);
|
||||||
}
|
}
|
||||||
// If the assign was succesfull fire a MIRegisterChangedEvent()
|
// If the assign was succesfull fire a MIRegisterChangedEvent()
|
||||||
MIRegisterChangedEvent change = new MIRegisterChangedEvent(registers.getToken(),
|
MIRegisterChangedEvent change = new MIRegisterChangedEvent(registers.getToken(),
|
||||||
|
|
|
@ -52,7 +52,7 @@ public class RegisterManager extends SessionObject {
|
||||||
}
|
}
|
||||||
return regs;
|
return regs;
|
||||||
} catch (MIException e) {
|
} 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]);
|
MIEvent[] events = (MIEvent[])eventList.toArray(new MIEvent[0]);
|
||||||
mi.fireEvents(events);
|
mi.fireEvents(events);
|
||||||
} catch (MIException e) {
|
} 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;
|
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 {
|
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;
|
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 {
|
public class Value extends CObject implements ICDIValue {
|
||||||
|
|
||||||
|
@ -120,7 +114,7 @@ public class Value extends CObject implements ICDIValue {
|
||||||
|
|
||||||
}
|
}
|
||||||
} catch (MIException e) {
|
} catch (MIException e) {
|
||||||
throw new CDIException(e.getMessage());
|
throw new MI2CDIException(e);
|
||||||
}
|
}
|
||||||
return variables;
|
return variables;
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,7 +20,6 @@ import org.eclipse.cdt.debug.mi.core.output.MIVar;
|
||||||
import org.eclipse.cdt.debug.mi.core.output.MIVarShowAttributesInfo;
|
import org.eclipse.cdt.debug.mi.core.output.MIVarShowAttributesInfo;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author alain
|
|
||||||
*/
|
*/
|
||||||
public class Variable extends CObject implements ICDIVariable {
|
public class Variable extends CObject implements ICDIVariable {
|
||||||
|
|
||||||
|
@ -89,7 +88,7 @@ public class Variable extends CObject implements ICDIVariable {
|
||||||
throw new CDIException("No answer");
|
throw new CDIException("No answer");
|
||||||
}
|
}
|
||||||
} catch (MIException e) {
|
} catch (MIException e) {
|
||||||
throw new CDIException(e.getMessage());
|
throw new MI2CDIException(e);
|
||||||
}
|
}
|
||||||
|
|
||||||
// If the assign was succesfull fire a MIVarChangedEvent()
|
// If the assign was succesfull fire a MIVarChangedEvent()
|
||||||
|
@ -112,7 +111,7 @@ public class Variable extends CObject implements ICDIVariable {
|
||||||
}
|
}
|
||||||
return info.isEditable();
|
return info.isEditable();
|
||||||
} catch (MIException e) {
|
} 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");
|
throw new CDIException("No answer");
|
||||||
}
|
}
|
||||||
} catch (MIException e) {
|
} 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]);
|
MIEvent[] events = (MIEvent[])eventList.toArray(new MIEvent[0]);
|
||||||
mi.fireEvents(events);
|
mi.fireEvents(events);
|
||||||
} catch (MIException e) {
|
} 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.name = name;
|
||||||
element.stackframe = stack;
|
element.stackframe = stack;
|
||||||
} catch (MIException e) {
|
} catch (MIException e) {
|
||||||
throw new CDIException(e.getMessage());
|
throw new MI2CDIException(e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return element;
|
return element;
|
||||||
|
@ -163,7 +163,7 @@ public class VariableManager extends SessionObject implements ICDIExpressionMana
|
||||||
mi.postCommand(var);
|
mi.postCommand(var);
|
||||||
var.getMIInfo();
|
var.getMIInfo();
|
||||||
} catch (MIException e) {
|
} 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;
|
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 {
|
public class Watchpoint extends Breakpoint implements ICDIWatchpoint {
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue