Browse Source

Backport r5265 - Fix for "Cannot use JMC on this code (likely wrong JIT settings)." to 3.1

git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/branches/3.0@5278 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61
pull/1/head
Daniel Grunwald 16 years ago
parent
commit
4740f942e5
  1. 13
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Control/Module.cs

13
src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Control/Module.cs

@ -7,6 +7,8 @@ @@ -7,6 +7,8 @@
using System;
using System.Collections.Generic;
using System.Runtime.InteropServices;
using Debugger.MetaData;
using Debugger.Wrappers.CorDebug;
using Debugger.Wrappers.CorSym;
@ -212,7 +214,16 @@ namespace Debugger @@ -212,7 +214,16 @@ namespace Debugger
corModule.CastTo<ICorDebugModule2>().SetJMCStatus(0, 0, ref unused);
return;
}
corModule.CastTo<ICorDebugModule2>().SetJMCStatus(1, 0, ref unused);
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;
}
}
public void ApplyChanges(byte[] metadata, byte[] il)

Loading…
Cancel
Save