示例#1
0
 internal DnCodeBreakpoint(DnModuleId module, uint token, uint offset)
 {
     this.Module = module;
     this.Token  = token;
     this.Offset = offset;
     this.code   = null;
 }
示例#2
0
 internal DnCodeBreakpoint(DnModuleId module, uint token, uint offset)
 {
     Module = module;
     Token  = token;
     Offset = offset;
     code   = null;
 }
示例#3
0
 public bool Remove(DnModuleId module, TBP bp)
 {
     if (!dict.TryGetValue(module, out var list))
     {
         return(false);
     }
     return(list.Remove(bp));
 }
示例#4
0
 public void Add(DnModuleId module, TBP bp)
 {
     if (!dict.TryGetValue(module, out var list))
     {
         dict.Add(module, list = new List <TBP>());
     }
     list.Add(bp);
 }
示例#5
0
 public TBP[] GetBreakpoints(DnModuleId module)
 {
     if (!dict.TryGetValue(module, out var list))
     {
         return(Array.Empty <TBP>());
     }
     return(list.ToArray());
 }
示例#6
0
 internal DnCodeBreakpoint(DnModuleId module, uint token, uint offset)
 {
     Module = module;
     Token  = token;
     Offset = offset;
     code   = null;
     error  = DnCodeBreakpointError.OtherError;
 }
示例#7
0
        internal DnCodeBreakpoint(DnModuleId module, CorCode code, uint offset)
        {
            Module = module;
            var func = code.Function;

            Token     = func?.Token ?? 0;
            Offset    = offset;
            this.code = code;
            error     = DnCodeBreakpointError.OtherError;
        }
示例#8
0
        void SetILBreakpoint(DnModuleId moduleId, uint token)
        {
            Debug.Assert(token != 0 && breakpoint == null);
            DnBreakpoint bp = null;

            bp = debugger.CreateBreakpoint(moduleId, token, 0, ctx2 => {
                debugger.RemoveBreakpoint(bp);
                return(true);
            });
        }
示例#9
0
        void SetILBreakpoint(DnModuleId moduleId, uint token)
        {
            Debug.Assert(token != 0 && breakpoint == null);
            DnBreakpoint bp = null;

            bp = debugger.CreateBreakpoint(moduleId, token, 0, ctx2 => {
                debugger.RemoveBreakpoint(bp);
                ctx2.E.AddPauseState(new EntryPointBreakpointPauseState(ctx2.E.CorAppDomain, ctx2.E.CorThread));
                return(false);
            });
        }
示例#10
0
 internal DnILCodeBreakpoint(DnModuleId module, uint token, uint offset, Func <ILCodeBreakpointConditionContext, bool>?cond)
     : base(module, token, offset) => Condition = cond ?? defaultCond;
示例#11
0
 internal DnNativeCodeBreakpoint(DnModuleId module, uint token, uint offset, Func <NativeCodeBreakpointConditionContext, bool> cond)
     : base(module, token, offset)
 {
     Condition = cond ?? defaultCond;
 }