Ejemplo n.º 1
0
        internal void OnModuleLoaded(Module module)
        {
            module.OrderOfLoading = lastAssignedModuleOrderOfLoading++;
            module.AppDomain.InvalidateCompilation();

            if (BreakInMain)
            {
                try {
                    // create a BP at entry point
                    uint entryPoint = module.GetEntryPoint();
                    if (entryPoint != 0)                       // no EP
                    {
                        var corBreakpoint = module.CorModule
                                            .GetFunctionFromToken(entryPoint)
                                            .CreateBreakpoint();
                        corBreakpoint.Activate(1);
                        tempBreakpoints.Add(corBreakpoint);

                        BreakInMain = false;
                    }
                } catch {
                    // the app does not have an entry point - COM exception
                }
            }

            if (this.ModuleLoaded != null)
            {
                this.ModuleLoaded(this, new ModuleEventArgs(module));
            }
        }
Ejemplo n.º 2
0
		internal void OnModuleLoaded(Module module)
		{
			module.OrderOfLoading = lastAssignedModuleOrderOfLoading++;
			module.AppDomain.InvalidateCompilation();
			
			if (BreakInMain) {
				try {
					// create a BP at entry point
					uint entryPoint = module.GetEntryPoint();
					if (entryPoint != 0) { // no EP
						var corBreakpoint = module.CorModule
							.GetFunctionFromToken(entryPoint)
							.CreateBreakpoint();
						corBreakpoint.Activate(1);
						tempBreakpoints.Add(corBreakpoint);
						
						BreakInMain = false;
					}
				} catch {
					// the app does not have an entry point - COM exception
				}
			}
			
			if (this.ModuleLoaded != null) {
				this.ModuleLoaded(this, new ModuleEventArgs(module));
			}
		}