XPRMDebugger
-
public interface XPRMDebugger
Interface used to implement a model debugger.
-
-
Field Summary
Modifier and Type Field and Description static XPRMLocation
DBG_CONT
Return code to continue execution.static XPRMLocation
DBG_NEXT
Return code to continue up to the next statement.static XPRMLocation
DBG_STEP
Return code to continue up to the next statement stepping into function calls.static XPRMLocation
DBG_STOP
Return code to stop execution.
-
Method Summary
Modifier and Type Method and Description XPRMLocation
debug(int vmstat, XPRMLocation loc)
Debugger entry point.
-
-
-
Field Detail
-
DBG_STOP
static final XPRMLocation DBG_STOP
Return code to stop execution.
-
DBG_NEXT
static final XPRMLocation DBG_NEXT
Return code to continue up to the next statement.
-
DBG_STEP
static final XPRMLocation DBG_STEP
Return code to continue up to the next statement stepping into function calls.
-
DBG_CONT
static final XPRMLocation DBG_CONT
Return code to continue execution.
-
-
Method Detail
-
debug
XPRMLocation debug(int vmstat, XPRMLocation loc)
Debugger entry point. This function is called by Mosel whenever execution of the model is interrupted. From there, breakpoints can be managed (XPRMModel.setBreakpoint(com.dashoptimization.XPRMLocation)
,XPRMModel.clearBreakpoint(com.dashoptimization.XPRMLocation)
,XPRMModel.clearAllBreakpoints()
) and the model may be inspected (XPRMModel.findIdentifier(java.lang.String)
,XPRMModel.setStackFrame(int)
). The return value indicates whether execution should resume and when next interruption should happen.- Parameters:
-
vmstat
- execution status. In this context the status may take valueXPRMModel.RT_BREAK
if interruption is due to a breakpoint and valueXPRMModel.RT_NIFCT
if the program was executing a native function when interruption occurred. -
loc
- location in the model corresponding to the statement being executed (asynchronous interruption) or to be executed (breakpoint). - Returns:
- The location where the execution should be stopped next or one of the following special values:
-
-