Browse Source

Fixed exception being handled twice.

git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@741 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61
shortcuts
David Srbecký 20 years ago
parent
commit
f8928556af
  1. 13
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Debugger/Internal/ManagedCallback.cs
  2. 9
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Debugger/NDebugger.cs
  3. 3
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Variables/VariableCollection.cs

13
src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Debugger/Internal/ManagedCallback.cs

@ -162,9 +162,16 @@ namespace Debugger @@ -162,9 +162,16 @@ namespace Debugger
{
// Exception2 is used in .NET Framework 2.0
// Forward the call to Exception2, which handles EnterCallback and ExitCallback
ExceptionType exceptionType = (unhandled != 0)?ExceptionType.DEBUG_EXCEPTION_UNHANDLED:ExceptionType.DEBUG_EXCEPTION_FIRST_CHANCE;
Exception2(pAppDomain, pThread, null, 0, (CorDebugExceptionCallbackType)exceptionType, 0);
if (debugger.DebuggeeVersion.StartsWith("v1.")) {
// Forward the call to Exception2, which handles EnterCallback and ExitCallback
ExceptionType exceptionType = (unhandled != 0)?ExceptionType.DEBUG_EXCEPTION_UNHANDLED:ExceptionType.DEBUG_EXCEPTION_FIRST_CHANCE;
Exception2(pAppDomain, pThread, null, 0, (CorDebugExceptionCallbackType)exceptionType, 0);
} else {
// This callback should be ignored in v2 applications
EnterCallback("Exception", pThread);
ExitCallback_Continue();
}
}
#endregion

9
src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Debugger/NDebugger.cs

@ -27,6 +27,8 @@ namespace Debugger @@ -27,6 +27,8 @@ namespace Debugger
VariableCollection localVariables = new VariableCollection();
string debuggeeVersion;
public ApartmentState RequiredApartmentState {
get {
return requiredApartmentState;
@ -39,6 +41,12 @@ namespace Debugger @@ -39,6 +41,12 @@ namespace Debugger
}
}
public string DebuggeeVersion {
get {
return debuggeeVersion;
}
}
internal ManagedCallback ManagedCallback {
get {
return managedCallback;
@ -89,6 +97,7 @@ namespace Debugger @@ -89,6 +97,7 @@ namespace Debugger
} else {
version = GetDebuggerVersion();
}
this.debuggeeVersion = version;
NativeMethods.CreateDebuggingInterfaceFromVersion(3, version, out corDebug);

3
src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Variables/VariableCollection.cs

@ -141,7 +141,8 @@ namespace Debugger @@ -141,7 +141,8 @@ namespace Debugger
// Update existing variables
foreach(Variable variable in mergedCollection) {
if (this.Contains(variable.Name)) {
//this[variable.Name].CorValue = variable.CorValue;
this.Remove(this[variable.Name]);
this.Add(variable);
}
}

Loading…
Cancel
Save