예제 #1
0
        protected override BreakEventInfo OnInsertBreakEvent(BreakEvent be)
        {
            Breakpoint bp = be as Breakpoint;

            if (bp == null)
            {
                throw new NotSupportedException();
            }

            BreakEventInfo breakEventInfo = new BreakEventInfo();

            if (bp.HitCount > 0)
            {
                breakpointsWithHitCount.Add(breakEventInfo);
            }

            ulong address = this.SymbolResolver.GetAddressFromCodeLine(bp.FileName, (ushort)bp.Line);

            if (address != 0)
            {
                breakpointcounter++;
                debuggee.SetBreakPoint(address);
                breakpoints[address]  = new BreakPointWrapper(breakpointcounter, breakEventInfo);
                breakEventInfo.Handle = address;
                breakEventInfo.SetStatus(BreakEventStatus.Bound, null);
            }
            else
            {
                breakEventInfo.SetStatus(BreakEventStatus.BindError, null);
            }

            return(breakEventInfo);
        }
        protected override BreakEventInfo OnInsertBreakEvent(BreakEvent be)
        {
            Breakpoint bp = be as Breakpoint;
            if (bp == null)
                throw new NotSupportedException();

            BreakEventInfo breakEventInfo = new BreakEventInfo();

            if (bp.HitCount > 0)
            {
                breakpointsWithHitCount.Add(breakEventInfo);
            }

            ulong address = this.SymbolResolver.GetAddressFromCodeLine(bp.FileName, (ushort)bp.Line);
            if (address != 0)
            {
                breakpointcounter++;
                debuggee.SetBreakPoint(address);
                breakpoints[address] = new BreakPointWrapper(breakpointcounter, breakEventInfo);
                breakEventInfo.Handle = address;
                breakEventInfo.SetStatus(BreakEventStatus.Bound, null);
            }
            else
            {
                breakEventInfo.SetStatus(BreakEventStatus.BindError, null);
            }

            return breakEventInfo;

        }