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; }
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 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 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; }
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 virtual void SetUp() { interpreter = new NUnitInterpreter ( config, options, inferior_stdout, inferior_stderr); engine = interpreter.DebuggerEngine; parser = new LineParser (engine); ReadSourceFile (); }