Browse Source

System.Diagnostics not used in debugger anymore

git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@205 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61
shortcuts
David Srbecký 20 years ago
parent
commit
ed5e592bff
  1. 4
      src/AddIns/Misc/Debugger/Debugger.AddIn/Project/Src/Service/WindowsDebugger.cs
  2. 4
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Debugger/Internal/MTA2STA.cs
  3. 1
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Debugger/Internal/NativeMethods.cs
  4. 1
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Debugger/NDebugger.cs
  5. 7
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Threads/Function.cs
  6. 5
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Threads/Process.cs
  7. 5
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Threads/Thread.cs
  8. 1
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Variables/Evals/Eval.cs
  9. 1
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Variables/Evals/EvalQueue.cs
  10. 1
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Variables/ObjectVariable.cs
  11. 1
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Variables/Variable.cs
  12. 2
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Variables/VariableCollection.cs

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

@ -373,9 +373,7 @@ namespace ICSharpCode.SharpDevelop.Services @@ -373,9 +373,7 @@ namespace ICSharpCode.SharpDevelop.Services
e.ResumeDebuggingAfterEvent();
return;
case ExceptionForm.Result.Ignore:
System.Diagnostics.Debug.Fail("Not implemented");
e.ResumeDebuggingAfterEvent();
return;
throw new NotImplementedException();
}
}

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

@ -102,7 +102,7 @@ namespace DebuggerInterop.Core @@ -102,7 +102,7 @@ namespace DebuggerInterop.Core
outputParams[i] = null;
outputParams[i] = Marshal.GetTypedObjectForIUnknown((IntPtr)inputParams[i], outputParamsInfo[i].ParameterType);
} catch (System.Exception exception) {
System.Diagnostics.Debug.Fail("Marshaling of argument " + i.ToString() + " of " + functionName + " failed.", exception.ToString());
throw new DebuggerLibrary.DebuggerException("Marshaling of argument " + i.ToString() + " of " + functionName + " failed.", exception);
}
}
} else {
@ -120,7 +120,7 @@ namespace DebuggerInterop.Core @@ -120,7 +120,7 @@ namespace DebuggerInterop.Core
returnValue = method.Invoke(targetObject, outputParams);
}
} catch (System.Exception exception) {
System.Diagnostics.Debug.Fail("Invoke of " + functionName + " failed.", exception.ToString());
throw new DebuggerLibrary.DebuggerException("Invoke of " + functionName + " failed.", exception);
}
TraceMsg ("} \\\\ Invoke");
return returnValue;

1
src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Debugger/Internal/NativeMethods.cs

@ -1,5 +1,4 @@ @@ -1,5 +1,4 @@
using System;
using System.Diagnostics;
using System.Collections;
using System.Runtime.InteropServices;
using System.Text;

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

@ -3,7 +3,6 @@ @@ -3,7 +3,6 @@
// </file>
using System;
using System.Diagnostics;
using System.Collections;
using System.Runtime.InteropServices;
using System.Text;

7
src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Threads/Function.cs

@ -10,7 +10,6 @@ using System.Threading; @@ -10,7 +10,6 @@ using System.Threading;
using DebuggerInterop.Core;
using DebuggerInterop.MetaData;
using System.Collections.Generic;
using System.Diagnostics;
namespace DebuggerLibrary
@ -134,16 +133,14 @@ namespace DebuggerLibrary @@ -134,16 +133,14 @@ namespace DebuggerLibrary
private unsafe void Step(bool stepIn)
{
if (Module.SymbolsLoaded == false) {
System.Diagnostics.Debug.Fail("Unable to step. No symbols loaded.");
return;
throw new DebuggerException("Unable to step. No symbols loaded.");
}
SourcecodeSegment nextSt;
nextSt = NextStatement;// Cache
if (nextSt == null) {
System.Diagnostics.Debug.Fail("Unable to step. Next statement not aviable");
return;
throw new DebuggerException("Unable to step. Next statement not aviable");
}
ICorDebugStepper stepper;

5
src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Threads/Process.cs

@ -97,8 +97,7 @@ namespace DebuggerLibrary @@ -97,8 +97,7 @@ namespace DebuggerLibrary
public void Break()
{
if (!IsProcessRunning) {
System.Diagnostics.Debug.Fail("Invalid operation");
return;
throw new DebuggerException("Invalid operation");
}
corProcess.Stop(5000); // TODO: Hardcoded value
@ -111,7 +110,7 @@ namespace DebuggerLibrary @@ -111,7 +110,7 @@ namespace DebuggerLibrary
public void Continue()
{
if (IsProcessRunning) {
System.Diagnostics.Debug.Fail("Invalid operation");
throw new DebuggerException("Invalid operation");
return;
}

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

@ -168,9 +168,8 @@ namespace DebuggerLibrary @@ -168,9 +168,8 @@ namespace DebuggerLibrary
try {
callstack.Add(new Function(debugger, corFrames[0]));
}
catch (COMException) {
//System.Diagnostics.Debug.Fail("Error during adding function to callstack");
} catch (COMException) {
// TODO
};
}
} // for(;;)

1
src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Variables/Evals/Eval.cs

@ -3,7 +3,6 @@ @@ -3,7 +3,6 @@
// </file>
using System;
using System.Diagnostics;
using System.Collections;
using System.Runtime.InteropServices;

1
src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Variables/Evals/EvalQueue.cs

@ -3,7 +3,6 @@ @@ -3,7 +3,6 @@
// </file>
using System;
using System.Diagnostics;
using System.Collections;
using System.Runtime.InteropServices;

1
src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Variables/ObjectVariable.cs

@ -4,7 +4,6 @@ @@ -4,7 +4,6 @@
using System;
using System.Collections;
using System.Diagnostics;
using System.Collections.Specialized;
using System.Runtime.InteropServices;

1
src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Variables/Variable.cs

@ -3,7 +3,6 @@ @@ -3,7 +3,6 @@
// </file>
using System;
using System.Diagnostics;
using System.Runtime.InteropServices;
using DebuggerInterop.Core;

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

@ -4,7 +4,6 @@ @@ -4,7 +4,6 @@
using System;
using System.Collections;
using System.Diagnostics;
using DebuggerInterop.Core;
@ -33,7 +32,6 @@ namespace DebuggerLibrary @@ -33,7 +32,6 @@ namespace DebuggerLibrary
if (readOnly) {
throw new DebuggerException("VariableCollection is marked as readOnly");
}
System.Diagnostics.Trace.Assert(variable != null);
if (variable != null) {
InnerList.Add(variable);
}

Loading…
Cancel
Save