Exemple #1
0
 /// <summary>
 ///     Indexes the breakpoint hits.
 /// </summary>
 /// <param name="options">The options.</param>
 internal virtual void IndexBreakpointHits(IndexOptions options)
 {
     var end = GetEndingPosition(options);
     var start = GetStartingPosition(options);
     var curPos = TimeTravelFacade.SetPosition(start).ActualPosition;
     BreakpointFacade.ClearBreakpoints();
     SetBreakpoints(options);
     while (curPos <= end)
     {
         DebugEngineProxy.RunUntilBreak();
         curPos = TimeTravelFacade.GetCurrentPosition();
         if (curPos <= end)
             UpsertCurrentPosition(options);
         for (int i = 0; i < options.Step; i++)
         {
             var newPosition = new Position(curPos.High, curPos.Low + 1);
             var posRes = TimeTravelFacade.SetPosition(newPosition);
             curPos = posRes.ActualPosition;
             if (posRes.BreakpointHit.HasValue)
                 i = -1;
             if (curPos >= end)
                 return;
             UpsertCurrentPosition(options);
         }
     }
 }
Exemple #2
0
        /// <summary>
        ///     Sets the breakpoints.
        /// </summary>
        /// <param name="options">The options.</param>
        internal void SetBreakpoints(IndexOptions options)
        {
            BreakpointFacade.ClearBreakpoints();

            if (options.BreakpointMasks != null)
            {
                foreach (var optionsBreakpointMask in options.BreakpointMasks)
                {
                    optionsBreakpointMask.SetBreakpoint(BreakpointFacade);
                }
            }

            if (options.AccessBreakpoints == null)
            {
                return;
            }
            foreach (var accessBreakpoint in options.AccessBreakpoints)
            {
                accessBreakpoint.SetBreakpoint(BreakpointFacade);
            }
        }