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. 5
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Debugger/DebuggerEvents/PausedReason.cs
  4. 6
      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
// buttonIgnore // buttonIgnore
// //
this.buttonIgnore.Anchor = System.Windows.Forms.AnchorStyles.Bottom; 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.Location = new System.Drawing.Point(372, 160);
this.buttonIgnore.Name = "buttonIgnore"; this.buttonIgnore.Name = "buttonIgnore";
this.buttonIgnore.Size = new System.Drawing.Size(91, 32); 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
e.ResumeDebuggingAfterEvent(); e.ResumeDebuggingAfterEvent();
return; return;
case ExceptionForm.Result.Ignore: case ExceptionForm.Result.Ignore:
throw new NotImplementedException(); debugger.CurrentThread.InterceptCurrentException();
return;
} }
} else { } else {
JumpToCurrentLine(); JumpToCurrentLine();

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

@ -15,8 +15,9 @@ namespace DebuggerLibrary
ControlCTrap, ControlCTrap,
Exception, Exception,
DebuggerError, DebuggerError,
EvalComplete, EvalComplete,
CurrentThreadChanged, CurrentThreadChanged,
CurrentFunctionChanged CurrentFunctionChanged,
ExceptionIntercepted
} }
} }

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

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

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

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

Loading…
Cancel
Save