Browse Source

Exception interception

git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@249 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61
shortcuts
David Srbecký 20 years ago
parent
commit
5371ac4b7d
  1. 2
      src/AddIns/Misc/Debugger/Debugger.AddIn/Project/Src/Service/ExceptionForm.cs
  2. 3
      src/AddIns/Misc/Debugger/Debugger.AddIn/Project/Src/Service/WindowsDebugger.cs
  3. 3
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Debugger/DebuggerEvents/PausedReason.cs
  4. 4
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Debugger/Internal/ManagedCallback.cs
  5. 6
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Threads/Thread.cs

2
src/AddIns/Misc/Debugger/Debugger.AddIn/Project/Src/Service/ExceptionForm.cs

@ -80,7 +80,7 @@ namespace ICSharpCode.SharpDevelop.Services @@ -80,7 +80,7 @@ namespace ICSharpCode.SharpDevelop.Services
// buttonIgnore
//
this.buttonIgnore.Anchor = System.Windows.Forms.AnchorStyles.Bottom;
this.buttonIgnore.Enabled = false;
this.buttonIgnore.Enabled = true;
this.buttonIgnore.Location = new System.Drawing.Point(372, 160);
this.buttonIgnore.Name = "buttonIgnore";
this.buttonIgnore.Size = new System.Drawing.Size(91, 32);

3
src/AddIns/Misc/Debugger/Debugger.AddIn/Project/Src/Service/WindowsDebugger.cs

@ -362,7 +362,8 @@ namespace ICSharpCode.SharpDevelop.Services @@ -362,7 +362,8 @@ namespace ICSharpCode.SharpDevelop.Services
e.ResumeDebuggingAfterEvent();
return;
case ExceptionForm.Result.Ignore:
throw new NotImplementedException();
debugger.CurrentThread.InterceptCurrentException();
return;
}
} else {
JumpToCurrentLine();

3
src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Debugger/DebuggerEvents/PausedReason.cs

@ -17,6 +17,7 @@ namespace DebuggerLibrary @@ -17,6 +17,7 @@ namespace DebuggerLibrary
DebuggerError,
EvalComplete,
CurrentThreadChanged,
CurrentFunctionChanged
CurrentFunctionChanged,
ExceptionIntercepted
}
}

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

@ -410,8 +410,12 @@ namespace DebuggerLibrary @@ -410,8 +410,12 @@ namespace DebuggerLibrary
{
EnterCallback("ExceptionUnwind", pThread);
if (dwEventType == CorDebugExceptionUnwindCallbackType.DEBUG_EXCEPTION_INTERCEPTED) {
ExitCallback_Paused(PausedReason.ExceptionIntercepted);
} else {
ExitCallback_Continue();
}
}
public void FunctionRemapComplete(ICorDebugAppDomain pAppDomain, ICorDebugThread pThread, ICorDebugFunction pFunction)
{

6
src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Threads/Thread.cs

@ -132,6 +132,12 @@ namespace DebuggerLibrary @@ -132,6 +132,12 @@ namespace DebuggerLibrary
}
}
public void InterceptCurrentException()
{
((ICorDebugThread2)corThread).InterceptCurrentException(LastFunction.corILFrame);
process.Continue();
}
internal IList<ICorDebugStepper> ActiveSteppers {
get {
return activeSteppers.AsReadOnly();

Loading…
Cancel
Save