public void ApplyChanges(byte[] metadata, byte[] il) { if (corModule.Is <ICorDebugModule2>()) // Is the debuggee .NET 2.0? { (corModule.CastTo <ICorDebugModule2>()).ApplyChanges((uint)metadata.Length, metadata, (uint)il.Length, il); } }
/// <summary> Sets all code as being 'my code'. The code will be gradually /// set to not-user-code as encountered acording to stepping options </summary> public void ResetJustMyCodeStatus() { uint unused = 0; if (this.Process.Options.StepOverNoSymbols && !this.HasSymbols) { // Optimization - set the code as non-user right away corModule.CastTo <ICorDebugModule2>().SetJMCStatus(0, 0, ref unused); return; } try { corModule.CastTo <ICorDebugModule2>().SetJMCStatus(1, 0, ref unused); } catch (COMException e) { // Cannot use JMC on this code (likely wrong JIT settings). if ((uint)e.ErrorCode == 0x80131323) { process.TraceMessage("Cannot use JMC on this code. Release build?"); return; } throw; } }