SetupCLI() public méthode

public SetupCLI ( ) : void
Résultat void
Exemple #1
0
        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;
        }
        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 ();
        }