Browse Source

fix #553: ExecutionEngineException or AccessViolationException (CLR 2.0) when debugging a program that uses System.Data.OleDb

pull/517/head
Siegfried Pammer 12 years ago
parent
commit
02493cf401
  1. 5
      src/AddIns/Debugger/Debugger.AddIn/Options/DebuggingOptions.cs
  2. 4
      src/AddIns/Debugger/Debugger.AddIn/Options/DebuggingOptionsPanel.xaml
  3. 10
      src/AddIns/Debugger/Debugger.Core/Module.cs
  4. 1
      src/AddIns/Debugger/Debugger.Core/Options.cs
  5. 4
      src/Main/Base/Project/Debugging/IDebuggerService.cs

5
src/AddIns/Debugger/Debugger.AddIn/Options/DebuggingOptions.cs

@ -45,11 +45,6 @@ namespace ICSharpCode.SharpDevelop.Services
set { PS.Set<bool>("Debugger.EnableJustMyCode", value); } set { PS.Set<bool>("Debugger.EnableJustMyCode", value); }
} }
public override bool EnableEditAndContinue {
get { return PS.Get<bool>("Debugger.EnableEditAndContinue", true); }
set { PS.Set<bool>("Debugger.EnableEditAndContinue", value); }
}
public override bool SuppressJITOptimization { public override bool SuppressJITOptimization {
get { return PS.Get<bool>("Debugger.SuppressJITOptimization", true); } get { return PS.Get<bool>("Debugger.SuppressJITOptimization", true); }
set { PS.Set<bool>("Debugger.SuppressJITOptimization", value); } set { PS.Set<bool>("Debugger.SuppressJITOptimization", value); }

4
src/AddIns/Debugger/Debugger.AddIn/Options/DebuggingOptionsPanel.xaml

@ -29,10 +29,6 @@
</GroupBox> </GroupBox>
<GroupBox Margin="5" Header="{sd:Localize Global.Advanced}"> <GroupBox Margin="5" Header="{sd:Localize Global.Advanced}">
<widgets:StackPanelWithSpacing SpaceBetweenItems="5"> <widgets:StackPanelWithSpacing SpaceBetweenItems="5">
<!--
<CheckBox Content="{sd:Localize Dialog.Options.IDEOptions.Debugging.EnableEditAndContinue}"
IsChecked="{sd:OptionBinding debugger:DebuggingOptions.EnableEditAndContinue}" />
-->
<CheckBox Content="{sd:Localize Dialog.Options.IDEOptions.Debugging.SuppressJITOptimization}" <CheckBox Content="{sd:Localize Dialog.Options.IDEOptions.Debugging.SuppressJITOptimization}"
IsChecked="{sd:OptionBinding debugger:DebuggingOptions.SuppressJITOptimization}" /> IsChecked="{sd:OptionBinding debugger:DebuggingOptions.SuppressJITOptimization}" />
<CheckBox Content="{sd:Localize Dialog.Options.IDEOptions.Debugging.SuppressNGENOptimization}" <CheckBox Content="{sd:Localize Dialog.Options.IDEOptions.Debugging.SuppressNGENOptimization}"

10
src/AddIns/Debugger/Debugger.Core/Module.cs

@ -305,10 +305,14 @@ namespace Debugger
void SetJITCompilerFlags() void SetJITCompilerFlags()
{ {
// ad CORDEBUG_JIT_ENABLE_ENC:
// see issue #553 on GitHub: "ExecutionEngineException or AccessViolationException (CLR 2.0)
// when debugging a program that uses System.Data.OleDb"
// System.Data.dll (partially) is a C++/CLI assembly and EnC is not supported there.
// trying to set CORDEBUG_JIT_ENABLE_ENC succeeds at first, but leads to strange exceptions afterwards.
// CORDEBUG_JIT_ENABLE_ENC should only be set for managed-only modules with User Code.
CorDebugJITCompilerFlags flags; CorDebugJITCompilerFlags flags;
if (this.Process.Options.EnableEditAndContinue) { if (this.Process.Options.SuppressJITOptimization) {
flags = CorDebugJITCompilerFlags.CORDEBUG_JIT_ENABLE_ENC;
} else if (this.Process.Options.SuppressJITOptimization) {
flags = CorDebugJITCompilerFlags.CORDEBUG_JIT_DISABLE_OPTIMIZATION; flags = CorDebugJITCompilerFlags.CORDEBUG_JIT_DISABLE_OPTIMIZATION;
} else { } else {
flags = CorDebugJITCompilerFlags.CORDEBUG_JIT_DEFAULT; flags = CorDebugJITCompilerFlags.CORDEBUG_JIT_DEFAULT;

1
src/AddIns/Debugger/Debugger.Core/Options.cs

@ -25,7 +25,6 @@ namespace Debugger
public class Options public class Options
{ {
public virtual bool EnableJustMyCode { get; set; } public virtual bool EnableJustMyCode { get; set; }
public virtual bool EnableEditAndContinue { get; set; }
public virtual bool SuppressJITOptimization { get; set; } public virtual bool SuppressJITOptimization { get; set; }
public virtual bool SuppressNGENOptimization { get; set; } public virtual bool SuppressNGENOptimization { get; set; }
public virtual bool StepOverDebuggerAttributes { get; set; } public virtual bool StepOverDebuggerAttributes { get; set; }

4
src/Main/Base/Project/Debugging/IDebuggerService.cs

@ -156,7 +156,6 @@ namespace ICSharpCode.SharpDevelop.Debugging
public interface IDebuggerOptions public interface IDebuggerOptions
{ {
bool EnableJustMyCode { get; } bool EnableJustMyCode { get; }
bool EnableEditAndContinue { get; }
bool SuppressJITOptimization { get; } bool SuppressJITOptimization { get; }
bool SuppressNGENOptimization { get; } bool SuppressNGENOptimization { get; }
bool StepOverDebuggerAttributes { get; } bool StepOverDebuggerAttributes { get; }
@ -199,9 +198,6 @@ namespace ICSharpCode.SharpDevelop.Debugging
public bool EnableJustMyCode { public bool EnableJustMyCode {
get { return true; } get { return true; }
} }
public bool EnableEditAndContinue {
get { return false; }
}
public bool SuppressJITOptimization { public bool SuppressJITOptimization {
get { return false; } get { return false; }
} }

Loading…
Cancel
Save