internal void UnRegister(CorDebug.CorThread t)
 {
     m_items.Remove(t.Id);
     if (m_active != null &&
         m_active.CorThread.Id == t.Id)
     {
         m_active = null;
     }
 }
Exemple #2
0
        public ExceptionUnwindStopReason(CorDebug.CorAppDomain appDomain, CorDebug.CorThread thread,
                                         CorDebugExceptionUnwindCallbackType eventType, int flags)

        {
            m_appDomain = appDomain;
            m_thread    = thread;
            m_eventtype = eventType;
            m_flags     = flags;
        }
 internal void Register(CorDebug.CorThread t)
 {
     // Prevent double-registration. This may happen if we pick up a CorThread
     // via enumeration before the CreateThread callback.
     if (!m_items.Contains(t.Id))
     {
         m_items.Add(t.Id, new MDbgThread(this, t, m_freeThreadNumber++));
     }
 }
Exemple #4
0
 public ExceptionThrownStopReason(CorDebug.CorAppDomain appDomain, CorDebug.CorThread thread, CorDebug.CorFrame frame,
                                  int offset, CorDebugExceptionCallbackType eventType, int flags)
 {
     m_appDomain = appDomain;
     m_thread    = thread;
     m_frame     = frame;
     m_offset    = offset;
     m_eventtype = eventType;
     m_flags     = flags;
 }
Exemple #5
0
 /// <summary>
 /// Create a new instance of the FunctionRemapCompleteStopReason class.
 /// </summary>
 /// <param name="appDomain">The appDomain where remapping is occuring.</param>
 /// <param name="thread">The thread on which the remapping is occuring.</param>
 /// <param name="managedFunction">The version of function the debugger remapped to.</param>
 public FunctionRemapCompleteStopReason(CorDebug.CorAppDomain appDomain,
                                        CorDebug.CorThread thread,
                                        CorDebug.CorFunction managedFunction)
 {
     Debug.Assert(appDomain != null);
     Debug.Assert(thread != null);
     Debug.Assert(managedFunction != null);
     m_appDomain = appDomain;
     m_thread    = thread;
     m_function  = managedFunction;
 }
 internal void SetActiveThread(CorDebug.CorThread thread)
 {
     if (thread == null)
     {
         m_active = null;
     }
     else
     {
         m_active = GetThreadFromThreadId(thread.Id);
     }
     lock (m_process)
     {
         m_frameFactory.InvalidateStackWalkers(); // @TODO can this line be removed???
     }
 }
Exemple #7
0
 public RemapOpportunityReachedStopReason(CorDebug.CorAppDomain appDomain,
                                          CorDebug.CorThread thread,
                                          CorDebug.CorFunction oldFunction,
                                          CorDebug.CorFunction newFunction,
                                          int oldILOffset)
 {
     Debug.Assert(appDomain != null);
     Debug.Assert(thread != null);
     Debug.Assert(oldFunction != null);
     Debug.Assert(newFunction != null);
     m_appDomain   = appDomain;
     m_thread      = thread;
     m_oldFunction = oldFunction;
     m_newFunction = newFunction;
     m_oldILOffset = oldILOffset;
 }
        /// <summary>
        /// Gets the MDbgThread with the given ThreadId.
        /// </summary>
        /// <param name="threadId">The ThreadId to look up.</param>
        /// <returns>The MDbgThread.</returns>
        public MDbgThread GetThreadFromThreadId(int threadId)
        {
            // This sometimes fails because we're looking for a thread don't recognize.
            // Need to offer lazy create semantics here.
            var te = (MDbgThread)m_items[threadId];

            if (te == null)
            {
                CorDebug.CorThread t = m_process.CorProcess.GetThread(threadId);
                if (t != null)
                {
                    Register(t);
                    te = (MDbgThread)m_items[threadId];
                }
            }
            return(te);
        }
Exemple #9
0
 /// <summary>
 /// Create a new instance of the FunctionRemapCompleteStopReason class.
 /// </summary>
 /// <param name="appDomain">The appDomain where remapping is occuring.</param>
 /// <param name="thread">The thread on which the remapping is occuring.</param>
 /// <param name="managedFunction">The version of function the debugger remapped to.</param>
 public FunctionRemapCompleteStopReason(CorDebug.CorAppDomain appDomain,
                                        CorDebug.CorThread thread,
                                        CorDebug.CorFunction managedFunction)
 {
     Debug.Assert(appDomain != null);
     Debug.Assert(thread != null);
     Debug.Assert(managedFunction != null);
     m_appDomain = appDomain;
     m_thread = thread;
     m_function = managedFunction;
 }
Exemple #10
0
 public RemapOpportunityReachedStopReason(CorDebug.CorAppDomain appDomain,
                                          CorDebug.CorThread thread,
                                          CorDebug.CorFunction oldFunction,
                                          CorDebug.CorFunction newFunction,
                                          int oldILOffset)
 {
     Debug.Assert(appDomain != null);
     Debug.Assert(thread != null);
     Debug.Assert(oldFunction != null);
     Debug.Assert(newFunction != null);
     m_appDomain = appDomain;
     m_thread = thread;
     m_oldFunction = oldFunction;
     m_newFunction = newFunction;
     m_oldILOffset = oldILOffset;
 }
Exemple #11
0
 public ExceptionThrownStopReason(CorDebug.CorAppDomain appDomain, CorDebug.CorThread thread, CorDebug.CorFrame frame,
                                  int offset, CorDebugExceptionCallbackType eventType, int flags,
                                  bool exceptionEnhancedOn)
 {
     m_appDomain = appDomain;
     m_thread = thread;
     m_frame = frame;
     m_offset = offset;
     m_eventtype = eventType;
     m_flags = flags;
     m_exceptionEnhancedOn = exceptionEnhancedOn;
 }
Exemple #12
0
        public ExceptionUnwindStopReason(CorDebug.CorAppDomain appDomain, CorDebug.CorThread thread,
                                         CorDebugExceptionUnwindCallbackType eventType, int flags)

        {
            m_appDomain = appDomain;
            m_thread = thread;
            m_eventtype = eventType;
            m_flags = flags;
        }
Exemple #13
0
 internal MDbgThread(MDbgThreadCollection threadCollection, CorDebug.CorThread thread, int threadNumber)
 {
     m_corThread = thread;
     m_threadNumber = threadNumber;
     m_threadMgr = threadCollection;
 }
Exemple #14
0
 public UnhandledExceptionThrownStopReason(CorDebug.CorAppDomain appDomain, CorDebug.CorThread thread, CorDebug.CorFrame frame,
                                           int offset, CorDebugExceptionCallbackType eventType, int flags)
     : base(appDomain, thread, frame, offset, eventType, flags)
 {
 }
 /// <summary>
 /// Lookup a MDbgThread using a CorThread.
 /// </summary>
 /// <param name="thread">The CorThread to use.</param>
 /// <returns>The rusulting MDbgThread with the same ID.</returns>
 public MDbgThread Lookup(CorDebug.CorThread thread)
 {
     return(GetThreadFromThreadId(thread.Id));
 }
 internal MDbgThread(MDbgThreadCollection threadCollection, CorDebug.CorThread thread, int threadNumber)
 {
     m_corThread    = thread;
     m_threadNumber = threadNumber;
     m_threadMgr    = threadCollection;
 }