public ProvideDebugExceptionAttribute(string engineGuid, string category, params string[] path)
 {
     _engineGuid = engineGuid;
     _category = category;
     _path = path;
     _state = enum_EXCEPTION_STATE.EXCEPTION_JUST_MY_CODE_SUPPORTED | enum_EXCEPTION_STATE.EXCEPTION_STOP_USER_UNCAUGHT;
 }
Esempio n. 2
0
 public ProvideDebugExceptionAttribute(string engineGuid, string category, params string[] path)
 {
     _engineGuid = engineGuid;
     _category   = category;
     _path       = path;
     _state      = enum_EXCEPTION_STATE.EXCEPTION_JUST_MY_CODE_SUPPORTED | enum_EXCEPTION_STATE.EXCEPTION_STOP_USER_UNCAUGHT;
 }
Esempio n. 3
0
        public void SetAllExceptions(enum_EXCEPTION_STATE dwState)
        {
            var newState = ToExceptionBreakpointState(dwState);

            foreach (var pair in _categoryMap)
            {
                SetCategory(pair.Value, newState);
            }
        }
Esempio n. 4
0
 public ExceptionEvent(string exceptionName, uint code, enum_EXCEPTION_STATE state,
                       string description)
     : base((uint)enum_EVENTATTRIBUTES.EVENT_SYNC_STOP, YetiConstants.ExceptionEventGuid)
 {
     _exceptionName = exceptionName;
     _code          = code;
     _state         = state;
     _detail        = description;
 }
Esempio n. 5
0
            private static ExceptionBreakpointState RegistryToExceptionBreakpointState(/*OPTIONAL*/ object registryValue)
            {
                if (registryValue == null || !(registryValue is int))
                {
                    return(ExceptionBreakpointState.None);
                }

                enum_EXCEPTION_STATE value = (enum_EXCEPTION_STATE)(int)registryValue;

                return(ExceptionManager.ToExceptionBreakpointState(value));
            }
Esempio n. 6
0
        private static ExceptionBreakpointState ToExceptionBreakpointState(enum_EXCEPTION_STATE ad7ExceptionState)
        {
            ExceptionBreakpointState returnValue = ExceptionBreakpointState.None;

            if ((ad7ExceptionState & (enum_EXCEPTION_STATE.EXCEPTION_STOP_FIRST_CHANCE | enum_EXCEPTION_STATE.EXCEPTION_STOP_USER_FIRST_CHANCE)) != 0)
            {
                returnValue |= ExceptionBreakpointState.BreakThrown;
            }
            if (ad7ExceptionState.HasFlag(enum_EXCEPTION_STATE.EXCEPTION_STOP_USER_UNCAUGHT))
            {
                returnValue |= ExceptionBreakpointState.BreakUserHandled;
            }

            return(returnValue);
        }
        /// <summary>
        /// Send an exception event to the SDM to trigger breakmode.
        /// </summary>
        public void ContinueInBreakMode()
        {
            RemoteThread   thread = _process.GetSelectedThread();
            ExceptionEvent exceptionEvent;

            if (thread.GetStopReason() == StopReason.SIGNAL && thread.GetStopReasonDataCount() > 0)
            {
                var signalNumber = thread.GetStopReasonDataAtIndex(0);
                (string name,string description) = SignalMap.Map[signalNumber];
                enum_EXCEPTION_STATE exceptionState =
                    enum_EXCEPTION_STATE.EXCEPTION_STOP_ALL |
                    enum_EXCEPTION_STATE.EXCEPTION_CANNOT_BE_CONTINUED;
                exceptionEvent =
                    new ExceptionEvent(name,(uint)signalNumber,exceptionState,description);
            }
            else
            {
                exceptionEvent = new ExceptionEvent("",0,enum_EXCEPTION_STATE.EXCEPTION_NONE,"");
            }

            _debugEngineHandler.SendEvent(exceptionEvent,_debugProgram,thread);
            _lldbShell.AddDebugger(_debugger);
            UpdateModulesList();
        }
Esempio n. 8
0
        private static ExceptionBreakpointState ToExceptionBreakpointState(enum_EXCEPTION_STATE ad7ExceptionState)
        {
            ExceptionBreakpointState returnValue = ExceptionBreakpointState.None;

            if ((ad7ExceptionState & (enum_EXCEPTION_STATE.EXCEPTION_STOP_FIRST_CHANCE | enum_EXCEPTION_STATE.EXCEPTION_STOP_USER_FIRST_CHANCE)) != 0)
                returnValue |= ExceptionBreakpointState.BreakThrown;
            if (ad7ExceptionState.HasFlag(enum_EXCEPTION_STATE.EXCEPTION_STOP_USER_UNCAUGHT))
                returnValue |= ExceptionBreakpointState.BreakUserHandled;

            return returnValue;
        }
Esempio n. 9
0
 int IDebugEngine3.SetAllExceptions(enum_EXCEPTION_STATE dwState)
 {
     DLog.Debug(DContext.VSDebuggerComCall, "DebugEngine.SetAllExceptions");
     return VSConstants.S_OK;
 }
Esempio n. 10
0
        private static ExceptionHitTreatment GetExceptionTreatment(enum_EXCEPTION_STATE exceptionState) {
            if ((exceptionState & enum_EXCEPTION_STATE.EXCEPTION_STOP_FIRST_CHANCE) != 0) {
                return ExceptionHitTreatment.BreakAlways;
            }

            // UNDONE Handle break on unhandled, once just my code is supported
            // Node has a catch all, so there are no uncaught exceptions
            // For now just break always or never
            //if ((exceptionState & enum_EXCEPTION_STATE.EXCEPTION_STOP_USER_UNCAUGHT) != 0)
            //{
            //    return ExceptionHitTreatment.BreakOnUnhandled;
            //}

            return ExceptionHitTreatment.BreakNever;
        }
Esempio n. 11
0
        public AD7ExceptionEvent(string name, string description, uint code, Guid? exceptionCategory, ExceptionBreakpointState state)
        {
            _name = name;
            _code = code;
            _description = description ?? name;
            _category = exceptionCategory ?? new Guid(EngineConstants.EngineId);

            switch (state)
            {
                case ExceptionBreakpointState.None:
                    _state = enum_EXCEPTION_STATE.EXCEPTION_STOP_SECOND_CHANCE;
                    break;

                case ExceptionBreakpointState.BreakThrown:
                    _state = enum_EXCEPTION_STATE.EXCEPTION_STOP_FIRST_CHANCE | enum_EXCEPTION_STATE.EXCEPTION_STOP_USER_FIRST_CHANCE;
                    break;

                case ExceptionBreakpointState.BreakUserHandled:
                    _state = enum_EXCEPTION_STATE.EXCEPTION_STOP_USER_UNCAUGHT;
                    break;

                default:
                    Debug.Fail("Unexpected state value");
                    _state = enum_EXCEPTION_STATE.EXCEPTION_STOP_SECOND_CHANCE;
                    break;
            }
        }
Esempio n. 12
0
 int IDebugEngine3.SetAllExceptions(enum_EXCEPTION_STATE dwState)
 {
     DLog.Debug(DContext.VSDebuggerComCall, "DebugEngine.SetAllExceptions");
     return(VSConstants.S_OK);
 }
Esempio n. 13
0
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

    public int SetAllExceptions (enum_EXCEPTION_STATE dwState)
    {
      // 
      // This method sets the state of all outstanding exceptions.
      // 

      LoggingUtils.PrintFunction ();

      try
      {
        throw new NotImplementedException ();
      }
      catch (NotImplementedException e)
      {
        LoggingUtils.HandleException (e);

        return Constants.E_NOTIMPL;
      }
    }
Esempio n. 14
0
 public int SetAllExceptions(enum_EXCEPTION_STATE dwState)
 {
     throw new NotImplementedException();
 }
Esempio n. 15
0
 public int SetAllExceptions(enum_EXCEPTION_STATE dwState)
 {
     throw new NotImplementedException();
 }
Esempio n. 16
0
        public void SetAllExceptions(enum_EXCEPTION_STATE dwState)
        {
            var newState = ToExceptionBreakpointState(dwState);

            foreach (var pair in _categoryMap)
            {
                SetCategory(pair.Value, newState);
            }
        }
Esempio n. 17
0
 public override int SetAllExceptions(enum_EXCEPTION_STATE dwState)
 {
     throw new NotImplementedTestDoubleException();
 }
Esempio n. 18
0
 public int SetAllExceptions(enum_EXCEPTION_STATE dwState)
 {
     _debuggedProcess?.ExceptionManager.SetAllExceptions(dwState);
     return(Constants.S_OK);
 }
Esempio n. 19
0
 public int SetAllExceptions(enum_EXCEPTION_STATE dwState)
 {
     return(debugEngine.SetAllExceptions(dwState));
 }