Ejemplo n.º 1
0
        public void CreateProcess(ICorDebugProcess pProcess)
        {
            EnterCallback(PausedReason.Other, "CreateProcess", pProcess);

            // Process is added in NDebugger.Start
            // disable NGen
            ICorDebugProcess2 pProcess2 = pProcess as ICorDebugProcess2;

            if (pProcess2 != null && Process.DebugMode == DebugModeFlag.Debug)
            {
                try {
                    pProcess2.SetDesiredNGENCompilerFlags((uint)CorDebugJITCompilerFlags.CORDEBUG_JIT_DISABLE_OPTIMIZATION);
                } catch (COMException) {
                    // we cannot set the NGEN flag => no evaluation for optimized code.
                }
            }

            ExitCallback();
        }
        public void CreateProcess(ICorDebugProcess pProcess)
        {
            EnterCallback("CreateProcess", pProcess);

            // Process is added in NDebugger.Start

            if (this.process.Options.SuppressNGENOptimization)
            {
                ICorDebugProcess2 pProcess2 = pProcess as ICorDebugProcess2;
                if (pProcess2 != null)
                {
                    try {
                        pProcess2.SetDesiredNGENCompilerFlags((uint)CorDebugJITCompilerFlags.CORDEBUG_JIT_DISABLE_OPTIMIZATION);
                    } catch (COMException) {
                        // we cannot set the NGEN flag => no evaluation for optimized code.
                    }
                }
            }

            ExitCallback();
        }