Beispiel #1
0
 public BoundBreakpointData(DbgEngineImpl engine, ModuleId module, DnCodeBreakpoint breakpoint)
 {
     Engine     = engine ?? throw new ArgumentNullException(nameof(engine));
     Module     = module;
     Breakpoint = breakpoint ?? throw new ArgumentNullException(nameof(breakpoint));
     Breakpoint.ErrorChanged += Breakpoint_ErrorChanged;
 }
        void SendCodeBreakpointHitMessage_CorDebug(DnCodeBreakpoint breakpoint, DbgThread?thread)
        {
            debuggerThread.VerifyAccess();
            var bpData = (BoundBreakpointData?)breakpoint.Tag;

            Debug.Assert(!(bpData is null));
            if (!(bpData is null))
            {
                SendMessage(new DbgMessageBreakpoint(bpData.EngineBoundCodeBreakpoint.BoundCodeBreakpoint, thread, GetMessageFlags()));
            }
Beispiel #3
0
        static DbgEngineBoundCodeBreakpointMessage GetBoundBreakpointMessage(DnCodeBreakpoint bp)
        {
            switch (bp.Error)
            {
            case DnCodeBreakpointError.None:
                return(DbgEngineBoundCodeBreakpointMessage.CreateNoError());

            case DnCodeBreakpointError.FunctionNotFound:
                return(DbgEngineBoundCodeBreakpointMessage.CreateFunctionNotFound(GetFunctionName(bp)));

            case DnCodeBreakpointError.OtherError:
            case DnCodeBreakpointError.CouldNotCreateBreakpoint:
                return(DbgEngineBoundCodeBreakpointMessage.CreateCouldNotCreateBreakpoint());

            default:
                Debug.Fail($"Unknown error: {bp.Error}");
                goto case DnCodeBreakpointError.OtherError;
            }
Beispiel #4
0
 static string GetFunctionName(DnCodeBreakpoint cbp) => $"0x{cbp.Token:X8} ({cbp.Module.ModuleName})";