public virtual bool SetBreakpoint(Module module) { if (this.fileName == null) { return(false); } SourcecodeSegment segment = SourcecodeSegment.Resolve(module, FileName, CheckSum, Line, Column); if (segment == null) { return(false); } originalLocation = segment; ICorDebugFunctionBreakpoint corBreakpoint = segment.CorFunction.GetILCode().CreateBreakpoint((uint)segment.ILStart); corBreakpoint.Activate(enabled ? 1 : 0); corBreakpoints.Add(corBreakpoint); OnSet(new BreakpointEventArgs(this)); return(true); }
public override bool SetBreakpoint(Module module) { bool okMod = MethodKey.IsSameModule(module.FullPath); Debug.Assert(okMod, "Trying to set a BP that belongs in another module"); if (!okMod) { return(false); } SourcecodeSegment segment = SourcecodeSegment.CreateForIL(module, this.Location.Line, (int)MethodKey.Token, (int)ILOffset); if (segment == null) { return(false); } try { ICorDebugFunctionBreakpoint corBreakpoint = segment.CorFunction.GetILCode().CreateBreakpoint((uint)segment.ILStart); corBreakpoint.Activate(Enabled ? 1 : 0); corBreakpoints.Add(corBreakpoint); OnSet(new BreakpointEventArgs(this)); return(true); } catch { return(false); } }
public void SetBreakpoint(Module module) { foreach (var symbolSource in module.Process.Debugger.SymbolSources) { foreach (var seq in symbolSource.GetSequencePoints(module, this.FileName, this.Line, this.Column)) { ICorDebugFunction corFunction = module.CorModule.GetFunctionFromToken(seq.MethodDefToken); ICorDebugFunctionBreakpoint corBreakpoint = corFunction.GetILCode().CreateBreakpoint((uint)seq.ILOffset); corBreakpoint.Activate(enabled ? 1 : 0); corBreakpoints.Add(corBreakpoint); } } }
public bool SetBreakpoint(Module module) { ICorDebugFunction corFunction; int ilOffset; if (!sourcecodeSegment.GetFunctionAndOffset(module, false, out corFunction, out ilOffset)) { return(false); } corBreakpoint = corFunction.ILCode.CreateBreakpoint((uint)ilOffset); hadBeenSet = true; corBreakpoint.Activate(enabled?1:0); OnChanged(); return(true); }
public override bool SetBreakpoint(Module module) { SourcecodeSegment segment = SourcecodeSegment.CreateForIL(module, this.Line, (int)MetadataToken, ILOffset); if (segment == null) { return(false); } try { ICorDebugFunctionBreakpoint corBreakpoint = segment.CorFunction.GetILCode().CreateBreakpoint((uint)segment.ILStart); corBreakpoint.Activate(Enabled ? 1 : 0); corBreakpoints.Add(corBreakpoint); OnSet(new BreakpointEventArgs(this)); return(true); } catch { return(false); } }
public void RunTo(string fileName, int line, int column) { foreach (var symbolSource in this.Debugger.SymbolSources) { foreach (Module module in this.Modules) { // Note the we might get multiple matches foreach (SequencePoint seq in symbolSource.GetSequencePoints(module, fileName, line, column)) { ICorDebugFunction corFunction = module.CorModule.GetFunctionFromToken(seq.MethodDefToken); ICorDebugFunctionBreakpoint corBreakpoint = corFunction.GetILCode().CreateBreakpoint((uint)seq.ILOffset); corBreakpoint.Activate(1); this.tempBreakpoints.Add(corBreakpoint); if (this.IsPaused) { AsyncContinue(); } } } } }
public bool SetBreakpoint(Module module) { ICorDebugFunction corFunction; int ilOffset; if (!sourcecodeSegment.GetFunctionAndOffset(module, false, out corFunction, out ilOffset)) { return false; } corBreakpoint = corFunction.ILCode.CreateBreakpoint((uint)ilOffset); hadBeenSet = true; corBreakpoint.Activate(enabled?1:0); OnChanged(); return true; }