Inheritance: CorAppDomainBaseEventArgs
コード例 #1
0
ファイル: ProcessInfo.cs プロジェクト: artisticcheese/MSE
 /// <summary>
 /// Event handler for when a thread of the process exits
 /// </summary>
 /// <param name="sender">The source of the event.</param>
 /// <param name="e">An EventArgs that contains no event data.</param>
 private void ExitThreadEventHandler(object sender, CorThreadEventArgs e)
 {
 }
コード例 #2
0
		void OnCreateThread (object sender, CorThreadEventArgs e)
		{
			OnDebuggerOutput (false, string.Format ("Started Thread {0}\n", e.Thread.Id));
			e.Continue = true;
		}
コード例 #3
0
ファイル: ProcessInfo.cs プロジェクト: artisticcheese/MSE
 /// <summary>
 /// Event Handler for the creation of the Debugee's threads
 /// </summary>
 /// <param name="sender">The source of the event.</param>
 /// <param name="e">An EventArgs that contains no event data.</param>
 private void CreateThreadEventHandler(object sender, CorThreadEventArgs e)
 {
     if (!e.Thread.Process.HasQueuedCallbacks(null))
     {
         e.Continue = false;
         SignalAttachedProcess();
     }
     else
     {
         e.Continue = true;
     }
 }
コード例 #4
0
		void OnBreak (object sender, CorThreadEventArgs e)
		{
			lock (debugLock) {
				if (evaluating) {
					e.Continue = true;
					return;
				}
			}
			OnStopped ();
			e.Continue = false;
			SetActiveThread (e.Thread);
			TargetEventArgs args = new TargetEventArgs (TargetEventType.TargetInterrupted);
			args.Process = GetProcess (process);
			args.Thread = GetThread (e.Thread);
			args.Backtrace = new Backtrace (new CorBacktrace (e.Thread, this));
			OnTargetEvent (args);
		}
コード例 #5
0
		void OnThreadExit (object sender, CorThreadEventArgs e)
		{
			lock (threads) {
				threads.Remove (e.Thread.Id);
			}
		}
コード例 #6
0
		void OnNameChange (object sender, CorThreadEventArgs e)
		{
		}
コード例 #7
0
ファイル: Process.cs プロジェクト: EbinJohn/BigBrother
 private void NameChangeEventHandler(Object sender, CorThreadEventArgs e)
 {
     Trace.WriteLine("ManagedCallback::NameChange");
     BeginManagedDebugEvent();
     try
     {
         if (InternalHandleRawMode(ManagedCallbackType.OnNameChange, e))
             return;
     }
     finally
     {
         EndManagedDebugEvent(e);
     }
 }
コード例 #8
0
ファイル: Process.cs プロジェクト: EbinJohn/BigBrother
        private void ExitThreadEventHandler(Object sender, CorThreadEventArgs e)
        {
            Trace.WriteLine("ManagedCallback::ExitThread");
            BeginManagedDebugEvent();
            try
            {
                m_threadMgr.UnRegister(e.Thread);

                if (InternalHandleRawMode(ManagedCallbackType.OnThreadExit, e))
                    return;

                if (HandleCustomPostCallback(ManagedCallbackType.OnThreadExit, e))
                    return;
            }
            finally
            {
                EndManagedDebugEvent(e);
            }
        }
コード例 #9
0
ファイル: Process.cs プロジェクト: EbinJohn/BigBrother
        private void CreateThreadEventHandler(Object sender, CorThreadEventArgs e)
        {
            Trace.WriteLine("ManagedCallback::CreateThread");
            BeginManagedDebugEvent();
            try
            {
                m_threadMgr.Register(e.Thread);

                if (InternalHandleRawMode(ManagedCallbackType.OnCreateThread, e))
                    return;

                if (m_engine.Options.StopOnNewThread)
                {
                    e.Continue = false;
                    InternalSignalRuntimeIsStopped(e.Thread,
                                                   new ThreadCreatedStopReason(Threads.GetThreadFromThreadId(e.Thread.Id))
                                                   );
                    return;
                }

                if (HandleCustomPostCallback(ManagedCallbackType.OnCreateThread, e))
                    return;

                if (m_processAttaching)
                {
                    // ICorDebug has "fake" debug events on attach. However, it does not have an "AttachComplete" to
                    // let us know when the attach is done and we're now getting "real" debug event.
                    // So MDbg simulates an "attach complete" event, which will come after all the CreateThread events have
                    // been dispatched. If multiple CreateThreads come in a single callback queue, then drain the entire
                    // queue. In other words, don't send the AttachComplete until after the queue has been drained.
                    if (!this.CorProcess.HasQueuedCallbacks(null))
                    {
                        if (!m_threadMgr.HaveActive)
                        {
                            m_threadMgr.SetActiveThread(e.Thread);
                        }
                        InternalSignalRuntimeIsStopped(e.Thread, new AttachCompleteStopReason());
                        e.Continue = false;
                    }
                }
            }
            finally
            {
                EndManagedDebugEvent(e);
            }
        }
コード例 #10
0
ファイル: Process.cs プロジェクト: EbinJohn/BigBrother
        private void BreakEventHandler(Object sender, CorThreadEventArgs e)
        {
            Trace.WriteLine("ManagedCallback::Break");
            BeginManagedDebugEvent();
            try
            {
                if (InternalHandleRawMode(ManagedCallbackType.OnBreak, e))
                    return;

                if (HandleCustomPostCallback(ManagedCallbackType.OnBreak, e))
                    return;

                e.Continue = false;
                InternalSignalRuntimeIsStopped(e.Thread, new UserBreakStopReason());
            }
            finally
            {
                EndManagedDebugEvent(e);
            }
        }