コード例 #1
0
        public void Dispose()
        {
            if (_session == null)
            {
                return;
            }

            lock (_lock)
            {
                _session.Dispose();
                _session = null;
            }
        }
コード例 #2
0
        // Token: 0x06000005 RID: 5 RVA: 0x00002144 File Offset: 0x00000344
        private void ConfigureSession(SoftDebuggerSession debuggerSession, IProgress <string> progress)
        {
            debuggerSession.TargetExited += delegate(object s, TargetEventArgs e)
            {
                debuggerSession.Dispose();
            };
            debuggerSession.OutputWriter = delegate(bool is_stderr, string text)
            {
                if (progress != null && text.Trim(new char[]
                {
                    '\n',
                    ''
                }).Length > 0)
                {
                    progress.Report(text.TrimEnd(new char[]
                    {
                        '\n'
                    }));
                }
            };
            SoftDebuggerSession softDebuggerSession = debuggerSession;

            softDebuggerSession.ExceptionHandler = (ExceptionHandler)Delegate.Combine(softDebuggerSession.ExceptionHandler, new ExceptionHandler(delegate(Exception e)
            {
                progress.Report(e.Message);
                DebuggerSession.tracer.Error(e);
                return(true);
            }));
            debuggerSession.LogWriter = debuggerSession.OutputWriter;
        }
コード例 #3
0
        public static void Kill()
        {
            lock (_lock)
            {
                if (_session == null)
                {
                    return;
                }

                CommandLine.InferiorExecuting = true;

                if (!_session.HasExited)
                {
                    _session.Exit();
                }

                _session.Dispose();
                _session = null;
            }
        }
コード例 #4
0
        void DebuggerKill()
        {
            lock (m_Lock) {
                if (m_Session != null)
                {
                    m_DebuggeeExecuting = true;

                    if (!m_Session.HasExited)
                    {
                        m_Session.Exit();
                    }

                    m_Session.Dispose();
                    m_Session = null;
                }
            }
        }