Example #1
0
 int IDebugBreakpointBoundEvent2.EnumBoundBreakpoints(out IEnumDebugBoundBreakpoints2 ppEnum)
 {
     IDebugBoundBreakpoint2[] boundBreakpoints = new IDebugBoundBreakpoint2[1];
     boundBreakpoints[0] = _boundBreakpoint;
     ppEnum = new AD7BoundBreakpointsEnum(boundBreakpoints);
     return Constants.S_OK;
 }
Example #2
0
 int IDebugBreakpointBoundEvent2.EnumBoundBreakpoints(out IEnumDebugBoundBreakpoints2 ppEnum)
 {
     IDebugBoundBreakpoint2[] boundBreakpoints = new IDebugBoundBreakpoint2[1];
     boundBreakpoints[0] = m_boundBreakpoint;
     ppEnum = new AD7BoundBreakpointsEnum(boundBreakpoints);
     return(VSConstants.S_OK);
 }
Example #3
0
 public void OnBreakpoint(DebuggedThread thread, ReadOnlyCollection<object> clients, uint address)
 {
     // An engine that supports more advanced breakpoint features such as hit counts, conditions and filters
     // should notify each bound breakpoint that it has been hit and evaluate conditions here.
     // The sample engine does not support these features.
     var boundBreakpointsEnum = new AD7BoundBreakpointsEnum(clients.Select(c => (IDebugBoundBreakpoint2)c));
     Send(new AD7BreakpointEvent(boundBreakpointsEnum), thread.Client);
 }
Example #4
0
 // Enumerates all breakpoints bound from this pending breakpoint
 int IDebugPendingBreakpoint2.EnumBoundBreakpoints(out IEnumDebugBoundBreakpoints2 ppEnum)
 {
     lock (_boundBreakpoints)
     {
         IDebugBoundBreakpoint2[] boundBreakpoints = _boundBreakpoints.ToArray();
         ppEnum = new AD7BoundBreakpointsEnum(boundBreakpoints);
     }
     return(VSConstants.S_OK);
 }
Example #5
0
        public void OnBreakpoint(AD7Thread thread, IList <IDebugBoundBreakpoint2> clients)
        {
            var boundBreakpoints = new IDebugBoundBreakpoint2[clients.Count];
            int i = 0;

            foreach (var objCurrentBreakpoint in clients)
            {
                boundBreakpoints[i] = objCurrentBreakpoint;
                i++;
            }

            // An engine that supports more advanced breakpoint features such as hit counts, conditions and filters
            // should notify each bound breakpoint that it has been hit and evaluate conditions here.
            // The sample engine does not support these features.
            var boundBreakpointsEnum = new AD7BoundBreakpointsEnum(boundBreakpoints);
            var eventObject          = new AD7BreakpointEvent(boundBreakpointsEnum);

            Send(eventObject, AD7BreakpointEvent.IID, thread);
        }
Example #6
0
        public void OnBreakpoint(DebuggedThread thread, ReadOnlyCollection<object> clients)
        {
            IDebugBoundBreakpoint2[] boundBreakpoints = new IDebugBoundBreakpoint2[clients.Count];

            int i = 0;
            foreach (object objCurrentBreakpoint in clients)
            {
                boundBreakpoints[i] = (IDebugBoundBreakpoint2)objCurrentBreakpoint;
                i++;
            }

            // An engine that supports more advanced breakpoint features such as hit counts, conditions and filters
            // should notify each bound breakpoint that it has been hit and evaluate conditions here.
            // The sample engine does not support these features.

            AD7BoundBreakpointsEnum boundBreakpointsEnum = new AD7BoundBreakpointsEnum(boundBreakpoints);

            AD7BreakpointEvent eventObject = new AD7BreakpointEvent(boundBreakpointsEnum);

            AD7Thread ad7Thread = (AD7Thread)thread.Client;
            Send(eventObject, AD7BreakpointEvent.IID, ad7Thread);
        }
Example #7
0
        public void OnBreakpoint(DebuggedThread thread, ReadOnlyCollection <object> clients)
        {
            IDebugBoundBreakpoint2[] boundBreakpoints = new IDebugBoundBreakpoint2[clients.Count];

            int i = 0;

            foreach (object objCurrentBreakpoint in clients)
            {
                boundBreakpoints[i] = (IDebugBoundBreakpoint2)objCurrentBreakpoint;
                i++;
            }

            // An engine that supports more advanced breakpoint features such as hit counts, conditions and filters
            // should notify each bound breakpoint that it has been hit and evaluate conditions here.
            // The sample engine does not support these features.

            AD7BoundBreakpointsEnum boundBreakpointsEnum = new AD7BoundBreakpointsEnum(boundBreakpoints);

            AD7BreakpointEvent eventObject = new AD7BreakpointEvent(boundBreakpointsEnum);

            AD7Thread ad7Thread = (AD7Thread)thread.Client;

            Send(eventObject, AD7BreakpointEvent.IID, ad7Thread);
        }
 // Enumerates all breakpoints bound from this pending breakpoint
 int IDebugPendingBreakpoint2.EnumBoundBreakpoints(out IEnumDebugBoundBreakpoints2 ppEnum)
 {
     IDebugBoundBreakpoint2[] boundBreakpoints = _boundBreakpoints.ToArray();
     ppEnum = new AD7BoundBreakpointsEnum(boundBreakpoints);
     return VSConstants.S_OK;
 }
 // Enumerates all breakpoints bound from this pending breakpoint
 int IDebugPendingBreakpoint2.EnumBoundBreakpoints(out IEnumDebugBoundBreakpoints2 ppEnum)
 {
     lock (this)
         ppEnum = new AD7BoundBreakpointsEnum(m_boundBreakpoints.ToArray());
     return Constants.S_OK;
 }
 public int EnumBoundBreakpoints(out IEnumDebugBoundBreakpoints2 ppEnum)
 {
     ppEnum = new AD7BoundBreakpointsEnum(new[] { _boundBreakpoint });
     return(VSConstants.S_OK);
 }
        // Enumerates all breakpoints bound from this pending breakpoint
        int IDebugPendingBreakpoint2.EnumBoundBreakpoints(out IEnumDebugBoundBreakpoints2 ppEnum) {
            ppEnum = null;

            if (_breakpoint != null) {
                lock (_breakpoint) {
                    IDebugBoundBreakpoint2[] boundBreakpoints = _breakpoint.GetBindings()
                        .Select(binding => _bpManager.GetBoundBreakpoint(binding))
                        .Cast<IDebugBoundBreakpoint2>().ToArray();

                    ppEnum = new AD7BoundBreakpointsEnum(boundBreakpoints);
                }
            }

            return VSConstants.S_OK;
        }
Example #12
0
 int IDebugBreakpointBoundEvent2.EnumBoundBreakpoints(out IEnumDebugBoundBreakpoints2 ppEnum)
 {
     ppEnum = new AD7BoundBreakpointsEnum(new IDebugBoundBreakpoint2[] { m_boundBreakpoint });
     return Constants.S_OK;
 }
Example #13
0
        /// <summary>
        /// Send an event to SDM with the breakpoint that was hit.
        /// </summary>
        /// <param name="thread"> The thread running in a program. </param>
        /// <param name="clients"> List of bound breakpoints. At this moment, this list has only one element. </param>
        public void OnBreakpoint(AD7Thread thread, IList<IDebugBoundBreakpoint2> clients)
        {
            IDebugBoundBreakpoint2[] boundBreakpoints = new IDebugBoundBreakpoint2[clients.Count];

            int i = 0;
            foreach (object objCurrentBreakpoint in clients)
            {
                boundBreakpoints[i] = (IDebugBoundBreakpoint2)objCurrentBreakpoint;
                i++;
            }

            AD7BoundBreakpointsEnum boundBreakpointsEnum = new AD7BoundBreakpointsEnum(boundBreakpoints);
            AD7BreakpointEvent eventObject = new AD7BreakpointEvent(boundBreakpointsEnum);

            Send(eventObject, AD7BreakpointEvent.IID, thread);
        }
Example #14
0
    public void OnBreakpoint(AD7Thread thread, IList<IDebugBoundBreakpoint2> clients) {
      var boundBreakpoints = new IDebugBoundBreakpoint2[clients.Count];
      int i = 0;
      foreach (var objCurrentBreakpoint in clients) {
        boundBreakpoints[i] = objCurrentBreakpoint;
        i++;
      }

      // An engine that supports more advanced breakpoint features such as hit counts, conditions and filters
      // should notify each bound breakpoint that it has been hit and evaluate conditions here.
      // The sample engine does not support these features.
      var boundBreakpointsEnum = new AD7BoundBreakpointsEnum(boundBreakpoints);
      var eventObject = new AD7BreakpointEvent(boundBreakpointsEnum);
      var ad7Thread = (AD7Thread)thread;
      Send(eventObject, AD7BreakpointEvent.IID, ad7Thread);
    }