public bool Hit(BreakpointConditionContext context) { foreach (var hitBp in hitBps) { if (!hitBp.Hit(context)) return false; } return true; }
public bool Hit(BreakpointConditionContext context) { foreach (var hitBp in hitBps) { if (!hitBp.Hit(context)) { return(false); } } return(true); }
bool OnLoadModule(BreakpointConditionContext context) { var ctx = (DebugEventBreakpointConditionContext)context; var lmArgs = (LoadModuleDebugCallbackEventArgs)ctx.EventArgs; var mod = lmArgs.CorModule; if (!IsOurModule(mod)) { return(false); } debugger.RemoveBreakpoint(breakpoint); breakpoint = null; var serMod = mod.SerializedDnModule; if (type == BreakProcessType.ModuleCctorOrEntryPoint) { uint cctorToken = MetaDataUtils.GetGlobalStaticConstructor(mod.GetMetaDataInterface <IMetaDataImport>()); if (cctorToken != 0) { SetILBreakpoint(serMod, cctorToken); return(false); } } string otherModuleName; uint epToken = GetEntryPointToken(filename, out otherModuleName); if (epToken != 0) { if ((Table)(epToken >> 24) == Table.Method) { SetILBreakpoint(serMod, epToken); return(false); } if (otherModuleName != null) { Debug.Assert((Table)(epToken >> 24) == Table.File); otherModuleFullName = GetOtherModuleFullName(otherModuleName); if (otherModuleFullName != null) { thisAssembly = mod.Assembly; breakpoint = debugger.CreateBreakpoint(DebugEventBreakpointType.LoadModule, OnLoadOtherModule); return(false); } } } // Failed to set BP. Break to debugger. return(true); }
bool OnLoadOtherModule(BreakpointConditionContext context) { var ctx = (DebugEventBreakpointConditionContext)context; var lmArgs = (LoadModuleDebugCallbackEventArgs)ctx.EventArgs; var mod = lmArgs.CorModule; if (!IsModule(mod, otherModuleFullName) || mod.Assembly != thisAssembly) { return(false); } debugger.RemoveBreakpoint(breakpoint); breakpoint = null; string otherModuleName; uint epToken = GetEntryPointToken(otherModuleFullName, out otherModuleName); if (epToken != 0 && (Table)(epToken >> 24) == Table.Method) { SetILBreakpoint(mod.SerializedDnModule, epToken); return(false); } return(true); }
bool OnLoadOtherModule(BreakpointConditionContext context) { var ctx = (DebugEventBreakpointConditionContext)context; var lmArgs = (LoadModuleDebugCallbackEventArgs)ctx.EventArgs; var mod = lmArgs.CorModule; if (!IsModule(mod, otherModuleFullName) || mod.Assembly != thisAssembly) return false; debugger.RemoveBreakpoint(breakpoint); breakpoint = null; string otherModuleName; uint epToken = GetEntryPointToken(otherModuleFullName, out otherModuleName); if (epToken != 0 && (Table)(epToken >> 24) == Table.Method) { SetILBreakpoint(mod.SerializedDnModule, epToken); return false; } return true; }
bool OnLoadModule(BreakpointConditionContext context) { var ctx = (DebugEventBreakpointConditionContext)context; var lmArgs = (LoadModuleDebugCallbackEventArgs)ctx.EventArgs; var mod = lmArgs.CorModule; if (!IsOurModule(mod)) return false; debugger.RemoveBreakpoint(breakpoint); breakpoint = null; var serMod = mod.SerializedDnModule; if (type == BreakProcessType.ModuleCctorOrEntryPoint) { uint cctorToken = MetaDataUtils.GetGlobalStaticConstructor(mod.GetMetaDataInterface<IMetaDataImport>()); if (cctorToken != 0) { SetILBreakpoint(serMod, cctorToken); return false; } } string otherModuleName; uint epToken = GetEntryPointToken(filename, out otherModuleName); if (epToken != 0) { if ((Table)(epToken >> 24) == Table.Method) { SetILBreakpoint(serMod, epToken); return false; } if (otherModuleName != null) { Debug.Assert((Table)(epToken >> 24) == Table.File); otherModuleFullName = GetOtherModuleFullName(otherModuleName); if (otherModuleFullName != null) { thisAssembly = mod.Assembly; breakpoint = debugger.CreateBreakpoint(DebugEventBreakpointType.LoadModule, OnLoadOtherModule); return false; } } } // Failed to set BP. Break to debugger. return true; }
public bool Hit(BreakpointConditionContext context) { return(++hits == count); }
public bool Hit(BreakpointConditionContext context) { return(false); }
public bool Hit(BreakpointConditionContext context) { return(cond(context)); }
public bool Hit(BreakpointConditionContext context) { return ++hits == count; }
public bool Hit(BreakpointConditionContext context) { return false; }
public bool Hit(BreakpointConditionContext context) { return cond(context); }