public LocalsStore(DebuggerService debuggerService, Interpreter interpreter) { this.debuggerService = debuggerService; this.interpreter = interpreter; this.rootVariable = new LocalVariablesRoot(interpreter); this.RootNode.SetValue(ColumnUpdateChilds, true); }
public EmonicLineInterpreter(DebuggerConfiguration config, DebuggerOptions options) { if (options.HasDebugFlags) Report.Initialize (options.DebugOutput, options.DebugFlags); else Report.Initialize (); interpreter = new EmonicInterpreter (config, options); engine = interpreter.DebuggerEngine; parser = new LineParser (engine); main_thread = new ST.Thread (new System.Threading.ThreadStart(main_thread_main)); main_thread.IsBackground = true; command_thread = new ST.Thread (new ST.ThreadStart (command_thread_main)); command_thread.IsBackground = true; }
internal CommandLineInterpreter(DebuggerOptions options, bool is_interactive) { if (options.HasDebugFlags) Report.Initialize (options.DebugOutput, options.DebugFlags); else Report.Initialize (); Configuration = new DebuggerConfiguration (); #if HAVE_XSP if (options.StartXSP) Configuration.SetupXSP (); else Configuration.LoadConfiguration (); #else Configuration.LoadConfiguration (); #endif Configuration.SetupCLI (); interpreter = new Interpreter (is_interactive, Configuration, options); interpreter.CLI = this; engine = interpreter.DebuggerEngine; parser = new LineParser (engine); if (!interpreter.IsScript) { line_editor = new LineEditor ("mdb"); line_editor.AutoCompleteEvent += delegate (string text, int pos) { return engine.Completer.Complete (text, pos); }; Console.CancelKeyPress += control_c_event; } interrupt_event = new ST.AutoResetEvent (false); nested_break_state_event = new ST.AutoResetEvent (false); main_loop_stack = new Stack<MainLoop> (); main_loop_stack.Push (new MainLoop (interpreter)); main_thread = new ST.Thread (new ST.ThreadStart (main_thread_main)); main_thread.IsBackground = true; }
public CommandLineInterpreter(Interpreter interpreter) { this.interpreter = interpreter; this.engine = interpreter.DebuggerEngine; interpreter.CLI = this; parser = new LineParser (engine); interrupt_event = new ST.AutoResetEvent (false); nested_break_state_event = new ST.AutoResetEvent (false); Console.CancelKeyPress += control_c_event; main_loop_stack = new Stack<MainLoop> (); main_loop_stack.Push (new MainLoop (interpreter)); main_thread = new ST.Thread (new ST.ThreadStart (main_thread_main)); main_thread.IsBackground = true; }
public override void TargetStopped(Interpreter interpreter, StackFrame frame, AssemblerLine current_insn) { if (frame != null) { if (!PrintSource (interpreter, frame)) native = true; interpreter.ShowDisplays (frame); } if (native && (current_insn != null)) interpreter.PrintInstruction (current_insn); }
public ProcessEventSink(Interpreter interpreter, Process process) { this.interpreter = interpreter; process.TargetOutputEvent += target_output; }
public StyleEmacs(Interpreter interpreter) : base(interpreter) { }
protected bool PrintSource(Interpreter interpreter, StackFrame frame) { SourceAddress location = frame.SourceAddress; if (location == null) return false; SourceBuffer buffer; if (location.SourceFile != null) { string filename = location.SourceFile.FileName; buffer = interpreter.SourceFileFactory.FindFile (filename); } else buffer = location.SourceBuffer; if ((buffer == null) || (buffer.Contents == null) || (location.Row == 0)) return false; string line = buffer.Contents [location.Row - 1]; interpreter.Print (String.Format ("{0,4} {1}", location.Row, line)); return true; }
public abstract void TargetStopped(Interpreter interpreter, StackFrame frame, AssemblerLine current_insn);
public ThreadsStore(DebuggerService debuggerService, Interpreter interpreter) { this.debuggerService = debuggerService; this.interpreter = interpreter; }
public Engine(Interpreter interpreter) { this.Interpreter = interpreter; Completer = new Completer (this); }
public CallstackStore(DebuggerService debuggerService, Interpreter interpreter) { this.debuggerService = debuggerService; this.interpreter = interpreter; }
public MainLoop(Interpreter interpreter) { this.Interpreter = interpreter; command_event = new ST.ManualResetEvent (false); completed_event = new ST.ManualResetEvent (false); command_thread = new ST.Thread (new ST.ThreadStart (command_thread_main)); command_thread.Start (); }
public override void UnhandledException(Interpreter interpreter, StackFrame frame, AssemblerLine insn) { TargetStopped (interpreter, frame, insn); }
public static TargetClassObject CheckTypeProxy(Interpreter interpreter, Thread thread, TargetStructObject obj) { if (obj.Type.DebuggerTypeProxyAttribute == null) return null; ScriptingContext expr_context = new ScriptingContext (interpreter); expr_context.CurrentThread = thread; expr_context.CurrentLanguage = obj.Type.Language; expr_context.ImplicitInstance = obj; return expr_context.CheckTypeProxy (obj); }
protected StyleBase(Interpreter interpreter) { this.interpreter = interpreter; }
public static EE.EvaluationResult HandleDebuggerDisplay(Interpreter interpreter, Thread thread, TargetStructObject instance, DebuggerDisplayAttribute attr, int timeout, out string name, out string type) { ScriptingContext expr_context = new ScriptingContext (interpreter); expr_context.CurrentThread = thread; expr_context.CurrentLanguage = instance.Type.Language; expr_context.ImplicitInstance = instance; EE.EvaluationResult result = expr_context.HandleDebuggerDisplay ( thread, instance, attr.Value, timeout, out name); if (result != EE.EvaluationResult.Ok) { type = null; return result; } if (String.IsNullOrEmpty (attr.Type)) { type = null; return EE.EvaluationResult.Ok; } return expr_context.HandleDebuggerDisplay ( thread, instance, attr.Type, timeout, out type); }
public abstract void UnhandledException(Interpreter interpreter, StackFrame frame, AssemblerLine current_insn);
public ScriptingContext(Interpreter interpreter) { this.interpreter = interpreter; }
public StyleCLI(Interpreter interpreter) : base(interpreter) { }
public BreakpointsStore(DebuggerService debuggerService, Interpreter interpreter) { this.debuggerService = debuggerService; this.interpreter = interpreter; }
public override void TargetStopped(Interpreter interpreter, StackFrame frame, AssemblerLine current_insn) { if (frame == null) return; if (frame != null && frame.SourceAddress != null) Console.WriteLine ("\x1A\x1A{0}:{1}:beg:{2}", frame.SourceAddress.Name, "55" /* XXX */, "0x80594d8" /* XXX */); }
private DebuggerService(string[] args) { mono_debugger_server_static_init (); bool is_interactive = true; DebuggerConfiguration config = new DebuggerConfiguration (); config.LoadConfiguration (); DebuggerOptions options = DebuggerOptions.ParseCommandLine (args); if (options.HasDebugFlags) Report.Initialize (options.DebugOutput, options.DebugFlags); else Report.Initialize (); // Redirect the Reporter output stream HACK: Using reflection reporterOutput = new MemoryStream(); FieldInfo writerField = typeof(ReportWriter).GetField("writer", BindingFlags.NonPublic | BindingFlags.Instance); StreamWriter writer = new StreamWriter(reporterOutput); writer.AutoFlush = true; writerField.SetValue(Report.ReportWriter, writer); // Redirect the console //Console.SetOut(writer); //Console.SetError(writer); interpreter = new GuiInterpreter(this, is_interactive, config, options); engine = interpreter.DebuggerEngine; parser = new LineParser (engine); this.breakpointsStore = new BreakpointsStore(this, interpreter); this.callstackStore = new CallstackStore(this, interpreter); this.localsStore = new LocalsStore(this, interpreter); this.threadsStore = new ThreadsStore(this, interpreter); if (interpreter.Options.StartTarget) { interpreter.Start (); } NotifyStateChange(); }
public InterpreterEventSink(Interpreter interpreter, Debugger debugger) { this.interpreter = interpreter; debugger.TargetExitedEvent += target_exited; debugger.ThreadCreatedEvent += thread_created; debugger.ManagedThreadCreatedEvent += managed_thread_created; debugger.ThreadExitedEvent += thread_exited; debugger.MainProcessCreatedEvent += main_process_created; debugger.ProcessReachedMainEvent += process_reached_main; debugger.ProcessCreatedEvent += process_created; debugger.ProcessExitedEvent += process_exited; debugger.ProcessExecdEvent += process_execd; debugger.TargetEvent += target_event; debugger.EnterNestedBreakStateEvent += delegate (Debugger unused, Thread thread) { interpreter.OnEnterNestedBreakState (thread); }; debugger.LeaveNestedBreakStateEvent += delegate (Debugger unused, Thread thread) { interpreter.OnLeaveNestedBreakState (thread); }; }
internal ExpressionParser(Interpreter interpreter) { this.Interpreter = interpreter; parser = new CSharp.ExpressionParser ("C#"); }