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 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 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(); } } } } }
internal CorFunctionBreakpoint(ICorDebugFunctionBreakpoint breakpoint) : base(breakpoint) { m_breakpoint = breakpoint; }
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 Breakpoint(NDebugger debugger, ICorDebugFunctionBreakpoint corBreakpoint) { this.debugger = debugger; this.corBreakpoints.Add(corBreakpoint); }
int ICorDebugCode.CreateBreakpoint(uint offset, out ICorDebugFunctionBreakpoint ppBreakpoint) { ppBreakpoint = new CorDebugFunctionBreakpoint(m_function, offset); return(COM_HResults.S_OK); }
internal bool Equals(ICorDebugFunctionBreakpoint obj) { return(corBreakpoint == obj); }
int ICorDebugFunction.CreateBreakpoint(out ICorDebugFunctionBreakpoint ppBreakpoint) { ppBreakpoint = new CorDebugFunctionBreakpoint(this, 0); return(COM_HResults.S_OK); }
/// <summary> /// Initializes a new instance of the <see cref="CorFunctionBreakpoint"/> class. /// </summary> /// <param name="cobreakpoint">The cobreakpoint.</param> internal CorFunctionBreakpoint(ICorDebugFunctionBreakpoint cobreakpoint, CorDebuggerOptions options) : base(cobreakpoint, options) { this.p_cobreakpoint = cobreakpoint; }
internal bool Equals(ICorDebugFunctionBreakpoint obj) { return corBreakpoint == obj; }
public CorBreakPoint(ICorDebugFunctionBreakpoint _bp) { breakPoint = _bp; }
public DebugFunctionBreakpoint(ICorDebugFunctionBreakpoint bp) { _bp = bp; }
internal DebuggedFunctionBreakpoint(ICorDebugFunctionBreakpoint br) : base(br) { }
int ICorDebugCode.CreateBreakpoint (uint offset, out ICorDebugFunctionBreakpoint ppBreakpoint) { ppBreakpoint = new CorDebugFunctionBreakpoint(m_function, offset); return Utility.COM_HResults.S_OK; }
internal FunctionBreakpoint(RuntimeFunction function, ICorDebugFunctionBreakpoint comBreakpoint) : base(comBreakpoint) { _comBreakpoint = comBreakpoint; _function = function; }
int ICorDebugFunction.CreateBreakpoint( out ICorDebugFunctionBreakpoint ppBreakpoint ) { ppBreakpoint = new CorDebugFunctionBreakpoint( this, 0 ); return Utility.COM_HResults.S_OK; }