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; }
public void SetAllExceptions(enum_EXCEPTION_STATE dwState) { var newState = ToExceptionBreakpointState(dwState); foreach (var pair in _categoryMap) { SetCategory(pair.Value, newState); } }
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; }
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)); }
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(); }
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; }
int IDebugEngine3.SetAllExceptions(enum_EXCEPTION_STATE dwState) { DLog.Debug(DContext.VSDebuggerComCall, "DebugEngine.SetAllExceptions"); return VSConstants.S_OK; }
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; }
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; } }
int IDebugEngine3.SetAllExceptions(enum_EXCEPTION_STATE dwState) { DLog.Debug(DContext.VSDebuggerComCall, "DebugEngine.SetAllExceptions"); return(VSConstants.S_OK); }
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// 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; } }
public int SetAllExceptions(enum_EXCEPTION_STATE dwState) { throw new NotImplementedException(); }
public override int SetAllExceptions(enum_EXCEPTION_STATE dwState) { throw new NotImplementedTestDoubleException(); }
public int SetAllExceptions(enum_EXCEPTION_STATE dwState) { _debuggedProcess?.ExceptionManager.SetAllExceptions(dwState); return(Constants.S_OK); }
public int SetAllExceptions(enum_EXCEPTION_STATE dwState) { return(debugEngine.SetAllExceptions(dwState)); }