public static MondValue JsonCallStackEntry(MondDebugContext.CallStackEntry callStackEntry) { var obj = new MondValue(MondValueType.Object); obj["FileName"] = callStackEntry.FileName; obj["Function"] = callStackEntry.Function; obj["LineNumber"] = callStackEntry.LineNumber; obj["ColumnNumber"] = callStackEntry.ColumnNumber; return obj; }
public void Refresh(MondDebugContext context) { if (context == null) { _value = null; return; } try { var result = context.Evaluate(Expression); _value = result.Serialize(); } catch (Exception e) { _value = e.Message; } }
// ------------------------------- internal MondDebugAction Break(MondDebugContext context, int address /* TODO */) { return OnBreak(context, address); }
/// <summary> /// Called when the VM breaks. This should block until an action should be taken. /// </summary> /// <returns>The action the VM should continue with.</returns> protected abstract MondDebugAction OnBreak(MondDebugContext context, int address /* TODO */);
private void DebuggerBreak(MondProgram program, Frame locals, Frame args, int address, int initialCallDepth) { var context = new MondDebugContext( _state, program, address, locals, args, _callStack, _callStackSize, initialCallDepth); _debugAction = Debugger.Break(context, address); _debugAlign = false; _debugDepth = 0; }
// ------------------------------- internal MondDebugAction Break(MondDebugContext context, int address /* TODO */) { return(OnBreak(context, address)); }