SetupCLI() public method

public SetupCLI ( ) : void
return void
示例#1
0
文件: Main.cs 项目: baulig/debugger
        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;
        }
示例#2
0
        protected DebuggerTestFixture(string exe_file, string src_file, params string[] args)
        {
            ExeFileName = Path.GetFullPath (Path.Combine (BuildDirectory, exe_file));
            FileName = Path.GetFullPath (Path.Combine (SourceDirectory, src_file));

            config = new DebuggerConfiguration ();
            config.RedirectOutput = true;

            config.SetupCLI ();

            options = CreateOptions (ExeFileName, args);

            inferior_stdout = new LineReader ();
            inferior_stderr = new LineReader ();
        }