void Cleanup()
        {
            if (!IsDebugging)
                return;

            if (StoppedEvent != null)
                StoppedEvent (this, new EventArgs ());

            backend.Dispose ();
            backend = null;
            console.Dispose ();
            console = null;
            #if NET_2_0
            attr_handler = null;
            #endif
            proc = null;

            if (ExecutionLocationChanged != null)
                ExecutionLocationChanged (this, EventArgs.Empty);
        }
        public void Run(IConsole console, string[] argv)
        {
            if (IsDebugging)
                return;

            #if NET_2_0
            AttributeHandler.Rescan();
            #endif
            this.console = console;

            backend = new DebuggerBackend ();
            backend.ThreadManager.InitializedEvent += new ThreadEventHandler (initialized_event);
            backend.ThreadManager.ThreadCreatedEvent += new ThreadEventHandler (thread_created);
            backend.ThreadManager.ThreadExitedEvent += new ThreadEventHandler (thread_exited);
            backend.Run (new ProcessStart (null, argv));

            console.CancelRequested += new EventHandler (OnCancelRequested);
        }