Example #1
0
 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;
 }
Example #2
0
        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;
            }
        }
Example #3
0
 // -------------------------------
 internal MondDebugAction Break(MondDebugContext context, int address /* TODO */)
 {
     return OnBreak(context, address);
 }
Example #4
0
 /// <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 */);
Example #5
0
        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;
        }
Example #6
0
 /// <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 */);
Example #7
0
        // -------------------------------

        internal MondDebugAction Break(MondDebugContext context, int address /* TODO */)
        {
            return(OnBreak(context, address));
        }