Example #1
0
 // Called by MDbgBreakpoint after it has set the Number property.
 internal void FireAddBreakpointEvent(MDbgBreakpoint breakpoint)
 {
     if (AddBreakpoint != null)
     {
         AddBreakpoint(this, new BreakpointCollectionChangedEventArgs(breakpoint));
     }
 }
Example #2
0
 /// <summary>
 /// Fire the ChangedBreakpoint event for the given breakpoint.
 /// </summary>
 /// <param name="breakpoint">Breakpoint that has changed</param>
 internal void NotifyChanged(MDbgBreakpoint breakpoint)
 {
     if (ChangedBreakpoint != null)
     {
         ChangedBreakpoint(this, new BreakpointCollectionChangedEventArgs(breakpoint));
     }
 }
Example #3
0
        internal void UnRegister(MDbgBreakpoint breakpoint)
        {
            Debug.Assert(breakpoint != null);
            m_items.Remove(breakpoint);

            if (RemoveBreakpoint != null)
            {
                RemoveBreakpoint(this, new BreakpointCollectionChangedEventArgs(breakpoint));
            }
        }
Example #4
0
        internal int Register(MDbgBreakpoint breakpoint)
        {
            Debug.Assert(breakpoint != null);
            m_items.Add(breakpoint);

            // At this point, derived properties have not yet been set.
            // Let MDbgBreakpoint do a little more initialization and then it will fire the Add
            // event via calling FireAddBreakpointEvent

            return(m_freeBreakpointNumber++);
        }
Example #5
0
        internal void UnRegister(MDbgBreakpoint breakpoint)
        {
            Debug.Assert(breakpoint != null);
            m_items.Remove(breakpoint);

            if (RemoveBreakpoint != null)
            {
                RemoveBreakpoint(this, new BreakpointCollectionChangedEventArgs(breakpoint));
            }
        }
Example #6
0
        internal int Register(MDbgBreakpoint breakpoint)
        {
            Debug.Assert(breakpoint != null);
            m_items.Add(breakpoint);

            // At this point, derived properties have not yet been set.
            // Let MDbgBreakpoint do a little more initialization and then it will fire the Add
            // event via calling FireAddBreakpointEvent

            return m_freeBreakpointNumber++;
        }
Example #7
0
 /// <summary>
 /// Fire the ChangedBreakpoint event for the given breakpoint.
 /// </summary>
 /// <param name="breakpoint">Breakpoint that has changed</param>
 internal void NotifyChanged(MDbgBreakpoint breakpoint)
 {
     if (ChangedBreakpoint != null)
     {
         ChangedBreakpoint(this, new BreakpointCollectionChangedEventArgs(breakpoint));
     }
 }
Example #8
0
 // Called by MDbgBreakpoint after it has set the Number property.
 internal void FireAddBreakpointEvent(MDbgBreakpoint breakpoint)
 {
     if (AddBreakpoint != null)
     {
         AddBreakpoint(this, new BreakpointCollectionChangedEventArgs(breakpoint));
     }
 }
Example #9
0
 internal BreakpointCollectionChangedEventArgs(MDbgBreakpoint breakpoint)
 {
     m_breakpoint = breakpoint;
 }
Example #10
0
 /// <summary>
 /// Create a new instance of the BreakpointHitStopReason class.
 /// </summary>
 /// <param name="breakpoint">The breakpoint that has been hit.</param>
 public BreakpointHitStopReason(MDbgBreakpoint breakpoint)
 {
     Debug.Assert(breakpoint != null);
     m_breakpoint = breakpoint;
 }
Example #11
0
 public BreakpointPair(MDbgBreakpoint bp, int iLine)
 {
     m_bp = bp;
     m_iLine = iLine;
 }
Example #12
0
 internal BreakpointCollectionChangedEventArgs(MDbgBreakpoint breakpoint)
 {
     m_breakpoint = breakpoint;
 }
Example #13
0
 /// <summary>
 /// Create a new instance of the BreakpointHitStopReason class.
 /// </summary>
 /// <param name="breakpoint">The breakpoint that has been hit.</param>
 public BreakpointHitStopReason(MDbgBreakpoint breakpoint)
 {
     Debug.Assert(breakpoint != null);
     m_breakpoint = breakpoint;
 }
Example #14
0
        private bool SetUserEntryBreakpointInModule(MDbgModule m)
        {
            bool ok = true;
            if (m.SymReader != null)
            {
                int st = 0;
                st = m.SymReader.UserEntryPoint.GetToken();
                if (st != 0)
                {
                    MDbgFunction mfunc = m.GetFunction(st);
                    m_userEntryBreakpoint = new UserEntryBreakpoint(this, mfunc);
                    ok = m_userEntryBreakpoint.BindToModule(m);

                    // Issue a warning if we failed to set the user entry breakpoint.
                    if (!ok)
                    {
                        Trace.WriteLine(string.Format("Failed to set user entry breakpoint at {0}", mfunc.FullName));
                    }

                    // now we cannot call BindBreakpoints again otherwise userEntrBreakpoint will be bound
                    // twice
                }

                // We explicitly don't set JMC. An extension can hook up to this module and set JMC policy if it wants.

            }
            return ok;
        }
Example #15
0
        // Cleans up the process's resources. This may be called on any thread (including callback threads).
        private void CleanAfterProcessExit()
        {
            lock (this)
            {
                // synchronize with ReallyContinue
                m_userEntryBreakpoint = null;

                m_threadMgr.Clear();
                m_breakpointMgr.Clear();

                m_moduleMgr.Dispose();

                if (m_corProcess != null)
                {
                    m_corProcess.Dispose();
                    m_corProcess = null;
                    m_isAlive = false;
                }

                m_engine.Processes.DeleteProcess(this);
            }
        }
Example #16
0
 // Update process's state that to let them know we've hit this we've hit.
 internal void OnUserEntryBreakpointHit()
 {
     m_userEntryBreakpoint.Delete();
     m_userEntryBreakpointEnabled = false;
     m_userEntryBreakpoint = null;
 }