public virtual int Exception(ref EXCEPTION_RECORD64 Exception, uint FirstChance)
        {
            BreakpointHit = true;

            (FirstChance == 1 ? FirstChanceExceptionCaught : SecondChanceExceptionCaught)?.Invoke(this, Exception);

            return((int)DEBUG_STATUS.BREAK);
        }
Exemplo n.º 2
0
 public HandleExceptionEventArgs(
     Debugger debugger,
     EXCEPTION_RECORD64 exception,
     uint firstChance)
 {
     _Debugger    = debugger;
     _Exception   = exception;
     _FirstChance = firstChance;
 }
Exemplo n.º 3
0
        public int Exception([In] ref EXCEPTION_RECORD64 Exception, [In] uint FirstChance)
        {
            if (ExceptionOccurred != null)
            {
                ExceptionInfo exInfo = new ExceptionInfo(Exception, FirstChance);
                ExceptionOccurred(exInfo);
            }

            return((int)DEBUG_STATUS.BREAK);
        }
Exemplo n.º 4
0
        public int Exception(ref EXCEPTION_RECORD64 Exception, uint FirstChance)
        {
            ExceptionEventHandler evt = (FirstChance == 1) ? FirstChanceExceptionEvent : SecondChanceExceptionEvent;

            if (evt != null)
            {
                evt(this, Exception);
            }

            return((int)DEBUG_STATUS.BREAK);
        }
Exemplo n.º 5
0
        public int Exception(ref EXCEPTION_RECORD64 Exception, uint FirstChance)
        {
            EventHandler <HandleExceptionEventArgs> exceptionHandler = HandleExceptionEvent;

            if (HandleExceptionEvent != null)
            {
                exceptionHandler(this, new HandleExceptionEventArgs(m_Debugger, Exception, FirstChance));
            }

            return((FirstChance == 1) ? (int)DEBUG_STATUS.GO : (int)DEBUG_STATUS.BREAK);
        }
        int IDebugEventCallbacksWide.Exception(EXCEPTION_RECORD64 Exception, uint FirstChance)
        {
            _breakpointHit = Exception.ExceptionCode == 0x80000004 || Exception.ExceptionCode == 0x80000003 || FirstChance == 0;
            _stateChanged  = true;

            //if (_breakpointHit)
            //	Control.OutputCurrentState(DEBUG_OUTCTL.THIS_CLIENT, DEBUG_CURRENT.DEFAULT);

            //UpdateStatus();
            return(_breakpointHit ? (int)DEBUG_STATUS.BREAK : (int)DEBUG_STATUS.NO_CHANGE);
        }
Exemplo n.º 7
0
            } // end Breakpoint()

            public int Exception(ref EXCEPTION_RECORD64 Exception, uint FirstChance)
            {
                try
                {
                    var eventArgs = new ExceptionEventArgs(m_debugger, Exception, FirstChance != 0);
                    int retVal    = _RaiseEvent(m_debugger.ExceptionHit, eventArgs);
                    if (_ShouldOutput(retVal, eventArgs))
                    {
                        _PsPipe.WriteObject(eventArgs);
                    }
                    return(retVal);
                }
                catch (Exception e)
                {
                    Util.FailFast("Unexpected exception during event callback.", e);
                    return(0);
                }
            } // end Exception()
Exemplo n.º 8
0
 public ExceptionInfo(EXCEPTION_RECORD64 record, uint firstChance)
 {
     Record      = record;
     FirstChance = firstChance != 0;
 }
Exemplo n.º 9
0
 private void OnException(object sender, EXCEPTION_RECORD64 e)
 {
     var threadId = GetCurrentThread();
     ExceptionHit?.Invoke((int)e.ExceptionCode, threadId);
 }
Exemplo n.º 10
0
        public Int32 Exception([In] ref EXCEPTION_RECORD64 Exception, [In] uint FirstChance)
        {
            // Output.Output.Log(Output.LogLevel.Debug, "Exception Hit");

            return((Int32)DEBUG_STATUS.BREAK);
        }
Exemplo n.º 11
0
 public virtual int Exception(EXCEPTION_RECORD64 Exception, UInt32 FirstChance)
 {
     return((int)DEBUG_STATUS.NO_CHANGE);
 }
 public int Exception(ref EXCEPTION_RECORD64 Exception, uint FirstChance)
 {
     BreakpointHit = true;
     //return (int) DEBUG_STATUS.NO_CHANGE;
     return((int)DEBUG_STATUS.BREAK);
 }
Exemplo n.º 13
0
        public int Exception(ref EXCEPTION_RECORD64 Exception, uint FirstChance)
        {
            ((FirstChance == 1) ? FirstChanceExceptionEvent : SecondChanceExceptionEvent)?.Invoke(this, Exception);

            return((int)DEBUG_STATUS.BREAK);
        }
Exemplo n.º 14
0
 public int Exception(ref EXCEPTION_RECORD64 Exception, uint FirstChance)
 {
     DebugApi.DebugWriteLine("Exception : 0x{0:x8} - First: {1}", Exception.ExceptionCode, FirstChance != 0);
     return(BitConverter.ToInt32(BitConverter.GetBytes((uint)DEBUG_STATUS.IGNORE_EVENT), 0));
 }
Exemplo n.º 15
0
 public int Exception(ref EXCEPTION_RECORD64 Exception, uint FirstChance)
 {
     ExceptionHit?.Invoke(this, Exception);
     return((int)DEBUG_STATUS.BREAK);
 }
 public override int Exception(ref EXCEPTION_RECORD64 Exception, uint FirstChance)
 {
     return((int)DEBUG_STATUS.GO_NOT_HANDLED);
 }