int IDebugPendingBreakpoint2.Delete() {
            if (_boundBreakpoint != null) {
                Marshal.ThrowExceptionForHR(((IDebugBoundBreakpoint2)_boundBreakpoint).Delete());
                _boundBreakpoint = null;
            }

            _state = enum_PENDING_BP_STATE.PBPS_DELETED;
            return VSConstants.S_OK;
        }
Example #2
0
        int IDebugPendingBreakpoint2.Delete()
        {
            if (_boundBreakpoint != null)
            {
                Marshal.ThrowExceptionForHR(((IDebugBoundBreakpoint2)_boundBreakpoint).Delete());
                _boundBreakpoint = null;
            }

            _state = enum_PENDING_BP_STATE.PBPS_DELETED;
            return(VSConstants.S_OK);
        }
Example #3
0
        int IDebugPendingBreakpoint2.Enable(int fEnable)
        {
            if (_state == enum_PENDING_BP_STATE.PBPS_DELETED)
            {
                Debug.Fail(Invariant($"Trying to enable or disable a deleted {nameof(AD7PendingBreakpoint)}"));
                return(VSConstants.E_FAIL);
            }

            if (_boundBreakpoint != null)
            {
                Marshal.ThrowExceptionForHR(((IDebugBoundBreakpoint2)_boundBreakpoint).Enable(fEnable));
            }

            _state = fEnable == 0 ? enum_PENDING_BP_STATE.PBPS_DISABLED : enum_PENDING_BP_STATE.PBPS_ENABLED;
            return(VSConstants.S_OK);
        }
Example #4
0
        BreakpointState ToBreakpointState(enum_PENDING_BP_STATE state)
        {
            switch (state)
            {
            case enum_PENDING_BP_STATE.PBPS_DELETED:
                return(BreakpointState.Deleted);

            case enum_PENDING_BP_STATE.PBPS_DISABLED:
                return(BreakpointState.Disabled);

            case enum_PENDING_BP_STATE.PBPS_ENABLED:
                return(BreakpointState.Enabled);

            default:
                return(BreakpointState.Error);
            }
        }
        int IDebugPendingBreakpoint2.Enable(int fEnable) {
            if (_state == enum_PENDING_BP_STATE.PBPS_DELETED) {
                Debug.Fail(Invariant($"Trying to enable or disable a deleted {nameof(AD7PendingBreakpoint)}"));
                return VSConstants.E_FAIL;
            }

            if (_boundBreakpoint != null) {
                Marshal.ThrowExceptionForHR(((IDebugBoundBreakpoint2)_boundBreakpoint).Enable(fEnable));
            }

            _state = fEnable == 0 ? enum_PENDING_BP_STATE.PBPS_DISABLED : enum_PENDING_BP_STATE.PBPS_ENABLED;
            return VSConstants.S_OK;
        }
 public AD7BoundBreakpoint(AD7PendingBreakpoint pendingBreakpoint, RSourceLocation location, enum_PENDING_BP_STATE state)
 {
     PendingBreakpoint = pendingBreakpoint;
     Location          = location;
     SetState((enum_BP_STATE)state);
 }
 public AD7BoundBreakpoint(AD7PendingBreakpoint pendingBreakpoint, DebugBreakpointLocation location, enum_PENDING_BP_STATE state) {
     PendingBreakpoint = pendingBreakpoint;
     Location = location;
     SetState((enum_BP_STATE)state);
 }