Browse Source

Added wrappers for CorDebug

git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@928 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61
shortcuts
David Srbecký 20 years ago
parent
commit
6ad702e8c4
  1. 88
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Debugger.Core.csproj
  2. 83
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/CorDebug.cs
  3. 42
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/CorDebugChainReason.cs
  4. 136
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/CorDebugClass.cs
  5. 18
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/CorDebugCreateProcessFlags.cs
  6. 24
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/CorDebugExceptionCallbackType.cs
  7. 20
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/CorDebugExceptionUnwindCallbackType.cs
  8. 20
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/CorDebugHandleType.cs
  9. 30
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/CorDebugIntercept.cs
  10. 30
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/CorDebugInternalFrameType.cs
  11. 18
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/CorDebugMDAFlags.cs
  12. 28
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/CorDebugMappingResult.cs
  13. 128
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/CorDebugRegister.cs
  14. 30
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/CorDebugStepReason.cs
  15. 20
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/CorDebugThreadState.cs
  16. 30
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/CorDebugUnmappedStop.cs
  17. 32
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/CorDebugUserState.cs
  18. 83
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/EmbeddedCLRCorDebug.cs
  19. 136
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/EmbeddedCLRCorDebugClass.cs
  20. 136
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebug.cs
  21. 205
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugAppDomain.cs
  22. 99
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugAppDomain2.cs
  23. 110
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugAppDomainEnum.cs
  24. 161
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugArrayValue.cs
  25. 114
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugAssembly.cs
  26. 110
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugAssemblyEnum.cs
  27. 124
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugBoxValue.cs
  28. 93
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugBreakpoint.cs
  29. 110
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugBreakpointEnum.cs
  30. 163
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugChain.cs
  31. 128
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugChainEnum.cs
  32. 102
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugClass.cs
  33. 97
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugClass2.cs
  34. 132
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugCode.cs
  35. 110
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugCodeEnum.cs
  36. 148
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugContext.cs
  37. 143
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugController.cs
  38. 118
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugEditAndContinueSnapshot.cs
  39. 105
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugEnum.cs
  40. 110
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugErrorInfoEnum.cs
  41. 159
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugEval.cs
  42. 130
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugEval2.cs
  43. 135
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugFrame.cs
  44. 128
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugFrameEnum.cs
  45. 133
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugFunction.cs
  46. 105
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugFunction2.cs
  47. 105
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugFunctionBreakpoint.cs
  48. 115
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugGenericValue.cs
  49. 146
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugHandleValue.cs
  50. 117
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugHeapValue.cs
  51. 90
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugHeapValue2.cs
  52. 192
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugILFrame.cs
  53. 95
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugILFrame2.cs
  54. 142
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugInternalFrame.cs
  55. 110
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugMDA.cs
  56. 213
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugManagedCallback.cs
  57. 123
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugManagedCallback2.cs
  58. 184
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugModule.cs
  59. 110
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugModule2.cs
  60. 100
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugModuleBreakpoint.cs
  61. 110
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugModuleEnum.cs
  62. 192
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugNativeFrame.cs
  63. 110
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugObjectEnum.cs
  64. 148
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugObjectValue.cs
  65. 92
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugObjectValue2.cs
  66. 238
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugProcess.cs
  67. 122
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugProcess2.cs
  68. 110
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugProcessEnum.cs
  69. 134
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugReferenceValue.cs
  70. 108
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugRegisterSet.cs
  71. 123
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugStepper.cs
  72. 88
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugStepper2.cs
  73. 110
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugStepperEnum.cs
  74. 127
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugStringValue.cs
  75. 187
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugThread.cs
  76. 108
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugThread2.cs
  77. 110
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugThreadEnum.cs
  78. 128
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugType.cs
  79. 110
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugTypeEnum.cs
  80. 88
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugUnmanagedCallback.cs
  81. 105
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugValue.cs
  82. 90
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugValue2.cs
  83. 100
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugValueBreakpoint.cs
  84. 110
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugValueEnum.cs
  85. 93
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ISequentialStream.cs
  86. 140
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/IStream.cs

88
src/AddIns/Misc/Debugger/Debugger.Core/Project/Debugger.Core.csproj

@ -208,9 +208,97 @@ @@ -208,9 +208,97 @@
<Compile Include="Src\Threads\Stepper.cs" />
<Compile Include="Src\Threads\StepperEventArgs.cs" />
<Compile Include="Src\Variables\ClassVariable.cs" />
<Compile Include="Src\Wrappers\CorDebug\CorDebug.cs" />
<Compile Include="Src\Wrappers\CorDebug\CorDebugClass.cs" />
<Compile Include="Src\Wrappers\CorDebug\CorDebugCreateProcessFlags.cs" />
<Compile Include="Src\Wrappers\CorDebug\CorDebugExceptionCallbackType.cs" />
<Compile Include="Src\Wrappers\CorDebug\CorDebugExceptionUnwindCallbackType.cs" />
<Compile Include="Src\Wrappers\CorDebug\CorDebugHandleType.cs" />
<Compile Include="Src\Wrappers\CorDebug\CorDebugChainReason.cs" />
<Compile Include="Src\Wrappers\CorDebug\CorDebugIntercept.cs" />
<Compile Include="Src\Wrappers\CorDebug\CorDebugInternalFrameType.cs" />
<Compile Include="Src\Wrappers\CorDebug\CorDebugMappingResult.cs" />
<Compile Include="Src\Wrappers\CorDebug\CorDebugMDAFlags.cs" />
<Compile Include="Src\Wrappers\CorDebug\CorDebugRegister.cs" />
<Compile Include="Src\Wrappers\CorDebug\CorDebugStepReason.cs" />
<Compile Include="Src\Wrappers\CorDebug\CorDebugThreadState.cs" />
<Compile Include="Src\Wrappers\CorDebug\CorDebugUnmappedStop.cs" />
<Compile Include="Src\Wrappers\CorDebug\CorDebugUserState.cs" />
<Compile Include="Src\Wrappers\CorDebug\EmbeddedCLRCorDebug.cs" />
<Compile Include="Src\Wrappers\CorDebug\EmbeddedCLRCorDebugClass.cs" />
<Compile Include="Src\Wrappers\CorDebug\ICorDebug.cs" />
<Compile Include="Src\Wrappers\CorDebug\ICorDebugAppDomain.cs" />
<Compile Include="Src\Wrappers\CorDebug\ICorDebugAppDomain2.cs" />
<Compile Include="Src\Wrappers\CorDebug\ICorDebugAppDomainEnum.cs" />
<Compile Include="Src\Wrappers\CorDebug\ICorDebugArrayValue.cs" />
<Compile Include="Src\Wrappers\CorDebug\ICorDebugAssembly.cs" />
<Compile Include="Src\Wrappers\CorDebug\ICorDebugAssemblyEnum.cs" />
<Compile Include="Src\Wrappers\CorDebug\ICorDebugBoxValue.cs" />
<Compile Include="Src\Wrappers\CorDebug\ICorDebugBreakpoint.cs" />
<Compile Include="Src\Wrappers\CorDebug\ICorDebugBreakpointEnum.cs" />
<Compile Include="Src\Wrappers\CorDebug\ICorDebugClass.cs" />
<Compile Include="Src\Wrappers\CorDebug\ICorDebugClass2.cs" />
<Compile Include="Src\Wrappers\CorDebug\ICorDebugCode.cs" />
<Compile Include="Src\Wrappers\CorDebug\ICorDebugCodeEnum.cs" />
<Compile Include="Src\Wrappers\CorDebug\ICorDebugContext.cs" />
<Compile Include="Src\Wrappers\CorDebug\ICorDebugController.cs" />
<Compile Include="Src\Wrappers\CorDebug\ICorDebugEditAndContinueSnapshot.cs" />
<Compile Include="Src\Wrappers\CorDebug\ICorDebugEnum.cs" />
<Compile Include="Src\Wrappers\CorDebug\ICorDebugErrorInfoEnum.cs" />
<Compile Include="Src\Wrappers\CorDebug\ICorDebugEval.cs" />
<Compile Include="Src\Wrappers\CorDebug\ICorDebugEval2.cs" />
<Compile Include="Src\Wrappers\CorDebug\ICorDebugFrame.cs" />
<Compile Include="Src\Wrappers\CorDebug\ICorDebugFrameEnum.cs" />
<Compile Include="Src\Wrappers\CorDebug\ICorDebugFunction.cs" />
<Compile Include="Src\Wrappers\CorDebug\ICorDebugFunction2.cs" />
<Compile Include="Src\Wrappers\CorDebug\ICorDebugFunctionBreakpoint.cs" />
<Compile Include="Src\Wrappers\CorDebug\ICorDebugGenericValue.cs" />
<Compile Include="Src\Wrappers\CorDebug\ICorDebugHandleValue.cs" />
<Compile Include="Src\Wrappers\CorDebug\ICorDebugHeapValue.cs" />
<Compile Include="Src\Wrappers\CorDebug\ICorDebugHeapValue2.cs" />
<Compile Include="Src\Wrappers\CorDebug\ICorDebugChain.cs" />
<Compile Include="Src\Wrappers\CorDebug\ICorDebugChainEnum.cs" />
<Compile Include="Src\Wrappers\CorDebug\ICorDebugILFrame.cs" />
<Compile Include="Src\Wrappers\CorDebug\ICorDebugILFrame2.cs" />
<Compile Include="Src\Wrappers\CorDebug\ICorDebugInternalFrame.cs" />
<Compile Include="Src\Wrappers\CorDebug\ICorDebugManagedCallback.cs" />
<Compile Include="Src\Wrappers\CorDebug\ICorDebugManagedCallback2.cs" />
<Compile Include="Src\Wrappers\CorDebug\ICorDebugMDA.cs" />
<Compile Include="Src\Wrappers\CorDebug\ICorDebugModule.cs" />
<Compile Include="Src\Wrappers\CorDebug\ICorDebugModule2.cs" />
<Compile Include="Src\Wrappers\CorDebug\ICorDebugModuleBreakpoint.cs" />
<Compile Include="Src\Wrappers\CorDebug\ICorDebugModuleEnum.cs" />
<Compile Include="Src\Wrappers\CorDebug\ICorDebugNativeFrame.cs" />
<Compile Include="Src\Wrappers\CorDebug\ICorDebugObjectEnum.cs" />
<Compile Include="Src\Wrappers\CorDebug\ICorDebugObjectValue.cs" />
<Compile Include="Src\Wrappers\CorDebug\ICorDebugObjectValue2.cs" />
<Compile Include="Src\Wrappers\CorDebug\ICorDebugProcess.cs" />
<Compile Include="Src\Wrappers\CorDebug\ICorDebugProcess2.cs" />
<Compile Include="Src\Wrappers\CorDebug\ICorDebugProcessEnum.cs" />
<Compile Include="Src\Wrappers\CorDebug\ICorDebugReferenceValue.cs" />
<Compile Include="Src\Wrappers\CorDebug\ICorDebugRegisterSet.cs" />
<Compile Include="Src\Wrappers\CorDebug\ICorDebugStepper.cs" />
<Compile Include="Src\Wrappers\CorDebug\ICorDebugStepper2.cs" />
<Compile Include="Src\Wrappers\CorDebug\ICorDebugStepperEnum.cs" />
<Compile Include="Src\Wrappers\CorDebug\ICorDebugStringValue.cs" />
<Compile Include="Src\Wrappers\CorDebug\ICorDebugThread.cs" />
<Compile Include="Src\Wrappers\CorDebug\ICorDebugThread2.cs" />
<Compile Include="Src\Wrappers\CorDebug\ICorDebugThreadEnum.cs" />
<Compile Include="Src\Wrappers\CorDebug\ICorDebugType.cs" />
<Compile Include="Src\Wrappers\CorDebug\ICorDebugTypeEnum.cs" />
<Compile Include="Src\Wrappers\CorDebug\ICorDebugUnmanagedCallback.cs" />
<Compile Include="Src\Wrappers\CorDebug\ICorDebugValue.cs" />
<Compile Include="Src\Wrappers\CorDebug\ICorDebugValue2.cs" />
<Compile Include="Src\Wrappers\CorDebug\ICorDebugValueBreakpoint.cs" />
<Compile Include="Src\Wrappers\CorDebug\ICorDebugValueEnum.cs" />
<Compile Include="Src\Wrappers\CorDebug\ISequentialStream.cs" />
<Compile Include="Src\Wrappers\CorDebug\IStream.cs" />
</ItemGroup>
<ItemGroup>
<Content Include="README.TXT" />
<Folder Include="Src\Wrappers" />
<Folder Include="Src\Wrappers\CorDebug" />
<Folder Include="Src\Wrappers\MetaData" />
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSHARP.Targets" />
</Project>

83
src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/CorDebug.cs

@ -0,0 +1,83 @@ @@ -0,0 +1,83 @@
// <file>
// <copyright see="prj:///doc/copyright.txt"/>
// <license see="prj:///doc/license.txt"/>
// <owner name="David Srbecký" email="dsrbecky@gmail.com"/>
// <version>$Revision$</version>
// </file>
namespace Debugger.Wrappers.CorDebug
{
using System;
public class CorDebug
{
private Debugger.Interop.CorDebug.CorDebug wrappedObject;
internal Debugger.Interop.CorDebug.CorDebug WrappedObject
{
get
{
return this.wrappedObject;
}
}
public CorDebug(Debugger.Interop.CorDebug.CorDebug wrappedObject)
{
this.wrappedObject = wrappedObject;
}
public static CorDebug Wrap(Debugger.Interop.CorDebug.CorDebug objectToWrap)
{
return new CorDebug(objectToWrap);
}
public bool Is<T>() where T: class
{
try {
CastTo<T>();
return true;
} catch {
return false;
}
}
public T As<T>() where T: class
{
try {
return CastTo<T>();
} catch {
return null;
}
}
public T CastTo<T>() where T: class
{
return (T)Activator.CreateInstance(typeof(T), this.WrappedObject);
}
public static bool operator ==(CorDebug o1, CorDebug o2)
{
return ((object)o1 == null && (object)o2 == null) ||
((object)o1 != null && (object)o2 != null && o1.WrappedObject == o2.WrappedObject);
}
public static bool operator !=(CorDebug o1, CorDebug o2)
{
return !(o1 == o2);
}
public override int GetHashCode()
{
return base.GetHashCode();
}
public override bool Equals(object o)
{
CorDebug casted = o as CorDebug;
return (casted != null) && (casted.WrappedObject == wrappedObject);
}
}
}

42
src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/CorDebugChainReason.cs

@ -0,0 +1,42 @@ @@ -0,0 +1,42 @@
// <file>
// <copyright see="prj:///doc/copyright.txt"/>
// <license see="prj:///doc/license.txt"/>
// <owner name="David Srbecký" email="dsrbecky@gmail.com"/>
// <version>$Revision$</version>
// </file>
namespace Debugger.Wrappers.CorDebug
{
using System;
public enum CorDebugChainReason : int
{
CHAIN_NONE = 0,
CHAIN_CLASS_INIT = 1,
CHAIN_EXCEPTION_FILTER = 2,
CHAIN_SECURITY = 4,
CHAIN_CONTEXT_POLICY = 8,
CHAIN_INTERCEPTION = 16,
CHAIN_PROCESS_START = 32,
CHAIN_THREAD_START = 64,
CHAIN_ENTER_MANAGED = 128,
CHAIN_ENTER_UNMANAGED = 256,
CHAIN_DEBUGGER_EVAL = 512,
CHAIN_CONTEXT_SWITCH = 1024,
CHAIN_FUNC_EVAL = 2048,
}
}

136
src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/CorDebugClass.cs

@ -0,0 +1,136 @@ @@ -0,0 +1,136 @@
// <file>
// <copyright see="prj:///doc/copyright.txt"/>
// <license see="prj:///doc/license.txt"/>
// <owner name="David Srbecký" email="dsrbecky@gmail.com"/>
// <version>$Revision$</version>
// </file>
namespace Debugger.Wrappers.CorDebug
{
using System;
public class CorDebugClass
{
private Debugger.Interop.CorDebug.CorDebugClass wrappedObject;
internal Debugger.Interop.CorDebug.CorDebugClass WrappedObject
{
get
{
return this.wrappedObject;
}
}
public CorDebugClass(Debugger.Interop.CorDebug.CorDebugClass wrappedObject)
{
this.wrappedObject = wrappedObject;
}
public static CorDebugClass Wrap(Debugger.Interop.CorDebug.CorDebugClass objectToWrap)
{
return new CorDebugClass(objectToWrap);
}
public bool Is<T>() where T: class
{
try {
CastTo<T>();
return true;
} catch {
return false;
}
}
public T As<T>() where T: class
{
try {
return CastTo<T>();
} catch {
return null;
}
}
public T CastTo<T>() where T: class
{
return (T)Activator.CreateInstance(typeof(T), this.WrappedObject);
}
public static bool operator ==(CorDebugClass o1, CorDebugClass o2)
{
return ((object)o1 == null && (object)o2 == null) ||
((object)o1 != null && (object)o2 != null && o1.WrappedObject == o2.WrappedObject);
}
public static bool operator !=(CorDebugClass o1, CorDebugClass o2)
{
return !(o1 == o2);
}
public override int GetHashCode()
{
return base.GetHashCode();
}
public override bool Equals(object o)
{
CorDebugClass casted = o as CorDebugClass;
return (casted != null) && (casted.WrappedObject == wrappedObject);
}
public void CanLaunchOrAttach(uint dwProcessId, int win32DebuggingEnabled)
{
this.WrappedObject.CanLaunchOrAttach(dwProcessId, win32DebuggingEnabled);
}
public void CreateProcess(string lpApplicationName, string lpCommandLine, ref Debugger.Interop.CorDebug._SECURITY_ATTRIBUTES lpProcessAttributes, ref Debugger.Interop.CorDebug._SECURITY_ATTRIBUTES lpThreadAttributes, int bInheritHandles, uint dwCreationFlags, System.IntPtr lpEnvironment, string lpCurrentDirectory, uint lpStartupInfo, uint lpProcessInformation, CorDebugCreateProcessFlags debuggingFlags, out ICorDebugProcess ppProcess)
{
Debugger.Interop.CorDebug.ICorDebugProcess out_ppProcess;
this.WrappedObject.CreateProcess(lpApplicationName, lpCommandLine, ref lpProcessAttributes, ref lpThreadAttributes, bInheritHandles, dwCreationFlags, lpEnvironment, lpCurrentDirectory, lpStartupInfo, lpProcessInformation, ((Debugger.Interop.CorDebug.CorDebugCreateProcessFlags)(debuggingFlags)), out out_ppProcess);
ppProcess = ICorDebugProcess.Wrap(out_ppProcess);
}
public void DebugActiveProcess(uint id, int win32Attach, out ICorDebugProcess ppProcess)
{
Debugger.Interop.CorDebug.ICorDebugProcess out_ppProcess;
this.WrappedObject.DebugActiveProcess(id, win32Attach, out out_ppProcess);
ppProcess = ICorDebugProcess.Wrap(out_ppProcess);
}
public void EnumerateProcesses(out ICorDebugProcessEnum ppProcess)
{
Debugger.Interop.CorDebug.ICorDebugProcessEnum out_ppProcess;
this.WrappedObject.EnumerateProcesses(out out_ppProcess);
ppProcess = ICorDebugProcessEnum.Wrap(out_ppProcess);
}
public void GetProcess(uint dwProcessId, out ICorDebugProcess ppProcess)
{
Debugger.Interop.CorDebug.ICorDebugProcess out_ppProcess;
this.WrappedObject.GetProcess(dwProcessId, out out_ppProcess);
ppProcess = ICorDebugProcess.Wrap(out_ppProcess);
}
public void Initialize()
{
this.WrappedObject.Initialize();
}
public void SetManagedHandler(ICorDebugManagedCallback pCallback)
{
this.WrappedObject.SetManagedHandler(pCallback.WrappedObject);
}
public void SetUnmanagedHandler(ICorDebugUnmanagedCallback pCallback)
{
this.WrappedObject.SetUnmanagedHandler(pCallback.WrappedObject);
}
public void Terminate()
{
this.WrappedObject.Terminate();
}
}
}

18
src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/CorDebugCreateProcessFlags.cs

@ -0,0 +1,18 @@ @@ -0,0 +1,18 @@
// <file>
// <copyright see="prj:///doc/copyright.txt"/>
// <license see="prj:///doc/license.txt"/>
// <owner name="David Srbecký" email="dsrbecky@gmail.com"/>
// <version>$Revision$</version>
// </file>
namespace Debugger.Wrappers.CorDebug
{
using System;
public enum CorDebugCreateProcessFlags : int
{
DEBUG_NO_SPECIAL_OPTIONS = 0,
}
}

24
src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/CorDebugExceptionCallbackType.cs

@ -0,0 +1,24 @@ @@ -0,0 +1,24 @@
// <file>
// <copyright see="prj:///doc/copyright.txt"/>
// <license see="prj:///doc/license.txt"/>
// <owner name="David Srbecký" email="dsrbecky@gmail.com"/>
// <version>$Revision$</version>
// </file>
namespace Debugger.Wrappers.CorDebug
{
using System;
public enum CorDebugExceptionCallbackType : int
{
DEBUG_EXCEPTION_FIRST_CHANCE = 1,
DEBUG_EXCEPTION_USER_FIRST_CHANCE = 2,
DEBUG_EXCEPTION_CATCH_HANDLER_FOUND = 3,
DEBUG_EXCEPTION_UNHANDLED = 4,
}
}

20
src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/CorDebugExceptionUnwindCallbackType.cs

@ -0,0 +1,20 @@ @@ -0,0 +1,20 @@
// <file>
// <copyright see="prj:///doc/copyright.txt"/>
// <license see="prj:///doc/license.txt"/>
// <owner name="David Srbecký" email="dsrbecky@gmail.com"/>
// <version>$Revision$</version>
// </file>
namespace Debugger.Wrappers.CorDebug
{
using System;
public enum CorDebugExceptionUnwindCallbackType : int
{
DEBUG_EXCEPTION_UNWIND_BEGIN = 1,
DEBUG_EXCEPTION_INTERCEPTED = 2,
}
}

20
src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/CorDebugHandleType.cs

@ -0,0 +1,20 @@ @@ -0,0 +1,20 @@
// <file>
// <copyright see="prj:///doc/copyright.txt"/>
// <license see="prj:///doc/license.txt"/>
// <owner name="David Srbecký" email="dsrbecky@gmail.com"/>
// <version>$Revision$</version>
// </file>
namespace Debugger.Wrappers.CorDebug
{
using System;
public enum CorDebugHandleType : int
{
HANDLE_STRONG = 1,
HANDLE_WEAK_TRACK_RESURRECTION = 2,
}
}

30
src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/CorDebugIntercept.cs

@ -0,0 +1,30 @@ @@ -0,0 +1,30 @@
// <file>
// <copyright see="prj:///doc/copyright.txt"/>
// <license see="prj:///doc/license.txt"/>
// <owner name="David Srbecký" email="dsrbecky@gmail.com"/>
// <version>$Revision$</version>
// </file>
namespace Debugger.Wrappers.CorDebug
{
using System;
public enum CorDebugIntercept : int
{
INTERCEPT_NONE = 0,
INTERCEPT_CLASS_INIT = 1,
INTERCEPT_EXCEPTION_FILTER = 2,
INTERCEPT_SECURITY = 4,
INTERCEPT_CONTEXT_POLICY = 8,
INTERCEPT_INTERCEPTION = 16,
INTERCEPT_ALL = 65535,
}
}

30
src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/CorDebugInternalFrameType.cs

@ -0,0 +1,30 @@ @@ -0,0 +1,30 @@
// <file>
// <copyright see="prj:///doc/copyright.txt"/>
// <license see="prj:///doc/license.txt"/>
// <owner name="David Srbecký" email="dsrbecky@gmail.com"/>
// <version>$Revision$</version>
// </file>
namespace Debugger.Wrappers.CorDebug
{
using System;
public enum CorDebugInternalFrameType : int
{
STUBFRAME_NONE = 0,
STUBFRAME_M2U = 1,
STUBFRAME_U2M = 2,
STUBFRAME_APPDOMAIN_TRANSITION = 3,
STUBFRAME_LIGHTWEIGHT_FUNCTION = 4,
STUBFRAME_FUNC_EVAL = 5,
STUBFRAME_INTERNALCALL = 6,
}
}

18
src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/CorDebugMDAFlags.cs

@ -0,0 +1,18 @@ @@ -0,0 +1,18 @@
// <file>
// <copyright see="prj:///doc/copyright.txt"/>
// <license see="prj:///doc/license.txt"/>
// <owner name="David Srbecký" email="dsrbecky@gmail.com"/>
// <version>$Revision$</version>
// </file>
namespace Debugger.Wrappers.CorDebug
{
using System;
public enum CorDebugMDAFlags : int
{
MDA_FLAG_SLIP = 2,
}
}

28
src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/CorDebugMappingResult.cs

@ -0,0 +1,28 @@ @@ -0,0 +1,28 @@
// <file>
// <copyright see="prj:///doc/copyright.txt"/>
// <license see="prj:///doc/license.txt"/>
// <owner name="David Srbecký" email="dsrbecky@gmail.com"/>
// <version>$Revision$</version>
// </file>
namespace Debugger.Wrappers.CorDebug
{
using System;
public enum CorDebugMappingResult : int
{
MAPPING_PROLOG = 1,
MAPPING_EPILOG = 2,
MAPPING_NO_INFO = 4,
MAPPING_UNMAPPED_ADDRESS = 8,
MAPPING_EXACT = 16,
MAPPING_APPROXIMATE = 32,
}
}

128
src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/CorDebugRegister.cs

@ -0,0 +1,128 @@ @@ -0,0 +1,128 @@
// <file>
// <copyright see="prj:///doc/copyright.txt"/>
// <license see="prj:///doc/license.txt"/>
// <owner name="David Srbecký" email="dsrbecky@gmail.com"/>
// <version>$Revision$</version>
// </file>
namespace Debugger.Wrappers.CorDebug
{
using System;
public enum CorDebugRegister : int
{
REGISTER_AMD64_RIP = 0,
REGISTER_X86_EIP = 0,
REGISTER_INSTRUCTION_POINTER = 0,
REGISTER_AMD64_RSP = 1,
REGISTER_STACK_POINTER = 1,
REGISTER_X86_ESP = 1,
REGISTER_IA64_BSP = 2,
REGISTER_AMD64_RBP = 2,
REGISTER_X86_EBP = 2,
REGISTER_FRAME_POINTER = 2,
REGISTER_X86_EAX = 3,
REGISTER_IA64_R0 = 3,
REGISTER_AMD64_RAX = 3,
REGISTER_X86_ECX = 4,
REGISTER_AMD64_RCX = 4,
REGISTER_AMD64_RDX = 5,
REGISTER_X86_EDX = 5,
REGISTER_X86_EBX = 6,
REGISTER_AMD64_RBX = 6,
REGISTER_AMD64_RSI = 7,
REGISTER_X86_ESI = 7,
REGISTER_X86_EDI = 8,
REGISTER_AMD64_RDI = 8,
REGISTER_AMD64_R8 = 9,
REGISTER_X86_FPSTACK_0 = 9,
REGISTER_AMD64_R9 = 10,
REGISTER_X86_FPSTACK_1 = 10,
REGISTER_AMD64_R10 = 11,
REGISTER_X86_FPSTACK_2 = 11,
REGISTER_AMD64_R11 = 12,
REGISTER_X86_FPSTACK_3 = 12,
REGISTER_AMD64_R12 = 13,
REGISTER_X86_FPSTACK_4 = 13,
REGISTER_AMD64_R13 = 14,
REGISTER_X86_FPSTACK_5 = 14,
REGISTER_AMD64_R14 = 15,
REGISTER_X86_FPSTACK_6 = 15,
REGISTER_AMD64_R15 = 16,
REGISTER_X86_FPSTACK_7 = 16,
REGISTER_AMD64_XMM0 = 17,
REGISTER_AMD64_XMM1 = 18,
REGISTER_AMD64_XMM2 = 19,
REGISTER_AMD64_XMM3 = 20,
REGISTER_AMD64_XMM4 = 21,
REGISTER_AMD64_XMM5 = 22,
REGISTER_AMD64_XMM6 = 23,
REGISTER_AMD64_XMM7 = 24,
REGISTER_AMD64_XMM8 = 25,
REGISTER_AMD64_XMM9 = 26,
REGISTER_AMD64_XMM10 = 27,
REGISTER_AMD64_XMM11 = 28,
REGISTER_AMD64_XMM12 = 29,
REGISTER_AMD64_XMM13 = 30,
REGISTER_AMD64_XMM14 = 31,
REGISTER_AMD64_XMM15 = 32,
REGISTER_IA64_F0 = 131,
}
}

30
src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/CorDebugStepReason.cs

@ -0,0 +1,30 @@ @@ -0,0 +1,30 @@
// <file>
// <copyright see="prj:///doc/copyright.txt"/>
// <license see="prj:///doc/license.txt"/>
// <owner name="David Srbecký" email="dsrbecky@gmail.com"/>
// <version>$Revision$</version>
// </file>
namespace Debugger.Wrappers.CorDebug
{
using System;
public enum CorDebugStepReason : int
{
STEP_NORMAL = 0,
STEP_RETURN = 1,
STEP_CALL = 2,
STEP_EXCEPTION_FILTER = 3,
STEP_EXCEPTION_HANDLER = 4,
STEP_INTERCEPT = 5,
STEP_EXIT = 6,
}
}

20
src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/CorDebugThreadState.cs

@ -0,0 +1,20 @@ @@ -0,0 +1,20 @@
// <file>
// <copyright see="prj:///doc/copyright.txt"/>
// <license see="prj:///doc/license.txt"/>
// <owner name="David Srbecký" email="dsrbecky@gmail.com"/>
// <version>$Revision$</version>
// </file>
namespace Debugger.Wrappers.CorDebug
{
using System;
public enum CorDebugThreadState : int
{
THREAD_RUN = 0,
THREAD_SUSPEND = 1,
}
}

30
src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/CorDebugUnmappedStop.cs

@ -0,0 +1,30 @@ @@ -0,0 +1,30 @@
// <file>
// <copyright see="prj:///doc/copyright.txt"/>
// <license see="prj:///doc/license.txt"/>
// <owner name="David Srbecký" email="dsrbecky@gmail.com"/>
// <version>$Revision$</version>
// </file>
namespace Debugger.Wrappers.CorDebug
{
using System;
public enum CorDebugUnmappedStop : int
{
STOP_NONE = 0,
STOP_PROLOG = 1,
STOP_EPILOG = 2,
STOP_NO_MAPPING_INFO = 4,
STOP_OTHER_UNMAPPED = 8,
STOP_UNMANAGED = 16,
STOP_ALL = 65535,
}
}

32
src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/CorDebugUserState.cs

@ -0,0 +1,32 @@ @@ -0,0 +1,32 @@
// <file>
// <copyright see="prj:///doc/copyright.txt"/>
// <license see="prj:///doc/license.txt"/>
// <owner name="David Srbecký" email="dsrbecky@gmail.com"/>
// <version>$Revision$</version>
// </file>
namespace Debugger.Wrappers.CorDebug
{
using System;
public enum CorDebugUserState : int
{
USER_STOP_REQUESTED = 1,
USER_SUSPEND_REQUESTED = 2,
USER_BACKGROUND = 4,
USER_UNSTARTED = 8,
USER_STOPPED = 16,
USER_WAIT_SLEEP_JOIN = 32,
USER_SUSPENDED = 64,
USER_UNSAFE_POINT = 128,
}
}

83
src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/EmbeddedCLRCorDebug.cs

@ -0,0 +1,83 @@ @@ -0,0 +1,83 @@
// <file>
// <copyright see="prj:///doc/copyright.txt"/>
// <license see="prj:///doc/license.txt"/>
// <owner name="David Srbecký" email="dsrbecky@gmail.com"/>
// <version>$Revision$</version>
// </file>
namespace Debugger.Wrappers.CorDebug
{
using System;
public class EmbeddedCLRCorDebug
{
private Debugger.Interop.CorDebug.EmbeddedCLRCorDebug wrappedObject;
internal Debugger.Interop.CorDebug.EmbeddedCLRCorDebug WrappedObject
{
get
{
return this.wrappedObject;
}
}
public EmbeddedCLRCorDebug(Debugger.Interop.CorDebug.EmbeddedCLRCorDebug wrappedObject)
{
this.wrappedObject = wrappedObject;
}
public static EmbeddedCLRCorDebug Wrap(Debugger.Interop.CorDebug.EmbeddedCLRCorDebug objectToWrap)
{
return new EmbeddedCLRCorDebug(objectToWrap);
}
public bool Is<T>() where T: class
{
try {
CastTo<T>();
return true;
} catch {
return false;
}
}
public T As<T>() where T: class
{
try {
return CastTo<T>();
} catch {
return null;
}
}
public T CastTo<T>() where T: class
{
return (T)Activator.CreateInstance(typeof(T), this.WrappedObject);
}
public static bool operator ==(EmbeddedCLRCorDebug o1, EmbeddedCLRCorDebug o2)
{
return ((object)o1 == null && (object)o2 == null) ||
((object)o1 != null && (object)o2 != null && o1.WrappedObject == o2.WrappedObject);
}
public static bool operator !=(EmbeddedCLRCorDebug o1, EmbeddedCLRCorDebug o2)
{
return !(o1 == o2);
}
public override int GetHashCode()
{
return base.GetHashCode();
}
public override bool Equals(object o)
{
EmbeddedCLRCorDebug casted = o as EmbeddedCLRCorDebug;
return (casted != null) && (casted.WrappedObject == wrappedObject);
}
}
}

136
src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/EmbeddedCLRCorDebugClass.cs

@ -0,0 +1,136 @@ @@ -0,0 +1,136 @@
// <file>
// <copyright see="prj:///doc/copyright.txt"/>
// <license see="prj:///doc/license.txt"/>
// <owner name="David Srbecký" email="dsrbecky@gmail.com"/>
// <version>$Revision$</version>
// </file>
namespace Debugger.Wrappers.CorDebug
{
using System;
public class EmbeddedCLRCorDebugClass
{
private Debugger.Interop.CorDebug.EmbeddedCLRCorDebugClass wrappedObject;
internal Debugger.Interop.CorDebug.EmbeddedCLRCorDebugClass WrappedObject
{
get
{
return this.wrappedObject;
}
}
public EmbeddedCLRCorDebugClass(Debugger.Interop.CorDebug.EmbeddedCLRCorDebugClass wrappedObject)
{
this.wrappedObject = wrappedObject;
}
public static EmbeddedCLRCorDebugClass Wrap(Debugger.Interop.CorDebug.EmbeddedCLRCorDebugClass objectToWrap)
{
return new EmbeddedCLRCorDebugClass(objectToWrap);
}
public bool Is<T>() where T: class
{
try {
CastTo<T>();
return true;
} catch {
return false;
}
}
public T As<T>() where T: class
{
try {
return CastTo<T>();
} catch {
return null;
}
}
public T CastTo<T>() where T: class
{
return (T)Activator.CreateInstance(typeof(T), this.WrappedObject);
}
public static bool operator ==(EmbeddedCLRCorDebugClass o1, EmbeddedCLRCorDebugClass o2)
{
return ((object)o1 == null && (object)o2 == null) ||
((object)o1 != null && (object)o2 != null && o1.WrappedObject == o2.WrappedObject);
}
public static bool operator !=(EmbeddedCLRCorDebugClass o1, EmbeddedCLRCorDebugClass o2)
{
return !(o1 == o2);
}
public override int GetHashCode()
{
return base.GetHashCode();
}
public override bool Equals(object o)
{
EmbeddedCLRCorDebugClass casted = o as EmbeddedCLRCorDebugClass;
return (casted != null) && (casted.WrappedObject == wrappedObject);
}
public void CanLaunchOrAttach(uint dwProcessId, int win32DebuggingEnabled)
{
this.WrappedObject.CanLaunchOrAttach(dwProcessId, win32DebuggingEnabled);
}
public void CreateProcess(string lpApplicationName, string lpCommandLine, ref Debugger.Interop.CorDebug._SECURITY_ATTRIBUTES lpProcessAttributes, ref Debugger.Interop.CorDebug._SECURITY_ATTRIBUTES lpThreadAttributes, int bInheritHandles, uint dwCreationFlags, System.IntPtr lpEnvironment, string lpCurrentDirectory, uint lpStartupInfo, uint lpProcessInformation, CorDebugCreateProcessFlags debuggingFlags, out ICorDebugProcess ppProcess)
{
Debugger.Interop.CorDebug.ICorDebugProcess out_ppProcess;
this.WrappedObject.CreateProcess(lpApplicationName, lpCommandLine, ref lpProcessAttributes, ref lpThreadAttributes, bInheritHandles, dwCreationFlags, lpEnvironment, lpCurrentDirectory, lpStartupInfo, lpProcessInformation, ((Debugger.Interop.CorDebug.CorDebugCreateProcessFlags)(debuggingFlags)), out out_ppProcess);
ppProcess = ICorDebugProcess.Wrap(out_ppProcess);
}
public void DebugActiveProcess(uint id, int win32Attach, out ICorDebugProcess ppProcess)
{
Debugger.Interop.CorDebug.ICorDebugProcess out_ppProcess;
this.WrappedObject.DebugActiveProcess(id, win32Attach, out out_ppProcess);
ppProcess = ICorDebugProcess.Wrap(out_ppProcess);
}
public void EnumerateProcesses(out ICorDebugProcessEnum ppProcess)
{
Debugger.Interop.CorDebug.ICorDebugProcessEnum out_ppProcess;
this.WrappedObject.EnumerateProcesses(out out_ppProcess);
ppProcess = ICorDebugProcessEnum.Wrap(out_ppProcess);
}
public void GetProcess(uint dwProcessId, out ICorDebugProcess ppProcess)
{
Debugger.Interop.CorDebug.ICorDebugProcess out_ppProcess;
this.WrappedObject.GetProcess(dwProcessId, out out_ppProcess);
ppProcess = ICorDebugProcess.Wrap(out_ppProcess);
}
public void Initialize()
{
this.WrappedObject.Initialize();
}
public void SetManagedHandler(ICorDebugManagedCallback pCallback)
{
this.WrappedObject.SetManagedHandler(pCallback.WrappedObject);
}
public void SetUnmanagedHandler(ICorDebugUnmanagedCallback pCallback)
{
this.WrappedObject.SetUnmanagedHandler(pCallback.WrappedObject);
}
public void Terminate()
{
this.WrappedObject.Terminate();
}
}
}

136
src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebug.cs

@ -0,0 +1,136 @@ @@ -0,0 +1,136 @@
// <file>
// <copyright see="prj:///doc/copyright.txt"/>
// <license see="prj:///doc/license.txt"/>
// <owner name="David Srbecký" email="dsrbecky@gmail.com"/>
// <version>$Revision$</version>
// </file>
namespace Debugger.Wrappers.CorDebug
{
using System;
public class ICorDebug
{
private Debugger.Interop.CorDebug.ICorDebug wrappedObject;
internal Debugger.Interop.CorDebug.ICorDebug WrappedObject
{
get
{
return this.wrappedObject;
}
}
public ICorDebug(Debugger.Interop.CorDebug.ICorDebug wrappedObject)
{
this.wrappedObject = wrappedObject;
}
public static ICorDebug Wrap(Debugger.Interop.CorDebug.ICorDebug objectToWrap)
{
return new ICorDebug(objectToWrap);
}
public bool Is<T>() where T: class
{
try {
CastTo<T>();
return true;
} catch {
return false;
}
}
public T As<T>() where T: class
{
try {
return CastTo<T>();
} catch {
return null;
}
}
public T CastTo<T>() where T: class
{
return (T)Activator.CreateInstance(typeof(T), this.WrappedObject);
}
public static bool operator ==(ICorDebug o1, ICorDebug o2)
{
return ((object)o1 == null && (object)o2 == null) ||
((object)o1 != null && (object)o2 != null && o1.WrappedObject == o2.WrappedObject);
}
public static bool operator !=(ICorDebug o1, ICorDebug o2)
{
return !(o1 == o2);
}
public override int GetHashCode()
{
return base.GetHashCode();
}
public override bool Equals(object o)
{
ICorDebug casted = o as ICorDebug;
return (casted != null) && (casted.WrappedObject == wrappedObject);
}
public void Initialize()
{
this.WrappedObject.Initialize();
}
public void Terminate()
{
this.WrappedObject.Terminate();
}
public void SetManagedHandler(ICorDebugManagedCallback pCallback)
{
this.WrappedObject.SetManagedHandler(pCallback.WrappedObject);
}
public void SetUnmanagedHandler(ICorDebugUnmanagedCallback pCallback)
{
this.WrappedObject.SetUnmanagedHandler(pCallback.WrappedObject);
}
public void CreateProcess(string lpApplicationName, string lpCommandLine, ref Debugger.Interop.CorDebug._SECURITY_ATTRIBUTES lpProcessAttributes, ref Debugger.Interop.CorDebug._SECURITY_ATTRIBUTES lpThreadAttributes, int bInheritHandles, uint dwCreationFlags, System.IntPtr lpEnvironment, string lpCurrentDirectory, uint lpStartupInfo, uint lpProcessInformation, CorDebugCreateProcessFlags debuggingFlags, out ICorDebugProcess ppProcess)
{
Debugger.Interop.CorDebug.ICorDebugProcess out_ppProcess;
this.WrappedObject.CreateProcess(lpApplicationName, lpCommandLine, ref lpProcessAttributes, ref lpThreadAttributes, bInheritHandles, dwCreationFlags, lpEnvironment, lpCurrentDirectory, lpStartupInfo, lpProcessInformation, ((Debugger.Interop.CorDebug.CorDebugCreateProcessFlags)(debuggingFlags)), out out_ppProcess);
ppProcess = ICorDebugProcess.Wrap(out_ppProcess);
}
public void DebugActiveProcess(uint id, int win32Attach, out ICorDebugProcess ppProcess)
{
Debugger.Interop.CorDebug.ICorDebugProcess out_ppProcess;
this.WrappedObject.DebugActiveProcess(id, win32Attach, out out_ppProcess);
ppProcess = ICorDebugProcess.Wrap(out_ppProcess);
}
public void EnumerateProcesses(out ICorDebugProcessEnum ppProcess)
{
Debugger.Interop.CorDebug.ICorDebugProcessEnum out_ppProcess;
this.WrappedObject.EnumerateProcesses(out out_ppProcess);
ppProcess = ICorDebugProcessEnum.Wrap(out_ppProcess);
}
public void GetProcess(uint dwProcessId, out ICorDebugProcess ppProcess)
{
Debugger.Interop.CorDebug.ICorDebugProcess out_ppProcess;
this.WrappedObject.GetProcess(dwProcessId, out out_ppProcess);
ppProcess = ICorDebugProcess.Wrap(out_ppProcess);
}
public void CanLaunchOrAttach(uint dwProcessId, int win32DebuggingEnabled)
{
this.WrappedObject.CanLaunchOrAttach(dwProcessId, win32DebuggingEnabled);
}
}
}

205
src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugAppDomain.cs

@ -0,0 +1,205 @@ @@ -0,0 +1,205 @@
// <file>
// <copyright see="prj:///doc/copyright.txt"/>
// <license see="prj:///doc/license.txt"/>
// <owner name="David Srbecký" email="dsrbecky@gmail.com"/>
// <version>$Revision$</version>
// </file>
namespace Debugger.Wrappers.CorDebug
{
using System;
public class ICorDebugAppDomain
{
private Debugger.Interop.CorDebug.ICorDebugAppDomain wrappedObject;
internal Debugger.Interop.CorDebug.ICorDebugAppDomain WrappedObject
{
get
{
return this.wrappedObject;
}
}
public ICorDebugAppDomain(Debugger.Interop.CorDebug.ICorDebugAppDomain wrappedObject)
{
this.wrappedObject = wrappedObject;
}
public static ICorDebugAppDomain Wrap(Debugger.Interop.CorDebug.ICorDebugAppDomain objectToWrap)
{
return new ICorDebugAppDomain(objectToWrap);
}
public bool Is<T>() where T: class
{
try {
CastTo<T>();
return true;
} catch {
return false;
}
}
public T As<T>() where T: class
{
try {
return CastTo<T>();
} catch {
return null;
}
}
public T CastTo<T>() where T: class
{
return (T)Activator.CreateInstance(typeof(T), this.WrappedObject);
}
public static bool operator ==(ICorDebugAppDomain o1, ICorDebugAppDomain o2)
{
return ((object)o1 == null && (object)o2 == null) ||
((object)o1 != null && (object)o2 != null && o1.WrappedObject == o2.WrappedObject);
}
public static bool operator !=(ICorDebugAppDomain o1, ICorDebugAppDomain o2)
{
return !(o1 == o2);
}
public override int GetHashCode()
{
return base.GetHashCode();
}
public override bool Equals(object o)
{
ICorDebugAppDomain casted = o as ICorDebugAppDomain;
return (casted != null) && (casted.WrappedObject == wrappedObject);
}
public void Stop(uint dwTimeoutIgnored)
{
this.WrappedObject.Stop(dwTimeoutIgnored);
}
public void Continue(int fIsOutOfBand)
{
this.WrappedObject.Continue(fIsOutOfBand);
}
public void IsRunning(out int pbRunning)
{
this.WrappedObject.IsRunning(out pbRunning);
}
public void HasQueuedCallbacks(ICorDebugThread pThread, out int pbQueued)
{
this.WrappedObject.HasQueuedCallbacks(pThread.WrappedObject, out pbQueued);
}
public void EnumerateThreads(out ICorDebugThreadEnum ppThreads)
{
Debugger.Interop.CorDebug.ICorDebugThreadEnum out_ppThreads;
this.WrappedObject.EnumerateThreads(out out_ppThreads);
ppThreads = ICorDebugThreadEnum.Wrap(out_ppThreads);
}
public void SetAllThreadsDebugState(CorDebugThreadState state, ICorDebugThread pExceptThisThread)
{
this.WrappedObject.SetAllThreadsDebugState(((Debugger.Interop.CorDebug.CorDebugThreadState)(state)), pExceptThisThread.WrappedObject);
}
public void Detach()
{
this.WrappedObject.Detach();
}
public void Terminate(uint exitCode)
{
this.WrappedObject.Terminate(exitCode);
}
public void CanCommitChanges(uint cSnapshots, ref ICorDebugEditAndContinueSnapshot pSnapshots, out ICorDebugErrorInfoEnum pError)
{
Debugger.Interop.CorDebug.ICorDebugEditAndContinueSnapshot ref_pSnapshots = pSnapshots.WrappedObject;
Debugger.Interop.CorDebug.ICorDebugErrorInfoEnum out_pError;
this.WrappedObject.CanCommitChanges(cSnapshots, ref ref_pSnapshots, out out_pError);
pSnapshots = ICorDebugEditAndContinueSnapshot.Wrap(ref_pSnapshots);
pError = ICorDebugErrorInfoEnum.Wrap(out_pError);
}
public void CommitChanges(uint cSnapshots, ref ICorDebugEditAndContinueSnapshot pSnapshots, out ICorDebugErrorInfoEnum pError)
{
Debugger.Interop.CorDebug.ICorDebugEditAndContinueSnapshot ref_pSnapshots = pSnapshots.WrappedObject;
Debugger.Interop.CorDebug.ICorDebugErrorInfoEnum out_pError;
this.WrappedObject.CommitChanges(cSnapshots, ref ref_pSnapshots, out out_pError);
pSnapshots = ICorDebugEditAndContinueSnapshot.Wrap(ref_pSnapshots);
pError = ICorDebugErrorInfoEnum.Wrap(out_pError);
}
public void GetProcess(out ICorDebugProcess ppProcess)
{
Debugger.Interop.CorDebug.ICorDebugProcess out_ppProcess;
this.WrappedObject.GetProcess(out out_ppProcess);
ppProcess = ICorDebugProcess.Wrap(out_ppProcess);
}
public void EnumerateAssemblies(out ICorDebugAssemblyEnum ppAssemblies)
{
Debugger.Interop.CorDebug.ICorDebugAssemblyEnum out_ppAssemblies;
this.WrappedObject.EnumerateAssemblies(out out_ppAssemblies);
ppAssemblies = ICorDebugAssemblyEnum.Wrap(out_ppAssemblies);
}
public void GetModuleFromMetaDataInterface(object pIMetaData, out ICorDebugModule ppModule)
{
Debugger.Interop.CorDebug.ICorDebugModule out_ppModule;
this.WrappedObject.GetModuleFromMetaDataInterface(pIMetaData, out out_ppModule);
ppModule = ICorDebugModule.Wrap(out_ppModule);
}
public void EnumerateBreakpoints(out ICorDebugBreakpointEnum ppBreakpoints)
{
Debugger.Interop.CorDebug.ICorDebugBreakpointEnum out_ppBreakpoints;
this.WrappedObject.EnumerateBreakpoints(out out_ppBreakpoints);
ppBreakpoints = ICorDebugBreakpointEnum.Wrap(out_ppBreakpoints);
}
public void EnumerateSteppers(out ICorDebugStepperEnum ppSteppers)
{
Debugger.Interop.CorDebug.ICorDebugStepperEnum out_ppSteppers;
this.WrappedObject.EnumerateSteppers(out out_ppSteppers);
ppSteppers = ICorDebugStepperEnum.Wrap(out_ppSteppers);
}
public void IsAttached(out int pbAttached)
{
this.WrappedObject.IsAttached(out pbAttached);
}
public void GetName(uint cchName, out uint pcchName, System.IntPtr szName)
{
this.WrappedObject.GetName(cchName, out pcchName, szName);
}
public void GetObject(out ICorDebugValue ppObject)
{
Debugger.Interop.CorDebug.ICorDebugValue out_ppObject;
this.WrappedObject.GetObject(out out_ppObject);
ppObject = ICorDebugValue.Wrap(out_ppObject);
}
public void Attach()
{
this.WrappedObject.Attach();
}
public void GetID(out uint pId)
{
this.WrappedObject.GetID(out pId);
}
}
}

99
src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugAppDomain2.cs

@ -0,0 +1,99 @@ @@ -0,0 +1,99 @@
// <file>
// <copyright see="prj:///doc/copyright.txt"/>
// <license see="prj:///doc/license.txt"/>
// <owner name="David Srbecký" email="dsrbecky@gmail.com"/>
// <version>$Revision$</version>
// </file>
namespace Debugger.Wrappers.CorDebug
{
using System;
public class ICorDebugAppDomain2
{
private Debugger.Interop.CorDebug.ICorDebugAppDomain2 wrappedObject;
internal Debugger.Interop.CorDebug.ICorDebugAppDomain2 WrappedObject
{
get
{
return this.wrappedObject;
}
}
public ICorDebugAppDomain2(Debugger.Interop.CorDebug.ICorDebugAppDomain2 wrappedObject)
{
this.wrappedObject = wrappedObject;
}
public static ICorDebugAppDomain2 Wrap(Debugger.Interop.CorDebug.ICorDebugAppDomain2 objectToWrap)
{
return new ICorDebugAppDomain2(objectToWrap);
}
public bool Is<T>() where T: class
{
try {
CastTo<T>();
return true;
} catch {
return false;
}
}
public T As<T>() where T: class
{
try {
return CastTo<T>();
} catch {
return null;
}
}
public T CastTo<T>() where T: class
{
return (T)Activator.CreateInstance(typeof(T), this.WrappedObject);
}
public static bool operator ==(ICorDebugAppDomain2 o1, ICorDebugAppDomain2 o2)
{
return ((object)o1 == null && (object)o2 == null) ||
((object)o1 != null && (object)o2 != null && o1.WrappedObject == o2.WrappedObject);
}
public static bool operator !=(ICorDebugAppDomain2 o1, ICorDebugAppDomain2 o2)
{
return !(o1 == o2);
}
public override int GetHashCode()
{
return base.GetHashCode();
}
public override bool Equals(object o)
{
ICorDebugAppDomain2 casted = o as ICorDebugAppDomain2;
return (casted != null) && (casted.WrappedObject == wrappedObject);
}
public void GetArrayOrPointerType(uint elementType, uint nRank, ICorDebugType pTypeArg, out ICorDebugType ppType)
{
Debugger.Interop.CorDebug.ICorDebugType out_ppType;
this.WrappedObject.GetArrayOrPointerType(elementType, nRank, pTypeArg.WrappedObject, out out_ppType);
ppType = ICorDebugType.Wrap(out_ppType);
}
public void GetFunctionPointerType(uint nTypeArgs, ref ICorDebugType ppTypeArgs, out ICorDebugType ppType)
{
Debugger.Interop.CorDebug.ICorDebugType ref_ppTypeArgs = ppTypeArgs.WrappedObject;
Debugger.Interop.CorDebug.ICorDebugType out_ppType;
this.WrappedObject.GetFunctionPointerType(nTypeArgs, ref ref_ppTypeArgs, out out_ppType);
ppTypeArgs = ICorDebugType.Wrap(ref_ppTypeArgs);
ppType = ICorDebugType.Wrap(out_ppType);
}
}
}

110
src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugAppDomainEnum.cs

@ -0,0 +1,110 @@ @@ -0,0 +1,110 @@
// <file>
// <copyright see="prj:///doc/copyright.txt"/>
// <license see="prj:///doc/license.txt"/>
// <owner name="David Srbecký" email="dsrbecky@gmail.com"/>
// <version>$Revision$</version>
// </file>
namespace Debugger.Wrappers.CorDebug
{
using System;
public class ICorDebugAppDomainEnum
{
private Debugger.Interop.CorDebug.ICorDebugAppDomainEnum wrappedObject;
internal Debugger.Interop.CorDebug.ICorDebugAppDomainEnum WrappedObject
{
get
{
return this.wrappedObject;
}
}
public ICorDebugAppDomainEnum(Debugger.Interop.CorDebug.ICorDebugAppDomainEnum wrappedObject)
{
this.wrappedObject = wrappedObject;
}
public static ICorDebugAppDomainEnum Wrap(Debugger.Interop.CorDebug.ICorDebugAppDomainEnum objectToWrap)
{
return new ICorDebugAppDomainEnum(objectToWrap);
}
public bool Is<T>() where T: class
{
try {
CastTo<T>();
return true;
} catch {
return false;
}
}
public T As<T>() where T: class
{
try {
return CastTo<T>();
} catch {
return null;
}
}
public T CastTo<T>() where T: class
{
return (T)Activator.CreateInstance(typeof(T), this.WrappedObject);
}
public static bool operator ==(ICorDebugAppDomainEnum o1, ICorDebugAppDomainEnum o2)
{
return ((object)o1 == null && (object)o2 == null) ||
((object)o1 != null && (object)o2 != null && o1.WrappedObject == o2.WrappedObject);
}
public static bool operator !=(ICorDebugAppDomainEnum o1, ICorDebugAppDomainEnum o2)
{
return !(o1 == o2);
}
public override int GetHashCode()
{
return base.GetHashCode();
}
public override bool Equals(object o)
{
ICorDebugAppDomainEnum casted = o as ICorDebugAppDomainEnum;
return (casted != null) && (casted.WrappedObject == wrappedObject);
}
public void Skip(uint celt)
{
this.WrappedObject.Skip(celt);
}
public void Reset()
{
this.WrappedObject.Reset();
}
public void Clone(out ICorDebugEnum ppEnum)
{
Debugger.Interop.CorDebug.ICorDebugEnum out_ppEnum;
this.WrappedObject.Clone(out out_ppEnum);
ppEnum = ICorDebugEnum.Wrap(out_ppEnum);
}
public void GetCount(out uint pcelt)
{
this.WrappedObject.GetCount(out pcelt);
}
public void Next(uint celt, System.IntPtr values, out uint pceltFetched)
{
this.WrappedObject.Next(celt, values, out pceltFetched);
}
}
}

161
src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugArrayValue.cs

@ -0,0 +1,161 @@ @@ -0,0 +1,161 @@
// <file>
// <copyright see="prj:///doc/copyright.txt"/>
// <license see="prj:///doc/license.txt"/>
// <owner name="David Srbecký" email="dsrbecky@gmail.com"/>
// <version>$Revision$</version>
// </file>
namespace Debugger.Wrappers.CorDebug
{
using System;
public class ICorDebugArrayValue
{
private Debugger.Interop.CorDebug.ICorDebugArrayValue wrappedObject;
internal Debugger.Interop.CorDebug.ICorDebugArrayValue WrappedObject
{
get
{
return this.wrappedObject;
}
}
public ICorDebugArrayValue(Debugger.Interop.CorDebug.ICorDebugArrayValue wrappedObject)
{
this.wrappedObject = wrappedObject;
}
public static ICorDebugArrayValue Wrap(Debugger.Interop.CorDebug.ICorDebugArrayValue objectToWrap)
{
return new ICorDebugArrayValue(objectToWrap);
}
public bool Is<T>() where T: class
{
try {
CastTo<T>();
return true;
} catch {
return false;
}
}
public T As<T>() where T: class
{
try {
return CastTo<T>();
} catch {
return null;
}
}
public T CastTo<T>() where T: class
{
return (T)Activator.CreateInstance(typeof(T), this.WrappedObject);
}
public static bool operator ==(ICorDebugArrayValue o1, ICorDebugArrayValue o2)
{
return ((object)o1 == null && (object)o2 == null) ||
((object)o1 != null && (object)o2 != null && o1.WrappedObject == o2.WrappedObject);
}
public static bool operator !=(ICorDebugArrayValue o1, ICorDebugArrayValue o2)
{
return !(o1 == o2);
}
public override int GetHashCode()
{
return base.GetHashCode();
}
public override bool Equals(object o)
{
ICorDebugArrayValue casted = o as ICorDebugArrayValue;
return (casted != null) && (casted.WrappedObject == wrappedObject);
}
public void GetType(out uint pType)
{
this.WrappedObject.GetType(out pType);
}
public void GetSize(out uint pSize)
{
this.WrappedObject.GetSize(out pSize);
}
public void GetAddress(out ulong pAddress)
{
this.WrappedObject.GetAddress(out pAddress);
}
public void CreateBreakpoint(out ICorDebugValueBreakpoint ppBreakpoint)
{
Debugger.Interop.CorDebug.ICorDebugValueBreakpoint out_ppBreakpoint;
this.WrappedObject.CreateBreakpoint(out out_ppBreakpoint);
ppBreakpoint = ICorDebugValueBreakpoint.Wrap(out_ppBreakpoint);
}
public void IsValid(out int pbValid)
{
this.WrappedObject.IsValid(out pbValid);
}
public void CreateRelocBreakpoint(out ICorDebugValueBreakpoint ppBreakpoint)
{
Debugger.Interop.CorDebug.ICorDebugValueBreakpoint out_ppBreakpoint;
this.WrappedObject.CreateRelocBreakpoint(out out_ppBreakpoint);
ppBreakpoint = ICorDebugValueBreakpoint.Wrap(out_ppBreakpoint);
}
public void GetElementType(out uint pType)
{
this.WrappedObject.GetElementType(out pType);
}
public void GetRank(out uint pnRank)
{
this.WrappedObject.GetRank(out pnRank);
}
public void GetCount(out uint pnCount)
{
this.WrappedObject.GetCount(out pnCount);
}
public void GetDimensions(uint cdim, System.IntPtr dims)
{
this.WrappedObject.GetDimensions(cdim, dims);
}
public void HasBaseIndicies(out int pbHasBaseIndicies)
{
this.WrappedObject.HasBaseIndicies(out pbHasBaseIndicies);
}
public void GetBaseIndicies(uint cdim, System.IntPtr indicies)
{
this.WrappedObject.GetBaseIndicies(cdim, indicies);
}
public void GetElement(uint cdim, System.IntPtr indices, out ICorDebugValue ppValue)
{
Debugger.Interop.CorDebug.ICorDebugValue out_ppValue;
this.WrappedObject.GetElement(cdim, indices, out out_ppValue);
ppValue = ICorDebugValue.Wrap(out_ppValue);
}
public void GetElementAtPosition(uint nPosition, out ICorDebugValue ppValue)
{
Debugger.Interop.CorDebug.ICorDebugValue out_ppValue;
this.WrappedObject.GetElementAtPosition(nPosition, out out_ppValue);
ppValue = ICorDebugValue.Wrap(out_ppValue);
}
}
}

114
src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugAssembly.cs

@ -0,0 +1,114 @@ @@ -0,0 +1,114 @@
// <file>
// <copyright see="prj:///doc/copyright.txt"/>
// <license see="prj:///doc/license.txt"/>
// <owner name="David Srbecký" email="dsrbecky@gmail.com"/>
// <version>$Revision$</version>
// </file>
namespace Debugger.Wrappers.CorDebug
{
using System;
public class ICorDebugAssembly
{
private Debugger.Interop.CorDebug.ICorDebugAssembly wrappedObject;
internal Debugger.Interop.CorDebug.ICorDebugAssembly WrappedObject
{
get
{
return this.wrappedObject;
}
}
public ICorDebugAssembly(Debugger.Interop.CorDebug.ICorDebugAssembly wrappedObject)
{
this.wrappedObject = wrappedObject;
}
public static ICorDebugAssembly Wrap(Debugger.Interop.CorDebug.ICorDebugAssembly objectToWrap)
{
return new ICorDebugAssembly(objectToWrap);
}
public bool Is<T>() where T: class
{
try {
CastTo<T>();
return true;
} catch {
return false;
}
}
public T As<T>() where T: class
{
try {
return CastTo<T>();
} catch {
return null;
}
}
public T CastTo<T>() where T: class
{
return (T)Activator.CreateInstance(typeof(T), this.WrappedObject);
}
public static bool operator ==(ICorDebugAssembly o1, ICorDebugAssembly o2)
{
return ((object)o1 == null && (object)o2 == null) ||
((object)o1 != null && (object)o2 != null && o1.WrappedObject == o2.WrappedObject);
}
public static bool operator !=(ICorDebugAssembly o1, ICorDebugAssembly o2)
{
return !(o1 == o2);
}
public override int GetHashCode()
{
return base.GetHashCode();
}
public override bool Equals(object o)
{
ICorDebugAssembly casted = o as ICorDebugAssembly;
return (casted != null) && (casted.WrappedObject == wrappedObject);
}
public void GetProcess(out ICorDebugProcess ppProcess)
{
Debugger.Interop.CorDebug.ICorDebugProcess out_ppProcess;
this.WrappedObject.GetProcess(out out_ppProcess);
ppProcess = ICorDebugProcess.Wrap(out_ppProcess);
}
public void GetAppDomain(out ICorDebugAppDomain ppAppDomain)
{
Debugger.Interop.CorDebug.ICorDebugAppDomain out_ppAppDomain;
this.WrappedObject.GetAppDomain(out out_ppAppDomain);
ppAppDomain = ICorDebugAppDomain.Wrap(out_ppAppDomain);
}
public void EnumerateModules(out ICorDebugModuleEnum ppModules)
{
Debugger.Interop.CorDebug.ICorDebugModuleEnum out_ppModules;
this.WrappedObject.EnumerateModules(out out_ppModules);
ppModules = ICorDebugModuleEnum.Wrap(out_ppModules);
}
public void GetCodeBase(uint cchName, out uint pcchName, System.IntPtr szName)
{
this.WrappedObject.GetCodeBase(cchName, out pcchName, szName);
}
public void GetName(uint cchName, out uint pcchName, System.IntPtr szName)
{
this.WrappedObject.GetName(cchName, out pcchName, szName);
}
}
}

110
src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugAssemblyEnum.cs

@ -0,0 +1,110 @@ @@ -0,0 +1,110 @@
// <file>
// <copyright see="prj:///doc/copyright.txt"/>
// <license see="prj:///doc/license.txt"/>
// <owner name="David Srbecký" email="dsrbecky@gmail.com"/>
// <version>$Revision$</version>
// </file>
namespace Debugger.Wrappers.CorDebug
{
using System;
public class ICorDebugAssemblyEnum
{
private Debugger.Interop.CorDebug.ICorDebugAssemblyEnum wrappedObject;
internal Debugger.Interop.CorDebug.ICorDebugAssemblyEnum WrappedObject
{
get
{
return this.wrappedObject;
}
}
public ICorDebugAssemblyEnum(Debugger.Interop.CorDebug.ICorDebugAssemblyEnum wrappedObject)
{
this.wrappedObject = wrappedObject;
}
public static ICorDebugAssemblyEnum Wrap(Debugger.Interop.CorDebug.ICorDebugAssemblyEnum objectToWrap)
{
return new ICorDebugAssemblyEnum(objectToWrap);
}
public bool Is<T>() where T: class
{
try {
CastTo<T>();
return true;
} catch {
return false;
}
}
public T As<T>() where T: class
{
try {
return CastTo<T>();
} catch {
return null;
}
}
public T CastTo<T>() where T: class
{
return (T)Activator.CreateInstance(typeof(T), this.WrappedObject);
}
public static bool operator ==(ICorDebugAssemblyEnum o1, ICorDebugAssemblyEnum o2)
{
return ((object)o1 == null && (object)o2 == null) ||
((object)o1 != null && (object)o2 != null && o1.WrappedObject == o2.WrappedObject);
}
public static bool operator !=(ICorDebugAssemblyEnum o1, ICorDebugAssemblyEnum o2)
{
return !(o1 == o2);
}
public override int GetHashCode()
{
return base.GetHashCode();
}
public override bool Equals(object o)
{
ICorDebugAssemblyEnum casted = o as ICorDebugAssemblyEnum;
return (casted != null) && (casted.WrappedObject == wrappedObject);
}
public void Skip(uint celt)
{
this.WrappedObject.Skip(celt);
}
public void Reset()
{
this.WrappedObject.Reset();
}
public void Clone(out ICorDebugEnum ppEnum)
{
Debugger.Interop.CorDebug.ICorDebugEnum out_ppEnum;
this.WrappedObject.Clone(out out_ppEnum);
ppEnum = ICorDebugEnum.Wrap(out_ppEnum);
}
public void GetCount(out uint pcelt)
{
this.WrappedObject.GetCount(out pcelt);
}
public void Next(uint celt, System.IntPtr values, out uint pceltFetched)
{
this.WrappedObject.Next(celt, values, out pceltFetched);
}
}
}

124
src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugBoxValue.cs

@ -0,0 +1,124 @@ @@ -0,0 +1,124 @@
// <file>
// <copyright see="prj:///doc/copyright.txt"/>
// <license see="prj:///doc/license.txt"/>
// <owner name="David Srbecký" email="dsrbecky@gmail.com"/>
// <version>$Revision$</version>
// </file>
namespace Debugger.Wrappers.CorDebug
{
using System;
public class ICorDebugBoxValue
{
private Debugger.Interop.CorDebug.ICorDebugBoxValue wrappedObject;
internal Debugger.Interop.CorDebug.ICorDebugBoxValue WrappedObject
{
get
{
return this.wrappedObject;
}
}
public ICorDebugBoxValue(Debugger.Interop.CorDebug.ICorDebugBoxValue wrappedObject)
{
this.wrappedObject = wrappedObject;
}
public static ICorDebugBoxValue Wrap(Debugger.Interop.CorDebug.ICorDebugBoxValue objectToWrap)
{
return new ICorDebugBoxValue(objectToWrap);
}
public bool Is<T>() where T: class
{
try {
CastTo<T>();
return true;
} catch {
return false;
}
}
public T As<T>() where T: class
{
try {
return CastTo<T>();
} catch {
return null;
}
}
public T CastTo<T>() where T: class
{
return (T)Activator.CreateInstance(typeof(T), this.WrappedObject);
}
public static bool operator ==(ICorDebugBoxValue o1, ICorDebugBoxValue o2)
{
return ((object)o1 == null && (object)o2 == null) ||
((object)o1 != null && (object)o2 != null && o1.WrappedObject == o2.WrappedObject);
}
public static bool operator !=(ICorDebugBoxValue o1, ICorDebugBoxValue o2)
{
return !(o1 == o2);
}
public override int GetHashCode()
{
return base.GetHashCode();
}
public override bool Equals(object o)
{
ICorDebugBoxValue casted = o as ICorDebugBoxValue;
return (casted != null) && (casted.WrappedObject == wrappedObject);
}
public void GetType(out uint pType)
{
this.WrappedObject.GetType(out pType);
}
public void GetSize(out uint pSize)
{
this.WrappedObject.GetSize(out pSize);
}
public void GetAddress(out ulong pAddress)
{
this.WrappedObject.GetAddress(out pAddress);
}
public void CreateBreakpoint(out ICorDebugValueBreakpoint ppBreakpoint)
{
Debugger.Interop.CorDebug.ICorDebugValueBreakpoint out_ppBreakpoint;
this.WrappedObject.CreateBreakpoint(out out_ppBreakpoint);
ppBreakpoint = ICorDebugValueBreakpoint.Wrap(out_ppBreakpoint);
}
public void IsValid(out int pbValid)
{
this.WrappedObject.IsValid(out pbValid);
}
public void CreateRelocBreakpoint(out ICorDebugValueBreakpoint ppBreakpoint)
{
Debugger.Interop.CorDebug.ICorDebugValueBreakpoint out_ppBreakpoint;
this.WrappedObject.CreateRelocBreakpoint(out out_ppBreakpoint);
ppBreakpoint = ICorDebugValueBreakpoint.Wrap(out_ppBreakpoint);
}
public void GetObject(out ICorDebugObjectValue ppObject)
{
Debugger.Interop.CorDebug.ICorDebugObjectValue out_ppObject;
this.WrappedObject.GetObject(out out_ppObject);
ppObject = ICorDebugObjectValue.Wrap(out_ppObject);
}
}
}

93
src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugBreakpoint.cs

@ -0,0 +1,93 @@ @@ -0,0 +1,93 @@
// <file>
// <copyright see="prj:///doc/copyright.txt"/>
// <license see="prj:///doc/license.txt"/>
// <owner name="David Srbecký" email="dsrbecky@gmail.com"/>
// <version>$Revision$</version>
// </file>
namespace Debugger.Wrappers.CorDebug
{
using System;
public class ICorDebugBreakpoint
{
private Debugger.Interop.CorDebug.ICorDebugBreakpoint wrappedObject;
internal Debugger.Interop.CorDebug.ICorDebugBreakpoint WrappedObject
{
get
{
return this.wrappedObject;
}
}
public ICorDebugBreakpoint(Debugger.Interop.CorDebug.ICorDebugBreakpoint wrappedObject)
{
this.wrappedObject = wrappedObject;
}
public static ICorDebugBreakpoint Wrap(Debugger.Interop.CorDebug.ICorDebugBreakpoint objectToWrap)
{
return new ICorDebugBreakpoint(objectToWrap);
}
public bool Is<T>() where T: class
{
try {
CastTo<T>();
return true;
} catch {
return false;
}
}
public T As<T>() where T: class
{
try {
return CastTo<T>();
} catch {
return null;
}
}
public T CastTo<T>() where T: class
{
return (T)Activator.CreateInstance(typeof(T), this.WrappedObject);
}
public static bool operator ==(ICorDebugBreakpoint o1, ICorDebugBreakpoint o2)
{
return ((object)o1 == null && (object)o2 == null) ||
((object)o1 != null && (object)o2 != null && o1.WrappedObject == o2.WrappedObject);
}
public static bool operator !=(ICorDebugBreakpoint o1, ICorDebugBreakpoint o2)
{
return !(o1 == o2);
}
public override int GetHashCode()
{
return base.GetHashCode();
}
public override bool Equals(object o)
{
ICorDebugBreakpoint casted = o as ICorDebugBreakpoint;
return (casted != null) && (casted.WrappedObject == wrappedObject);
}
public void Activate(int bActive)
{
this.WrappedObject.Activate(bActive);
}
public void IsActive(out int pbActive)
{
this.WrappedObject.IsActive(out pbActive);
}
}
}

110
src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugBreakpointEnum.cs

@ -0,0 +1,110 @@ @@ -0,0 +1,110 @@
// <file>
// <copyright see="prj:///doc/copyright.txt"/>
// <license see="prj:///doc/license.txt"/>
// <owner name="David Srbecký" email="dsrbecky@gmail.com"/>
// <version>$Revision$</version>
// </file>
namespace Debugger.Wrappers.CorDebug
{
using System;
public class ICorDebugBreakpointEnum
{
private Debugger.Interop.CorDebug.ICorDebugBreakpointEnum wrappedObject;
internal Debugger.Interop.CorDebug.ICorDebugBreakpointEnum WrappedObject
{
get
{
return this.wrappedObject;
}
}
public ICorDebugBreakpointEnum(Debugger.Interop.CorDebug.ICorDebugBreakpointEnum wrappedObject)
{
this.wrappedObject = wrappedObject;
}
public static ICorDebugBreakpointEnum Wrap(Debugger.Interop.CorDebug.ICorDebugBreakpointEnum objectToWrap)
{
return new ICorDebugBreakpointEnum(objectToWrap);
}
public bool Is<T>() where T: class
{
try {
CastTo<T>();
return true;
} catch {
return false;
}
}
public T As<T>() where T: class
{
try {
return CastTo<T>();
} catch {
return null;
}
}
public T CastTo<T>() where T: class
{
return (T)Activator.CreateInstance(typeof(T), this.WrappedObject);
}
public static bool operator ==(ICorDebugBreakpointEnum o1, ICorDebugBreakpointEnum o2)
{
return ((object)o1 == null && (object)o2 == null) ||
((object)o1 != null && (object)o2 != null && o1.WrappedObject == o2.WrappedObject);
}
public static bool operator !=(ICorDebugBreakpointEnum o1, ICorDebugBreakpointEnum o2)
{
return !(o1 == o2);
}
public override int GetHashCode()
{
return base.GetHashCode();
}
public override bool Equals(object o)
{
ICorDebugBreakpointEnum casted = o as ICorDebugBreakpointEnum;
return (casted != null) && (casted.WrappedObject == wrappedObject);
}
public void Skip(uint celt)
{
this.WrappedObject.Skip(celt);
}
public void Reset()
{
this.WrappedObject.Reset();
}
public void Clone(out ICorDebugEnum ppEnum)
{
Debugger.Interop.CorDebug.ICorDebugEnum out_ppEnum;
this.WrappedObject.Clone(out out_ppEnum);
ppEnum = ICorDebugEnum.Wrap(out_ppEnum);
}
public void GetCount(out uint pcelt)
{
this.WrappedObject.GetCount(out pcelt);
}
public void Next(uint celt, System.IntPtr breakpoints, out uint pceltFetched)
{
this.WrappedObject.Next(celt, breakpoints, out pceltFetched);
}
}
}

163
src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugChain.cs

@ -0,0 +1,163 @@ @@ -0,0 +1,163 @@
// <file>
// <copyright see="prj:///doc/copyright.txt"/>
// <license see="prj:///doc/license.txt"/>
// <owner name="David Srbecký" email="dsrbecky@gmail.com"/>
// <version>$Revision$</version>
// </file>
namespace Debugger.Wrappers.CorDebug
{
using System;
public class ICorDebugChain
{
private Debugger.Interop.CorDebug.ICorDebugChain wrappedObject;
internal Debugger.Interop.CorDebug.ICorDebugChain WrappedObject
{
get
{
return this.wrappedObject;
}
}
public ICorDebugChain(Debugger.Interop.CorDebug.ICorDebugChain wrappedObject)
{
this.wrappedObject = wrappedObject;
}
public static ICorDebugChain Wrap(Debugger.Interop.CorDebug.ICorDebugChain objectToWrap)
{
return new ICorDebugChain(objectToWrap);
}
public bool Is<T>() where T: class
{
try {
CastTo<T>();
return true;
} catch {
return false;
}
}
public T As<T>() where T: class
{
try {
return CastTo<T>();
} catch {
return null;
}
}
public T CastTo<T>() where T: class
{
return (T)Activator.CreateInstance(typeof(T), this.WrappedObject);
}
public static bool operator ==(ICorDebugChain o1, ICorDebugChain o2)
{
return ((object)o1 == null && (object)o2 == null) ||
((object)o1 != null && (object)o2 != null && o1.WrappedObject == o2.WrappedObject);
}
public static bool operator !=(ICorDebugChain o1, ICorDebugChain o2)
{
return !(o1 == o2);
}
public override int GetHashCode()
{
return base.GetHashCode();
}
public override bool Equals(object o)
{
ICorDebugChain casted = o as ICorDebugChain;
return (casted != null) && (casted.WrappedObject == wrappedObject);
}
public void GetThread(out ICorDebugThread ppThread)
{
Debugger.Interop.CorDebug.ICorDebugThread out_ppThread;
this.WrappedObject.GetThread(out out_ppThread);
ppThread = ICorDebugThread.Wrap(out_ppThread);
}
public void GetStackRange(out ulong pStart, out ulong pEnd)
{
this.WrappedObject.GetStackRange(out pStart, out pEnd);
}
public void GetContext(out ICorDebugContext ppContext)
{
Debugger.Interop.CorDebug.ICorDebugContext out_ppContext;
this.WrappedObject.GetContext(out out_ppContext);
ppContext = ICorDebugContext.Wrap(out_ppContext);
}
public void GetCaller(out ICorDebugChain ppChain)
{
Debugger.Interop.CorDebug.ICorDebugChain out_ppChain;
this.WrappedObject.GetCaller(out out_ppChain);
ppChain = ICorDebugChain.Wrap(out_ppChain);
}
public void GetCallee(out ICorDebugChain ppChain)
{
Debugger.Interop.CorDebug.ICorDebugChain out_ppChain;
this.WrappedObject.GetCallee(out out_ppChain);
ppChain = ICorDebugChain.Wrap(out_ppChain);
}
public void GetPrevious(out ICorDebugChain ppChain)
{
Debugger.Interop.CorDebug.ICorDebugChain out_ppChain;
this.WrappedObject.GetPrevious(out out_ppChain);
ppChain = ICorDebugChain.Wrap(out_ppChain);
}
public void GetNext(out ICorDebugChain ppChain)
{
Debugger.Interop.CorDebug.ICorDebugChain out_ppChain;
this.WrappedObject.GetNext(out out_ppChain);
ppChain = ICorDebugChain.Wrap(out_ppChain);
}
public void IsManaged(out int pManaged)
{
this.WrappedObject.IsManaged(out pManaged);
}
public void EnumerateFrames(out ICorDebugFrameEnum ppFrames)
{
Debugger.Interop.CorDebug.ICorDebugFrameEnum out_ppFrames;
this.WrappedObject.EnumerateFrames(out out_ppFrames);
ppFrames = ICorDebugFrameEnum.Wrap(out_ppFrames);
}
public void GetActiveFrame(out ICorDebugFrame ppFrame)
{
Debugger.Interop.CorDebug.ICorDebugFrame out_ppFrame;
this.WrappedObject.GetActiveFrame(out out_ppFrame);
ppFrame = ICorDebugFrame.Wrap(out_ppFrame);
}
public void GetRegisterSet(out ICorDebugRegisterSet ppRegisters)
{
Debugger.Interop.CorDebug.ICorDebugRegisterSet out_ppRegisters;
this.WrappedObject.GetRegisterSet(out out_ppRegisters);
ppRegisters = ICorDebugRegisterSet.Wrap(out_ppRegisters);
}
public void GetReason(out CorDebugChainReason pReason)
{
Debugger.Interop.CorDebug.CorDebugChainReason out_pReason;
this.WrappedObject.GetReason(out out_pReason);
pReason = ((CorDebugChainReason)(out_pReason));
}
}
}

128
src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugChainEnum.cs

@ -0,0 +1,128 @@ @@ -0,0 +1,128 @@
// <file>
// <copyright see="prj:///doc/copyright.txt"/>
// <license see="prj:///doc/license.txt"/>
// <owner name="David Srbecký" email="dsrbecky@gmail.com"/>
// <version>$Revision$</version>
// </file>
namespace Debugger.Wrappers.CorDebug
{
using System;
public class ICorDebugChainEnum
{
private Debugger.Interop.CorDebug.ICorDebugChainEnum wrappedObject;
internal Debugger.Interop.CorDebug.ICorDebugChainEnum WrappedObject
{
get
{
return this.wrappedObject;
}
}
public ICorDebugChainEnum(Debugger.Interop.CorDebug.ICorDebugChainEnum wrappedObject)
{
this.wrappedObject = wrappedObject;
}
public static ICorDebugChainEnum Wrap(Debugger.Interop.CorDebug.ICorDebugChainEnum objectToWrap)
{
return new ICorDebugChainEnum(objectToWrap);
}
public bool Is<T>() where T: class
{
try {
CastTo<T>();
return true;
} catch {
return false;
}
}
public T As<T>() where T: class
{
try {
return CastTo<T>();
} catch {
return null;
}
}
public T CastTo<T>() where T: class
{
return (T)Activator.CreateInstance(typeof(T), this.WrappedObject);
}
public static bool operator ==(ICorDebugChainEnum o1, ICorDebugChainEnum o2)
{
return ((object)o1 == null && (object)o2 == null) ||
((object)o1 != null && (object)o2 != null && o1.WrappedObject == o2.WrappedObject);
}
public static bool operator !=(ICorDebugChainEnum o1, ICorDebugChainEnum o2)
{
return !(o1 == o2);
}
public override int GetHashCode()
{
return base.GetHashCode();
}
public override bool Equals(object o)
{
ICorDebugChainEnum casted = o as ICorDebugChainEnum;
return (casted != null) && (casted.WrappedObject == wrappedObject);
}
public void Skip(uint celt)
{
this.WrappedObject.Skip(celt);
}
public void Reset()
{
this.WrappedObject.Reset();
}
public void Clone(out ICorDebugEnum ppEnum)
{
Debugger.Interop.CorDebug.ICorDebugEnum out_ppEnum;
this.WrappedObject.Clone(out out_ppEnum);
ppEnum = ICorDebugEnum.Wrap(out_ppEnum);
}
public void GetCount(out uint pcelt)
{
this.WrappedObject.GetCount(out pcelt);
}
public void Next(uint celt, ICorDebugChain[] chains, out uint pceltFetched)
{
Debugger.Interop.CorDebug.ICorDebugChain[] array_chains = new Debugger.Interop.CorDebug.ICorDebugChain[chains.Length];
for (int i = 0; (i < chains.Length); i = (i + 1))
{
if ((chains[i] != null))
{
array_chains[i] = chains[i].WrappedObject;
}
}
this.WrappedObject.Next(celt, array_chains, out pceltFetched);
for (int i = 0; (i < chains.Length); i = (i + 1))
{
if ((array_chains[i] != null))
{
chains[i] = ICorDebugChain.Wrap(array_chains[i]);
} else
{
chains[i] = null;
}
}
}
}
}

102
src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugClass.cs

@ -0,0 +1,102 @@ @@ -0,0 +1,102 @@
// <file>
// <copyright see="prj:///doc/copyright.txt"/>
// <license see="prj:///doc/license.txt"/>
// <owner name="David Srbecký" email="dsrbecky@gmail.com"/>
// <version>$Revision$</version>
// </file>
namespace Debugger.Wrappers.CorDebug
{
using System;
public class ICorDebugClass
{
private Debugger.Interop.CorDebug.ICorDebugClass wrappedObject;
internal Debugger.Interop.CorDebug.ICorDebugClass WrappedObject
{
get
{
return this.wrappedObject;
}
}
public ICorDebugClass(Debugger.Interop.CorDebug.ICorDebugClass wrappedObject)
{
this.wrappedObject = wrappedObject;
}
public static ICorDebugClass Wrap(Debugger.Interop.CorDebug.ICorDebugClass objectToWrap)
{
return new ICorDebugClass(objectToWrap);
}
public bool Is<T>() where T: class
{
try {
CastTo<T>();
return true;
} catch {
return false;
}
}
public T As<T>() where T: class
{
try {
return CastTo<T>();
} catch {
return null;
}
}
public T CastTo<T>() where T: class
{
return (T)Activator.CreateInstance(typeof(T), this.WrappedObject);
}
public static bool operator ==(ICorDebugClass o1, ICorDebugClass o2)
{
return ((object)o1 == null && (object)o2 == null) ||
((object)o1 != null && (object)o2 != null && o1.WrappedObject == o2.WrappedObject);
}
public static bool operator !=(ICorDebugClass o1, ICorDebugClass o2)
{
return !(o1 == o2);
}
public override int GetHashCode()
{
return base.GetHashCode();
}
public override bool Equals(object o)
{
ICorDebugClass casted = o as ICorDebugClass;
return (casted != null) && (casted.WrappedObject == wrappedObject);
}
public void GetModule(out ICorDebugModule pModule)
{
Debugger.Interop.CorDebug.ICorDebugModule out_pModule;
this.WrappedObject.GetModule(out out_pModule);
pModule = ICorDebugModule.Wrap(out_pModule);
}
public void GetToken(out uint pTypeDef)
{
this.WrappedObject.GetToken(out pTypeDef);
}
public void GetStaticFieldValue(uint fieldDef, ICorDebugFrame pFrame, out ICorDebugValue ppValue)
{
Debugger.Interop.CorDebug.ICorDebugValue out_ppValue;
this.WrappedObject.GetStaticFieldValue(fieldDef, pFrame.WrappedObject, out out_ppValue);
ppValue = ICorDebugValue.Wrap(out_ppValue);
}
}
}

97
src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugClass2.cs

@ -0,0 +1,97 @@ @@ -0,0 +1,97 @@
// <file>
// <copyright see="prj:///doc/copyright.txt"/>
// <license see="prj:///doc/license.txt"/>
// <owner name="David Srbecký" email="dsrbecky@gmail.com"/>
// <version>$Revision$</version>
// </file>
namespace Debugger.Wrappers.CorDebug
{
using System;
public class ICorDebugClass2
{
private Debugger.Interop.CorDebug.ICorDebugClass2 wrappedObject;
internal Debugger.Interop.CorDebug.ICorDebugClass2 WrappedObject
{
get
{
return this.wrappedObject;
}
}
public ICorDebugClass2(Debugger.Interop.CorDebug.ICorDebugClass2 wrappedObject)
{
this.wrappedObject = wrappedObject;
}
public static ICorDebugClass2 Wrap(Debugger.Interop.CorDebug.ICorDebugClass2 objectToWrap)
{
return new ICorDebugClass2(objectToWrap);
}
public bool Is<T>() where T: class
{
try {
CastTo<T>();
return true;
} catch {
return false;
}
}
public T As<T>() where T: class
{
try {
return CastTo<T>();
} catch {
return null;
}
}
public T CastTo<T>() where T: class
{
return (T)Activator.CreateInstance(typeof(T), this.WrappedObject);
}
public static bool operator ==(ICorDebugClass2 o1, ICorDebugClass2 o2)
{
return ((object)o1 == null && (object)o2 == null) ||
((object)o1 != null && (object)o2 != null && o1.WrappedObject == o2.WrappedObject);
}
public static bool operator !=(ICorDebugClass2 o1, ICorDebugClass2 o2)
{
return !(o1 == o2);
}
public override int GetHashCode()
{
return base.GetHashCode();
}
public override bool Equals(object o)
{
ICorDebugClass2 casted = o as ICorDebugClass2;
return (casted != null) && (casted.WrappedObject == wrappedObject);
}
public void GetParameterizedType(uint elementType, uint nTypeArgs, ref ICorDebugType ppTypeArgs, out ICorDebugType ppType)
{
Debugger.Interop.CorDebug.ICorDebugType ref_ppTypeArgs = ppTypeArgs.WrappedObject;
Debugger.Interop.CorDebug.ICorDebugType out_ppType;
this.WrappedObject.GetParameterizedType(elementType, nTypeArgs, ref ref_ppTypeArgs, out out_ppType);
ppTypeArgs = ICorDebugType.Wrap(ref_ppTypeArgs);
ppType = ICorDebugType.Wrap(out_ppType);
}
public void SetJMCStatus(int bIsJustMyCode)
{
this.WrappedObject.SetJMCStatus(bIsJustMyCode);
}
}
}

132
src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugCode.cs

@ -0,0 +1,132 @@ @@ -0,0 +1,132 @@
// <file>
// <copyright see="prj:///doc/copyright.txt"/>
// <license see="prj:///doc/license.txt"/>
// <owner name="David Srbecký" email="dsrbecky@gmail.com"/>
// <version>$Revision$</version>
// </file>
namespace Debugger.Wrappers.CorDebug
{
using System;
public class ICorDebugCode
{
private Debugger.Interop.CorDebug.ICorDebugCode wrappedObject;
internal Debugger.Interop.CorDebug.ICorDebugCode WrappedObject
{
get
{
return this.wrappedObject;
}
}
public ICorDebugCode(Debugger.Interop.CorDebug.ICorDebugCode wrappedObject)
{
this.wrappedObject = wrappedObject;
}
public static ICorDebugCode Wrap(Debugger.Interop.CorDebug.ICorDebugCode objectToWrap)
{
return new ICorDebugCode(objectToWrap);
}
public bool Is<T>() where T: class
{
try {
CastTo<T>();
return true;
} catch {
return false;
}
}
public T As<T>() where T: class
{
try {
return CastTo<T>();
} catch {
return null;
}
}
public T CastTo<T>() where T: class
{
return (T)Activator.CreateInstance(typeof(T), this.WrappedObject);
}
public static bool operator ==(ICorDebugCode o1, ICorDebugCode o2)
{
return ((object)o1 == null && (object)o2 == null) ||
((object)o1 != null && (object)o2 != null && o1.WrappedObject == o2.WrappedObject);
}
public static bool operator !=(ICorDebugCode o1, ICorDebugCode o2)
{
return !(o1 == o2);
}
public override int GetHashCode()
{
return base.GetHashCode();
}
public override bool Equals(object o)
{
ICorDebugCode casted = o as ICorDebugCode;
return (casted != null) && (casted.WrappedObject == wrappedObject);
}
public void IsIL(out int pbIL)
{
this.WrappedObject.IsIL(out pbIL);
}
public void GetFunction(out ICorDebugFunction ppFunction)
{
Debugger.Interop.CorDebug.ICorDebugFunction out_ppFunction;
this.WrappedObject.GetFunction(out out_ppFunction);
ppFunction = ICorDebugFunction.Wrap(out_ppFunction);
}
public void GetAddress(out ulong pStart)
{
this.WrappedObject.GetAddress(out pStart);
}
public void GetSize(out uint pcBytes)
{
this.WrappedObject.GetSize(out pcBytes);
}
public void CreateBreakpoint(uint offset, out ICorDebugFunctionBreakpoint ppBreakpoint)
{
Debugger.Interop.CorDebug.ICorDebugFunctionBreakpoint out_ppBreakpoint;
this.WrappedObject.CreateBreakpoint(offset, out out_ppBreakpoint);
ppBreakpoint = ICorDebugFunctionBreakpoint.Wrap(out_ppBreakpoint);
}
public void GetCode(uint startOffset, uint endOffset, uint cBufferAlloc, System.IntPtr buffer, out uint pcBufferSize)
{
this.WrappedObject.GetCode(startOffset, endOffset, cBufferAlloc, buffer, out pcBufferSize);
}
public void GetVersionNumber(out uint nVersion)
{
this.WrappedObject.GetVersionNumber(out nVersion);
}
public void GetILToNativeMapping(uint cMap, out uint pcMap, System.IntPtr map)
{
this.WrappedObject.GetILToNativeMapping(cMap, out pcMap, map);
}
public void GetEnCRemapSequencePoints(uint cMap, out uint pcMap, System.IntPtr offsets)
{
this.WrappedObject.GetEnCRemapSequencePoints(cMap, out pcMap, offsets);
}
}
}

110
src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugCodeEnum.cs

@ -0,0 +1,110 @@ @@ -0,0 +1,110 @@
// <file>
// <copyright see="prj:///doc/copyright.txt"/>
// <license see="prj:///doc/license.txt"/>
// <owner name="David Srbecký" email="dsrbecky@gmail.com"/>
// <version>$Revision$</version>
// </file>
namespace Debugger.Wrappers.CorDebug
{
using System;
public class ICorDebugCodeEnum
{
private Debugger.Interop.CorDebug.ICorDebugCodeEnum wrappedObject;
internal Debugger.Interop.CorDebug.ICorDebugCodeEnum WrappedObject
{
get
{
return this.wrappedObject;
}
}
public ICorDebugCodeEnum(Debugger.Interop.CorDebug.ICorDebugCodeEnum wrappedObject)
{
this.wrappedObject = wrappedObject;
}
public static ICorDebugCodeEnum Wrap(Debugger.Interop.CorDebug.ICorDebugCodeEnum objectToWrap)
{
return new ICorDebugCodeEnum(objectToWrap);
}
public bool Is<T>() where T: class
{
try {
CastTo<T>();
return true;
} catch {
return false;
}
}
public T As<T>() where T: class
{
try {
return CastTo<T>();
} catch {
return null;
}
}
public T CastTo<T>() where T: class
{
return (T)Activator.CreateInstance(typeof(T), this.WrappedObject);
}
public static bool operator ==(ICorDebugCodeEnum o1, ICorDebugCodeEnum o2)
{
return ((object)o1 == null && (object)o2 == null) ||
((object)o1 != null && (object)o2 != null && o1.WrappedObject == o2.WrappedObject);
}
public static bool operator !=(ICorDebugCodeEnum o1, ICorDebugCodeEnum o2)
{
return !(o1 == o2);
}
public override int GetHashCode()
{
return base.GetHashCode();
}
public override bool Equals(object o)
{
ICorDebugCodeEnum casted = o as ICorDebugCodeEnum;
return (casted != null) && (casted.WrappedObject == wrappedObject);
}
public void Skip(uint celt)
{
this.WrappedObject.Skip(celt);
}
public void Reset()
{
this.WrappedObject.Reset();
}
public void Clone(out ICorDebugEnum ppEnum)
{
Debugger.Interop.CorDebug.ICorDebugEnum out_ppEnum;
this.WrappedObject.Clone(out out_ppEnum);
ppEnum = ICorDebugEnum.Wrap(out_ppEnum);
}
public void GetCount(out uint pcelt)
{
this.WrappedObject.GetCount(out pcelt);
}
public void Next(uint celt, System.IntPtr values, out uint pceltFetched)
{
this.WrappedObject.Next(celt, values, out pceltFetched);
}
}
}

148
src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugContext.cs

@ -0,0 +1,148 @@ @@ -0,0 +1,148 @@
// <file>
// <copyright see="prj:///doc/copyright.txt"/>
// <license see="prj:///doc/license.txt"/>
// <owner name="David Srbecký" email="dsrbecky@gmail.com"/>
// <version>$Revision$</version>
// </file>
namespace Debugger.Wrappers.CorDebug
{
using System;
public class ICorDebugContext
{
private Debugger.Interop.CorDebug.ICorDebugContext wrappedObject;
internal Debugger.Interop.CorDebug.ICorDebugContext WrappedObject
{
get
{
return this.wrappedObject;
}
}
public ICorDebugContext(Debugger.Interop.CorDebug.ICorDebugContext wrappedObject)
{
this.wrappedObject = wrappedObject;
}
public static ICorDebugContext Wrap(Debugger.Interop.CorDebug.ICorDebugContext objectToWrap)
{
return new ICorDebugContext(objectToWrap);
}
public bool Is<T>() where T: class
{
try {
CastTo<T>();
return true;
} catch {
return false;
}
}
public T As<T>() where T: class
{
try {
return CastTo<T>();
} catch {
return null;
}
}
public T CastTo<T>() where T: class
{
return (T)Activator.CreateInstance(typeof(T), this.WrappedObject);
}
public static bool operator ==(ICorDebugContext o1, ICorDebugContext o2)
{
return ((object)o1 == null && (object)o2 == null) ||
((object)o1 != null && (object)o2 != null && o1.WrappedObject == o2.WrappedObject);
}
public static bool operator !=(ICorDebugContext o1, ICorDebugContext o2)
{
return !(o1 == o2);
}
public override int GetHashCode()
{
return base.GetHashCode();
}
public override bool Equals(object o)
{
ICorDebugContext casted = o as ICorDebugContext;
return (casted != null) && (casted.WrappedObject == wrappedObject);
}
public void GetType(out uint pType)
{
this.WrappedObject.GetType(out pType);
}
public void GetSize(out uint pSize)
{
this.WrappedObject.GetSize(out pSize);
}
public void GetAddress(out ulong pAddress)
{
this.WrappedObject.GetAddress(out pAddress);
}
public void CreateBreakpoint(out ICorDebugValueBreakpoint ppBreakpoint)
{
Debugger.Interop.CorDebug.ICorDebugValueBreakpoint out_ppBreakpoint;
this.WrappedObject.CreateBreakpoint(out out_ppBreakpoint);
ppBreakpoint = ICorDebugValueBreakpoint.Wrap(out_ppBreakpoint);
}
public void GetClass(out ICorDebugClass ppClass)
{
Debugger.Interop.CorDebug.ICorDebugClass out_ppClass;
this.WrappedObject.GetClass(out out_ppClass);
ppClass = ICorDebugClass.Wrap(out_ppClass);
}
public void GetFieldValue(ICorDebugClass pClass, uint fieldDef, out ICorDebugValue ppValue)
{
Debugger.Interop.CorDebug.ICorDebugValue out_ppValue;
this.WrappedObject.GetFieldValue(pClass.WrappedObject, fieldDef, out out_ppValue);
ppValue = ICorDebugValue.Wrap(out_ppValue);
}
public void GetVirtualMethod(uint memberRef, out ICorDebugFunction ppFunction)
{
Debugger.Interop.CorDebug.ICorDebugFunction out_ppFunction;
this.WrappedObject.GetVirtualMethod(memberRef, out out_ppFunction);
ppFunction = ICorDebugFunction.Wrap(out_ppFunction);
}
public void GetContext(out ICorDebugContext ppContext)
{
Debugger.Interop.CorDebug.ICorDebugContext out_ppContext;
this.WrappedObject.GetContext(out out_ppContext);
ppContext = ICorDebugContext.Wrap(out_ppContext);
}
public void IsValueClass(out int pbIsValueClass)
{
this.WrappedObject.IsValueClass(out pbIsValueClass);
}
public void GetManagedCopy(out object ppObject)
{
this.WrappedObject.GetManagedCopy(out ppObject);
}
public void SetFromManagedCopy(object pObject)
{
this.WrappedObject.SetFromManagedCopy(pObject);
}
}
}

143
src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugController.cs

@ -0,0 +1,143 @@ @@ -0,0 +1,143 @@
// <file>
// <copyright see="prj:///doc/copyright.txt"/>
// <license see="prj:///doc/license.txt"/>
// <owner name="David Srbecký" email="dsrbecky@gmail.com"/>
// <version>$Revision$</version>
// </file>
namespace Debugger.Wrappers.CorDebug
{
using System;
public class ICorDebugController
{
private Debugger.Interop.CorDebug.ICorDebugController wrappedObject;
internal Debugger.Interop.CorDebug.ICorDebugController WrappedObject
{
get
{
return this.wrappedObject;
}
}
public ICorDebugController(Debugger.Interop.CorDebug.ICorDebugController wrappedObject)
{
this.wrappedObject = wrappedObject;
}
public static ICorDebugController Wrap(Debugger.Interop.CorDebug.ICorDebugController objectToWrap)
{
return new ICorDebugController(objectToWrap);
}
public bool Is<T>() where T: class
{
try {
CastTo<T>();
return true;
} catch {
return false;
}
}
public T As<T>() where T: class
{
try {
return CastTo<T>();
} catch {
return null;
}
}
public T CastTo<T>() where T: class
{
return (T)Activator.CreateInstance(typeof(T), this.WrappedObject);
}
public static bool operator ==(ICorDebugController o1, ICorDebugController o2)
{
return ((object)o1 == null && (object)o2 == null) ||
((object)o1 != null && (object)o2 != null && o1.WrappedObject == o2.WrappedObject);
}
public static bool operator !=(ICorDebugController o1, ICorDebugController o2)
{
return !(o1 == o2);
}
public override int GetHashCode()
{
return base.GetHashCode();
}
public override bool Equals(object o)
{
ICorDebugController casted = o as ICorDebugController;
return (casted != null) && (casted.WrappedObject == wrappedObject);
}
public void Stop(uint dwTimeoutIgnored)
{
this.WrappedObject.Stop(dwTimeoutIgnored);
}
public void Continue(int fIsOutOfBand)
{
this.WrappedObject.Continue(fIsOutOfBand);
}
public void IsRunning(out int pbRunning)
{
this.WrappedObject.IsRunning(out pbRunning);
}
public void HasQueuedCallbacks(ICorDebugThread pThread, out int pbQueued)
{
this.WrappedObject.HasQueuedCallbacks(pThread.WrappedObject, out pbQueued);
}
public void EnumerateThreads(out ICorDebugThreadEnum ppThreads)
{
Debugger.Interop.CorDebug.ICorDebugThreadEnum out_ppThreads;
this.WrappedObject.EnumerateThreads(out out_ppThreads);
ppThreads = ICorDebugThreadEnum.Wrap(out_ppThreads);
}
public void SetAllThreadsDebugState(CorDebugThreadState state, ICorDebugThread pExceptThisThread)
{
this.WrappedObject.SetAllThreadsDebugState(((Debugger.Interop.CorDebug.CorDebugThreadState)(state)), pExceptThisThread.WrappedObject);
}
public void Detach()
{
this.WrappedObject.Detach();
}
public void Terminate(uint exitCode)
{
this.WrappedObject.Terminate(exitCode);
}
public void CanCommitChanges(uint cSnapshots, ref ICorDebugEditAndContinueSnapshot pSnapshots, out ICorDebugErrorInfoEnum pError)
{
Debugger.Interop.CorDebug.ICorDebugEditAndContinueSnapshot ref_pSnapshots = pSnapshots.WrappedObject;
Debugger.Interop.CorDebug.ICorDebugErrorInfoEnum out_pError;
this.WrappedObject.CanCommitChanges(cSnapshots, ref ref_pSnapshots, out out_pError);
pSnapshots = ICorDebugEditAndContinueSnapshot.Wrap(ref_pSnapshots);
pError = ICorDebugErrorInfoEnum.Wrap(out_pError);
}
public void CommitChanges(uint cSnapshots, ref ICorDebugEditAndContinueSnapshot pSnapshots, out ICorDebugErrorInfoEnum pError)
{
Debugger.Interop.CorDebug.ICorDebugEditAndContinueSnapshot ref_pSnapshots = pSnapshots.WrappedObject;
Debugger.Interop.CorDebug.ICorDebugErrorInfoEnum out_pError;
this.WrappedObject.CommitChanges(cSnapshots, ref ref_pSnapshots, out out_pError);
pSnapshots = ICorDebugEditAndContinueSnapshot.Wrap(ref_pSnapshots);
pError = ICorDebugErrorInfoEnum.Wrap(out_pError);
}
}
}

118
src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugEditAndContinueSnapshot.cs

@ -0,0 +1,118 @@ @@ -0,0 +1,118 @@
// <file>
// <copyright see="prj:///doc/copyright.txt"/>
// <license see="prj:///doc/license.txt"/>
// <owner name="David Srbecký" email="dsrbecky@gmail.com"/>
// <version>$Revision$</version>
// </file>
namespace Debugger.Wrappers.CorDebug
{
using System;
public class ICorDebugEditAndContinueSnapshot
{
private Debugger.Interop.CorDebug.ICorDebugEditAndContinueSnapshot wrappedObject;
internal Debugger.Interop.CorDebug.ICorDebugEditAndContinueSnapshot WrappedObject
{
get
{
return this.wrappedObject;
}
}
public ICorDebugEditAndContinueSnapshot(Debugger.Interop.CorDebug.ICorDebugEditAndContinueSnapshot wrappedObject)
{
this.wrappedObject = wrappedObject;
}
public static ICorDebugEditAndContinueSnapshot Wrap(Debugger.Interop.CorDebug.ICorDebugEditAndContinueSnapshot objectToWrap)
{
return new ICorDebugEditAndContinueSnapshot(objectToWrap);
}
public bool Is<T>() where T: class
{
try {
CastTo<T>();
return true;
} catch {
return false;
}
}
public T As<T>() where T: class
{
try {
return CastTo<T>();
} catch {
return null;
}
}
public T CastTo<T>() where T: class
{
return (T)Activator.CreateInstance(typeof(T), this.WrappedObject);
}
public static bool operator ==(ICorDebugEditAndContinueSnapshot o1, ICorDebugEditAndContinueSnapshot o2)
{
return ((object)o1 == null && (object)o2 == null) ||
((object)o1 != null && (object)o2 != null && o1.WrappedObject == o2.WrappedObject);
}
public static bool operator !=(ICorDebugEditAndContinueSnapshot o1, ICorDebugEditAndContinueSnapshot o2)
{
return !(o1 == o2);
}
public override int GetHashCode()
{
return base.GetHashCode();
}
public override bool Equals(object o)
{
ICorDebugEditAndContinueSnapshot casted = o as ICorDebugEditAndContinueSnapshot;
return (casted != null) && (casted.WrappedObject == wrappedObject);
}
public void CopyMetaData(IStream pIStream, out System.Guid pMvid)
{
this.WrappedObject.CopyMetaData(pIStream.WrappedObject, out pMvid);
}
public void GetMvid(out System.Guid pMvid)
{
this.WrappedObject.GetMvid(out pMvid);
}
public void GetRoDataRVA(out uint pRoDataRVA)
{
this.WrappedObject.GetRoDataRVA(out pRoDataRVA);
}
public void GetRwDataRVA(out uint pRwDataRVA)
{
this.WrappedObject.GetRwDataRVA(out pRwDataRVA);
}
public void SetPEBytes(IStream pIStream)
{
this.WrappedObject.SetPEBytes(pIStream.WrappedObject);
}
public void SetILMap(uint mdFunction, uint cMapSize, ref Debugger.Interop.CorDebug._COR_IL_MAP map)
{
this.WrappedObject.SetILMap(mdFunction, cMapSize, ref map);
}
public void SetPESymbolBytes(IStream pIStream)
{
this.WrappedObject.SetPESymbolBytes(pIStream.WrappedObject);
}
}
}

105
src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugEnum.cs

@ -0,0 +1,105 @@ @@ -0,0 +1,105 @@
// <file>
// <copyright see="prj:///doc/copyright.txt"/>
// <license see="prj:///doc/license.txt"/>
// <owner name="David Srbecký" email="dsrbecky@gmail.com"/>
// <version>$Revision$</version>
// </file>
namespace Debugger.Wrappers.CorDebug
{
using System;
public class ICorDebugEnum
{
private Debugger.Interop.CorDebug.ICorDebugEnum wrappedObject;
internal Debugger.Interop.CorDebug.ICorDebugEnum WrappedObject
{
get
{
return this.wrappedObject;
}
}
public ICorDebugEnum(Debugger.Interop.CorDebug.ICorDebugEnum wrappedObject)
{
this.wrappedObject = wrappedObject;
}
public static ICorDebugEnum Wrap(Debugger.Interop.CorDebug.ICorDebugEnum objectToWrap)
{
return new ICorDebugEnum(objectToWrap);
}
public bool Is<T>() where T: class
{
try {
CastTo<T>();
return true;
} catch {
return false;
}
}
public T As<T>() where T: class
{
try {
return CastTo<T>();
} catch {
return null;
}
}
public T CastTo<T>() where T: class
{
return (T)Activator.CreateInstance(typeof(T), this.WrappedObject);
}
public static bool operator ==(ICorDebugEnum o1, ICorDebugEnum o2)
{
return ((object)o1 == null && (object)o2 == null) ||
((object)o1 != null && (object)o2 != null && o1.WrappedObject == o2.WrappedObject);
}
public static bool operator !=(ICorDebugEnum o1, ICorDebugEnum o2)
{
return !(o1 == o2);
}
public override int GetHashCode()
{
return base.GetHashCode();
}
public override bool Equals(object o)
{
ICorDebugEnum casted = o as ICorDebugEnum;
return (casted != null) && (casted.WrappedObject == wrappedObject);
}
public void Skip(uint celt)
{
this.WrappedObject.Skip(celt);
}
public void Reset()
{
this.WrappedObject.Reset();
}
public void Clone(out ICorDebugEnum ppEnum)
{
Debugger.Interop.CorDebug.ICorDebugEnum out_ppEnum;
this.WrappedObject.Clone(out out_ppEnum);
ppEnum = ICorDebugEnum.Wrap(out_ppEnum);
}
public void GetCount(out uint pcelt)
{
this.WrappedObject.GetCount(out pcelt);
}
}
}

110
src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugErrorInfoEnum.cs

@ -0,0 +1,110 @@ @@ -0,0 +1,110 @@
// <file>
// <copyright see="prj:///doc/copyright.txt"/>
// <license see="prj:///doc/license.txt"/>
// <owner name="David Srbecký" email="dsrbecky@gmail.com"/>
// <version>$Revision$</version>
// </file>
namespace Debugger.Wrappers.CorDebug
{
using System;
public class ICorDebugErrorInfoEnum
{
private Debugger.Interop.CorDebug.ICorDebugErrorInfoEnum wrappedObject;
internal Debugger.Interop.CorDebug.ICorDebugErrorInfoEnum WrappedObject
{
get
{
return this.wrappedObject;
}
}
public ICorDebugErrorInfoEnum(Debugger.Interop.CorDebug.ICorDebugErrorInfoEnum wrappedObject)
{
this.wrappedObject = wrappedObject;
}
public static ICorDebugErrorInfoEnum Wrap(Debugger.Interop.CorDebug.ICorDebugErrorInfoEnum objectToWrap)
{
return new ICorDebugErrorInfoEnum(objectToWrap);
}
public bool Is<T>() where T: class
{
try {
CastTo<T>();
return true;
} catch {
return false;
}
}
public T As<T>() where T: class
{
try {
return CastTo<T>();
} catch {
return null;
}
}
public T CastTo<T>() where T: class
{
return (T)Activator.CreateInstance(typeof(T), this.WrappedObject);
}
public static bool operator ==(ICorDebugErrorInfoEnum o1, ICorDebugErrorInfoEnum o2)
{
return ((object)o1 == null && (object)o2 == null) ||
((object)o1 != null && (object)o2 != null && o1.WrappedObject == o2.WrappedObject);
}
public static bool operator !=(ICorDebugErrorInfoEnum o1, ICorDebugErrorInfoEnum o2)
{
return !(o1 == o2);
}
public override int GetHashCode()
{
return base.GetHashCode();
}
public override bool Equals(object o)
{
ICorDebugErrorInfoEnum casted = o as ICorDebugErrorInfoEnum;
return (casted != null) && (casted.WrappedObject == wrappedObject);
}
public void Skip(uint celt)
{
this.WrappedObject.Skip(celt);
}
public void Reset()
{
this.WrappedObject.Reset();
}
public void Clone(out ICorDebugEnum ppEnum)
{
Debugger.Interop.CorDebug.ICorDebugEnum out_ppEnum;
this.WrappedObject.Clone(out out_ppEnum);
ppEnum = ICorDebugEnum.Wrap(out_ppEnum);
}
public void GetCount(out uint pcelt)
{
this.WrappedObject.GetCount(out pcelt);
}
public void Next(uint celt, System.IntPtr errors, out uint pceltFetched)
{
this.WrappedObject.Next(celt, errors, out pceltFetched);
}
}
}

159
src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugEval.cs

@ -0,0 +1,159 @@ @@ -0,0 +1,159 @@
// <file>
// <copyright see="prj:///doc/copyright.txt"/>
// <license see="prj:///doc/license.txt"/>
// <owner name="David Srbecký" email="dsrbecky@gmail.com"/>
// <version>$Revision$</version>
// </file>
namespace Debugger.Wrappers.CorDebug
{
using System;
public class ICorDebugEval
{
private Debugger.Interop.CorDebug.ICorDebugEval wrappedObject;
internal Debugger.Interop.CorDebug.ICorDebugEval WrappedObject
{
get
{
return this.wrappedObject;
}
}
public ICorDebugEval(Debugger.Interop.CorDebug.ICorDebugEval wrappedObject)
{
this.wrappedObject = wrappedObject;
}
public static ICorDebugEval Wrap(Debugger.Interop.CorDebug.ICorDebugEval objectToWrap)
{
return new ICorDebugEval(objectToWrap);
}
public bool Is<T>() where T: class
{
try {
CastTo<T>();
return true;
} catch {
return false;
}
}
public T As<T>() where T: class
{
try {
return CastTo<T>();
} catch {
return null;
}
}
public T CastTo<T>() where T: class
{
return (T)Activator.CreateInstance(typeof(T), this.WrappedObject);
}
public static bool operator ==(ICorDebugEval o1, ICorDebugEval o2)
{
return ((object)o1 == null && (object)o2 == null) ||
((object)o1 != null && (object)o2 != null && o1.WrappedObject == o2.WrappedObject);
}
public static bool operator !=(ICorDebugEval o1, ICorDebugEval o2)
{
return !(o1 == o2);
}
public override int GetHashCode()
{
return base.GetHashCode();
}
public override bool Equals(object o)
{
ICorDebugEval casted = o as ICorDebugEval;
return (casted != null) && (casted.WrappedObject == wrappedObject);
}
public void CallFunction(ICorDebugFunction pFunction, uint nArgs, ICorDebugValue[] ppArgs)
{
Debugger.Interop.CorDebug.ICorDebugValue[] array_ppArgs = new Debugger.Interop.CorDebug.ICorDebugValue[ppArgs.Length];
for (int i = 0; (i < ppArgs.Length); i = (i + 1))
{
if ((ppArgs[i] != null))
{
array_ppArgs[i] = ppArgs[i].WrappedObject;
}
}
this.WrappedObject.CallFunction(pFunction.WrappedObject, nArgs, array_ppArgs);
for (int i = 0; (i < ppArgs.Length); i = (i + 1))
{
if ((array_ppArgs[i] != null))
{
ppArgs[i] = ICorDebugValue.Wrap(array_ppArgs[i]);
} else
{
ppArgs[i] = null;
}
}
}
public void NewObject(ICorDebugFunction pConstructor, uint nArgs, ref ICorDebugValue ppArgs)
{
Debugger.Interop.CorDebug.ICorDebugValue ref_ppArgs = ppArgs.WrappedObject;
this.WrappedObject.NewObject(pConstructor.WrappedObject, nArgs, ref ref_ppArgs);
ppArgs = ICorDebugValue.Wrap(ref_ppArgs);
}
public void NewObjectNoConstructor(ICorDebugClass pClass)
{
this.WrappedObject.NewObjectNoConstructor(pClass.WrappedObject);
}
public void NewString(string @string)
{
this.WrappedObject.NewString(@string);
}
public void NewArray(uint elementType, ICorDebugClass pElementClass, uint rank, ref uint dims, ref uint lowBounds)
{
this.WrappedObject.NewArray(elementType, pElementClass.WrappedObject, rank, ref dims, ref lowBounds);
}
public void IsActive(out int pbActive)
{
this.WrappedObject.IsActive(out pbActive);
}
public void Abort()
{
this.WrappedObject.Abort();
}
public void GetResult(out ICorDebugValue ppResult)
{
Debugger.Interop.CorDebug.ICorDebugValue out_ppResult;
this.WrappedObject.GetResult(out out_ppResult);
ppResult = ICorDebugValue.Wrap(out_ppResult);
}
public void GetThread(out ICorDebugThread ppThread)
{
Debugger.Interop.CorDebug.ICorDebugThread out_ppThread;
this.WrappedObject.GetThread(out out_ppThread);
ppThread = ICorDebugThread.Wrap(out_ppThread);
}
public void CreateValue(uint elementType, ICorDebugClass pElementClass, out ICorDebugValue ppValue)
{
Debugger.Interop.CorDebug.ICorDebugValue out_ppValue;
this.WrappedObject.CreateValue(elementType, pElementClass.WrappedObject, out out_ppValue);
ppValue = ICorDebugValue.Wrap(out_ppValue);
}
}
}

130
src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugEval2.cs

@ -0,0 +1,130 @@ @@ -0,0 +1,130 @@
// <file>
// <copyright see="prj:///doc/copyright.txt"/>
// <license see="prj:///doc/license.txt"/>
// <owner name="David Srbecký" email="dsrbecky@gmail.com"/>
// <version>$Revision$</version>
// </file>
namespace Debugger.Wrappers.CorDebug
{
using System;
public class ICorDebugEval2
{
private Debugger.Interop.CorDebug.ICorDebugEval2 wrappedObject;
internal Debugger.Interop.CorDebug.ICorDebugEval2 WrappedObject
{
get
{
return this.wrappedObject;
}
}
public ICorDebugEval2(Debugger.Interop.CorDebug.ICorDebugEval2 wrappedObject)
{
this.wrappedObject = wrappedObject;
}
public static ICorDebugEval2 Wrap(Debugger.Interop.CorDebug.ICorDebugEval2 objectToWrap)
{
return new ICorDebugEval2(objectToWrap);
}
public bool Is<T>() where T: class
{
try {
CastTo<T>();
return true;
} catch {
return false;
}
}
public T As<T>() where T: class
{
try {
return CastTo<T>();
} catch {
return null;
}
}
public T CastTo<T>() where T: class
{
return (T)Activator.CreateInstance(typeof(T), this.WrappedObject);
}
public static bool operator ==(ICorDebugEval2 o1, ICorDebugEval2 o2)
{
return ((object)o1 == null && (object)o2 == null) ||
((object)o1 != null && (object)o2 != null && o1.WrappedObject == o2.WrappedObject);
}
public static bool operator !=(ICorDebugEval2 o1, ICorDebugEval2 o2)
{
return !(o1 == o2);
}
public override int GetHashCode()
{
return base.GetHashCode();
}
public override bool Equals(object o)
{
ICorDebugEval2 casted = o as ICorDebugEval2;
return (casted != null) && (casted.WrappedObject == wrappedObject);
}
public void CallParameterizedFunction(ICorDebugFunction pFunction, uint nTypeArgs, ref ICorDebugType ppTypeArgs, uint nArgs, ref ICorDebugValue ppArgs)
{
Debugger.Interop.CorDebug.ICorDebugType ref_ppTypeArgs = ppTypeArgs.WrappedObject;
Debugger.Interop.CorDebug.ICorDebugValue ref_ppArgs = ppArgs.WrappedObject;
this.WrappedObject.CallParameterizedFunction(pFunction.WrappedObject, nTypeArgs, ref ref_ppTypeArgs, nArgs, ref ref_ppArgs);
ppTypeArgs = ICorDebugType.Wrap(ref_ppTypeArgs);
ppArgs = ICorDebugValue.Wrap(ref_ppArgs);
}
public void CreateValueForType(ICorDebugType pType, out ICorDebugValue ppValue)
{
Debugger.Interop.CorDebug.ICorDebugValue out_ppValue;
this.WrappedObject.CreateValueForType(pType.WrappedObject, out out_ppValue);
ppValue = ICorDebugValue.Wrap(out_ppValue);
}
public void NewParameterizedObject(ICorDebugFunction pConstructor, uint nTypeArgs, ref ICorDebugType ppTypeArgs, uint nArgs, ref ICorDebugValue ppArgs)
{
Debugger.Interop.CorDebug.ICorDebugType ref_ppTypeArgs = ppTypeArgs.WrappedObject;
Debugger.Interop.CorDebug.ICorDebugValue ref_ppArgs = ppArgs.WrappedObject;
this.WrappedObject.NewParameterizedObject(pConstructor.WrappedObject, nTypeArgs, ref ref_ppTypeArgs, nArgs, ref ref_ppArgs);
ppTypeArgs = ICorDebugType.Wrap(ref_ppTypeArgs);
ppArgs = ICorDebugValue.Wrap(ref_ppArgs);
}
public void NewParameterizedObjectNoConstructor(ICorDebugClass pClass, uint nTypeArgs, ref ICorDebugType ppTypeArgs)
{
Debugger.Interop.CorDebug.ICorDebugType ref_ppTypeArgs = ppTypeArgs.WrappedObject;
this.WrappedObject.NewParameterizedObjectNoConstructor(pClass.WrappedObject, nTypeArgs, ref ref_ppTypeArgs);
ppTypeArgs = ICorDebugType.Wrap(ref_ppTypeArgs);
}
public void NewParameterizedArray(ICorDebugType pElementType, uint rank, ref uint dims, ref uint lowBounds)
{
this.WrappedObject.NewParameterizedArray(pElementType.WrappedObject, rank, ref dims, ref lowBounds);
}
public void NewStringWithLength(string @string, uint uiLength)
{
this.WrappedObject.NewStringWithLength(@string, uiLength);
}
public void RudeAbort()
{
this.WrappedObject.RudeAbort();
}
}
}

135
src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugFrame.cs

@ -0,0 +1,135 @@ @@ -0,0 +1,135 @@
// <file>
// <copyright see="prj:///doc/copyright.txt"/>
// <license see="prj:///doc/license.txt"/>
// <owner name="David Srbecký" email="dsrbecky@gmail.com"/>
// <version>$Revision$</version>
// </file>
namespace Debugger.Wrappers.CorDebug
{
using System;
public class ICorDebugFrame
{
private Debugger.Interop.CorDebug.ICorDebugFrame wrappedObject;
internal Debugger.Interop.CorDebug.ICorDebugFrame WrappedObject
{
get
{
return this.wrappedObject;
}
}
public ICorDebugFrame(Debugger.Interop.CorDebug.ICorDebugFrame wrappedObject)
{
this.wrappedObject = wrappedObject;
}
public static ICorDebugFrame Wrap(Debugger.Interop.CorDebug.ICorDebugFrame objectToWrap)
{
return new ICorDebugFrame(objectToWrap);
}
public bool Is<T>() where T: class
{
try {
CastTo<T>();
return true;
} catch {
return false;
}
}
public T As<T>() where T: class
{
try {
return CastTo<T>();
} catch {
return null;
}
}
public T CastTo<T>() where T: class
{
return (T)Activator.CreateInstance(typeof(T), this.WrappedObject);
}
public static bool operator ==(ICorDebugFrame o1, ICorDebugFrame o2)
{
return ((object)o1 == null && (object)o2 == null) ||
((object)o1 != null && (object)o2 != null && o1.WrappedObject == o2.WrappedObject);
}
public static bool operator !=(ICorDebugFrame o1, ICorDebugFrame o2)
{
return !(o1 == o2);
}
public override int GetHashCode()
{
return base.GetHashCode();
}
public override bool Equals(object o)
{
ICorDebugFrame casted = o as ICorDebugFrame;
return (casted != null) && (casted.WrappedObject == wrappedObject);
}
public void GetChain(out ICorDebugChain ppChain)
{
Debugger.Interop.CorDebug.ICorDebugChain out_ppChain;
this.WrappedObject.GetChain(out out_ppChain);
ppChain = ICorDebugChain.Wrap(out_ppChain);
}
public void GetCode(out ICorDebugCode ppCode)
{
Debugger.Interop.CorDebug.ICorDebugCode out_ppCode;
this.WrappedObject.GetCode(out out_ppCode);
ppCode = ICorDebugCode.Wrap(out_ppCode);
}
public void GetFunction(out ICorDebugFunction ppFunction)
{
Debugger.Interop.CorDebug.ICorDebugFunction out_ppFunction;
this.WrappedObject.GetFunction(out out_ppFunction);
ppFunction = ICorDebugFunction.Wrap(out_ppFunction);
}
public void GetFunctionToken(out uint pToken)
{
this.WrappedObject.GetFunctionToken(out pToken);
}
public void GetStackRange(out ulong pStart, out ulong pEnd)
{
this.WrappedObject.GetStackRange(out pStart, out pEnd);
}
public void GetCaller(out ICorDebugFrame ppFrame)
{
Debugger.Interop.CorDebug.ICorDebugFrame out_ppFrame;
this.WrappedObject.GetCaller(out out_ppFrame);
ppFrame = ICorDebugFrame.Wrap(out_ppFrame);
}
public void GetCallee(out ICorDebugFrame ppFrame)
{
Debugger.Interop.CorDebug.ICorDebugFrame out_ppFrame;
this.WrappedObject.GetCallee(out out_ppFrame);
ppFrame = ICorDebugFrame.Wrap(out_ppFrame);
}
public void CreateStepper(out ICorDebugStepper ppStepper)
{
Debugger.Interop.CorDebug.ICorDebugStepper out_ppStepper;
this.WrappedObject.CreateStepper(out out_ppStepper);
ppStepper = ICorDebugStepper.Wrap(out_ppStepper);
}
}
}

128
src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugFrameEnum.cs

@ -0,0 +1,128 @@ @@ -0,0 +1,128 @@
// <file>
// <copyright see="prj:///doc/copyright.txt"/>
// <license see="prj:///doc/license.txt"/>
// <owner name="David Srbecký" email="dsrbecky@gmail.com"/>
// <version>$Revision$</version>
// </file>
namespace Debugger.Wrappers.CorDebug
{
using System;
public class ICorDebugFrameEnum
{
private Debugger.Interop.CorDebug.ICorDebugFrameEnum wrappedObject;
internal Debugger.Interop.CorDebug.ICorDebugFrameEnum WrappedObject
{
get
{
return this.wrappedObject;
}
}
public ICorDebugFrameEnum(Debugger.Interop.CorDebug.ICorDebugFrameEnum wrappedObject)
{
this.wrappedObject = wrappedObject;
}
public static ICorDebugFrameEnum Wrap(Debugger.Interop.CorDebug.ICorDebugFrameEnum objectToWrap)
{
return new ICorDebugFrameEnum(objectToWrap);
}
public bool Is<T>() where T: class
{
try {
CastTo<T>();
return true;
} catch {
return false;
}
}
public T As<T>() where T: class
{
try {
return CastTo<T>();
} catch {
return null;
}
}
public T CastTo<T>() where T: class
{
return (T)Activator.CreateInstance(typeof(T), this.WrappedObject);
}
public static bool operator ==(ICorDebugFrameEnum o1, ICorDebugFrameEnum o2)
{
return ((object)o1 == null && (object)o2 == null) ||
((object)o1 != null && (object)o2 != null && o1.WrappedObject == o2.WrappedObject);
}
public static bool operator !=(ICorDebugFrameEnum o1, ICorDebugFrameEnum o2)
{
return !(o1 == o2);
}
public override int GetHashCode()
{
return base.GetHashCode();
}
public override bool Equals(object o)
{
ICorDebugFrameEnum casted = o as ICorDebugFrameEnum;
return (casted != null) && (casted.WrappedObject == wrappedObject);
}
public void Skip(uint celt)
{
this.WrappedObject.Skip(celt);
}
public void Reset()
{
this.WrappedObject.Reset();
}
public void Clone(out ICorDebugEnum ppEnum)
{
Debugger.Interop.CorDebug.ICorDebugEnum out_ppEnum;
this.WrappedObject.Clone(out out_ppEnum);
ppEnum = ICorDebugEnum.Wrap(out_ppEnum);
}
public void GetCount(out uint pcelt)
{
this.WrappedObject.GetCount(out pcelt);
}
public void Next(uint celt, ICorDebugFrame[] frames, out uint pceltFetched)
{
Debugger.Interop.CorDebug.ICorDebugFrame[] array_frames = new Debugger.Interop.CorDebug.ICorDebugFrame[frames.Length];
for (int i = 0; (i < frames.Length); i = (i + 1))
{
if ((frames[i] != null))
{
array_frames[i] = frames[i].WrappedObject;
}
}
this.WrappedObject.Next(celt, array_frames, out pceltFetched);
for (int i = 0; (i < frames.Length); i = (i + 1))
{
if ((array_frames[i] != null))
{
frames[i] = ICorDebugFrame.Wrap(array_frames[i]);
} else
{
frames[i] = null;
}
}
}
}
}

133
src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugFunction.cs

@ -0,0 +1,133 @@ @@ -0,0 +1,133 @@
// <file>
// <copyright see="prj:///doc/copyright.txt"/>
// <license see="prj:///doc/license.txt"/>
// <owner name="David Srbecký" email="dsrbecky@gmail.com"/>
// <version>$Revision$</version>
// </file>
namespace Debugger.Wrappers.CorDebug
{
using System;
public class ICorDebugFunction
{
private Debugger.Interop.CorDebug.ICorDebugFunction wrappedObject;
internal Debugger.Interop.CorDebug.ICorDebugFunction WrappedObject
{
get
{
return this.wrappedObject;
}
}
public ICorDebugFunction(Debugger.Interop.CorDebug.ICorDebugFunction wrappedObject)
{
this.wrappedObject = wrappedObject;
}
public static ICorDebugFunction Wrap(Debugger.Interop.CorDebug.ICorDebugFunction objectToWrap)
{
return new ICorDebugFunction(objectToWrap);
}
public bool Is<T>() where T: class
{
try {
CastTo<T>();
return true;
} catch {
return false;
}
}
public T As<T>() where T: class
{
try {
return CastTo<T>();
} catch {
return null;
}
}
public T CastTo<T>() where T: class
{
return (T)Activator.CreateInstance(typeof(T), this.WrappedObject);
}
public static bool operator ==(ICorDebugFunction o1, ICorDebugFunction o2)
{
return ((object)o1 == null && (object)o2 == null) ||
((object)o1 != null && (object)o2 != null && o1.WrappedObject == o2.WrappedObject);
}
public static bool operator !=(ICorDebugFunction o1, ICorDebugFunction o2)
{
return !(o1 == o2);
}
public override int GetHashCode()
{
return base.GetHashCode();
}
public override bool Equals(object o)
{
ICorDebugFunction casted = o as ICorDebugFunction;
return (casted != null) && (casted.WrappedObject == wrappedObject);
}
public void GetModule(out ICorDebugModule ppModule)
{
Debugger.Interop.CorDebug.ICorDebugModule out_ppModule;
this.WrappedObject.GetModule(out out_ppModule);
ppModule = ICorDebugModule.Wrap(out_ppModule);
}
public void GetClass(out ICorDebugClass ppClass)
{
Debugger.Interop.CorDebug.ICorDebugClass out_ppClass;
this.WrappedObject.GetClass(out out_ppClass);
ppClass = ICorDebugClass.Wrap(out_ppClass);
}
public void GetToken(out uint pMethodDef)
{
this.WrappedObject.GetToken(out pMethodDef);
}
public void GetILCode(out ICorDebugCode ppCode)
{
Debugger.Interop.CorDebug.ICorDebugCode out_ppCode;
this.WrappedObject.GetILCode(out out_ppCode);
ppCode = ICorDebugCode.Wrap(out_ppCode);
}
public void GetNativeCode(out ICorDebugCode ppCode)
{
Debugger.Interop.CorDebug.ICorDebugCode out_ppCode;
this.WrappedObject.GetNativeCode(out out_ppCode);
ppCode = ICorDebugCode.Wrap(out_ppCode);
}
public void CreateBreakpoint(out ICorDebugFunctionBreakpoint ppBreakpoint)
{
Debugger.Interop.CorDebug.ICorDebugFunctionBreakpoint out_ppBreakpoint;
this.WrappedObject.CreateBreakpoint(out out_ppBreakpoint);
ppBreakpoint = ICorDebugFunctionBreakpoint.Wrap(out_ppBreakpoint);
}
public void GetLocalVarSigToken(out uint pmdSig)
{
this.WrappedObject.GetLocalVarSigToken(out pmdSig);
}
public void GetCurrentVersionNumber(out uint pnCurrentVersion)
{
this.WrappedObject.GetCurrentVersionNumber(out pnCurrentVersion);
}
}
}

105
src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugFunction2.cs

@ -0,0 +1,105 @@ @@ -0,0 +1,105 @@
// <file>
// <copyright see="prj:///doc/copyright.txt"/>
// <license see="prj:///doc/license.txt"/>
// <owner name="David Srbecký" email="dsrbecky@gmail.com"/>
// <version>$Revision$</version>
// </file>
namespace Debugger.Wrappers.CorDebug
{
using System;
public class ICorDebugFunction2
{
private Debugger.Interop.CorDebug.ICorDebugFunction2 wrappedObject;
internal Debugger.Interop.CorDebug.ICorDebugFunction2 WrappedObject
{
get
{
return this.wrappedObject;
}
}
public ICorDebugFunction2(Debugger.Interop.CorDebug.ICorDebugFunction2 wrappedObject)
{
this.wrappedObject = wrappedObject;
}
public static ICorDebugFunction2 Wrap(Debugger.Interop.CorDebug.ICorDebugFunction2 objectToWrap)
{
return new ICorDebugFunction2(objectToWrap);
}
public bool Is<T>() where T: class
{
try {
CastTo<T>();
return true;
} catch {
return false;
}
}
public T As<T>() where T: class
{
try {
return CastTo<T>();
} catch {
return null;
}
}
public T CastTo<T>() where T: class
{
return (T)Activator.CreateInstance(typeof(T), this.WrappedObject);
}
public static bool operator ==(ICorDebugFunction2 o1, ICorDebugFunction2 o2)
{
return ((object)o1 == null && (object)o2 == null) ||
((object)o1 != null && (object)o2 != null && o1.WrappedObject == o2.WrappedObject);
}
public static bool operator !=(ICorDebugFunction2 o1, ICorDebugFunction2 o2)
{
return !(o1 == o2);
}
public override int GetHashCode()
{
return base.GetHashCode();
}
public override bool Equals(object o)
{
ICorDebugFunction2 casted = o as ICorDebugFunction2;
return (casted != null) && (casted.WrappedObject == wrappedObject);
}
public void SetJMCStatus(int bIsJustMyCode)
{
this.WrappedObject.SetJMCStatus(bIsJustMyCode);
}
public void GetJMCStatus(out int pbIsJustMyCode)
{
this.WrappedObject.GetJMCStatus(out pbIsJustMyCode);
}
public void EnumerateNativeCode(out ICorDebugCodeEnum ppCodeEnum)
{
Debugger.Interop.CorDebug.ICorDebugCodeEnum out_ppCodeEnum;
this.WrappedObject.EnumerateNativeCode(out out_ppCodeEnum);
ppCodeEnum = ICorDebugCodeEnum.Wrap(out_ppCodeEnum);
}
public void GetVersionNumber(out uint pnVersion)
{
this.WrappedObject.GetVersionNumber(out pnVersion);
}
}
}

105
src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugFunctionBreakpoint.cs

@ -0,0 +1,105 @@ @@ -0,0 +1,105 @@
// <file>
// <copyright see="prj:///doc/copyright.txt"/>
// <license see="prj:///doc/license.txt"/>
// <owner name="David Srbecký" email="dsrbecky@gmail.com"/>
// <version>$Revision$</version>
// </file>
namespace Debugger.Wrappers.CorDebug
{
using System;
public class ICorDebugFunctionBreakpoint
{
private Debugger.Interop.CorDebug.ICorDebugFunctionBreakpoint wrappedObject;
internal Debugger.Interop.CorDebug.ICorDebugFunctionBreakpoint WrappedObject
{
get
{
return this.wrappedObject;
}
}
public ICorDebugFunctionBreakpoint(Debugger.Interop.CorDebug.ICorDebugFunctionBreakpoint wrappedObject)
{
this.wrappedObject = wrappedObject;
}
public static ICorDebugFunctionBreakpoint Wrap(Debugger.Interop.CorDebug.ICorDebugFunctionBreakpoint objectToWrap)
{
return new ICorDebugFunctionBreakpoint(objectToWrap);
}
public bool Is<T>() where T: class
{
try {
CastTo<T>();
return true;
} catch {
return false;
}
}
public T As<T>() where T: class
{
try {
return CastTo<T>();
} catch {
return null;
}
}
public T CastTo<T>() where T: class
{
return (T)Activator.CreateInstance(typeof(T), this.WrappedObject);
}
public static bool operator ==(ICorDebugFunctionBreakpoint o1, ICorDebugFunctionBreakpoint o2)
{
return ((object)o1 == null && (object)o2 == null) ||
((object)o1 != null && (object)o2 != null && o1.WrappedObject == o2.WrappedObject);
}
public static bool operator !=(ICorDebugFunctionBreakpoint o1, ICorDebugFunctionBreakpoint o2)
{
return !(o1 == o2);
}
public override int GetHashCode()
{
return base.GetHashCode();
}
public override bool Equals(object o)
{
ICorDebugFunctionBreakpoint casted = o as ICorDebugFunctionBreakpoint;
return (casted != null) && (casted.WrappedObject == wrappedObject);
}
public void Activate(int bActive)
{
this.WrappedObject.Activate(bActive);
}
public void IsActive(out int pbActive)
{
this.WrappedObject.IsActive(out pbActive);
}
public void GetFunction(out ICorDebugFunction ppFunction)
{
Debugger.Interop.CorDebug.ICorDebugFunction out_ppFunction;
this.WrappedObject.GetFunction(out out_ppFunction);
ppFunction = ICorDebugFunction.Wrap(out_ppFunction);
}
public void GetOffset(out uint pnOffset)
{
this.WrappedObject.GetOffset(out pnOffset);
}
}
}

115
src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugGenericValue.cs

@ -0,0 +1,115 @@ @@ -0,0 +1,115 @@
// <file>
// <copyright see="prj:///doc/copyright.txt"/>
// <license see="prj:///doc/license.txt"/>
// <owner name="David Srbecký" email="dsrbecky@gmail.com"/>
// <version>$Revision$</version>
// </file>
namespace Debugger.Wrappers.CorDebug
{
using System;
public class ICorDebugGenericValue
{
private Debugger.Interop.CorDebug.ICorDebugGenericValue wrappedObject;
internal Debugger.Interop.CorDebug.ICorDebugGenericValue WrappedObject
{
get
{
return this.wrappedObject;
}
}
public ICorDebugGenericValue(Debugger.Interop.CorDebug.ICorDebugGenericValue wrappedObject)
{
this.wrappedObject = wrappedObject;
}
public static ICorDebugGenericValue Wrap(Debugger.Interop.CorDebug.ICorDebugGenericValue objectToWrap)
{
return new ICorDebugGenericValue(objectToWrap);
}
public bool Is<T>() where T: class
{
try {
CastTo<T>();
return true;
} catch {
return false;
}
}
public T As<T>() where T: class
{
try {
return CastTo<T>();
} catch {
return null;
}
}
public T CastTo<T>() where T: class
{
return (T)Activator.CreateInstance(typeof(T), this.WrappedObject);
}
public static bool operator ==(ICorDebugGenericValue o1, ICorDebugGenericValue o2)
{
return ((object)o1 == null && (object)o2 == null) ||
((object)o1 != null && (object)o2 != null && o1.WrappedObject == o2.WrappedObject);
}
public static bool operator !=(ICorDebugGenericValue o1, ICorDebugGenericValue o2)
{
return !(o1 == o2);
}
public override int GetHashCode()
{
return base.GetHashCode();
}
public override bool Equals(object o)
{
ICorDebugGenericValue casted = o as ICorDebugGenericValue;
return (casted != null) && (casted.WrappedObject == wrappedObject);
}
public void GetType(out uint pType)
{
this.WrappedObject.GetType(out pType);
}
public void GetSize(out uint pSize)
{
this.WrappedObject.GetSize(out pSize);
}
public void GetAddress(out ulong pAddress)
{
this.WrappedObject.GetAddress(out pAddress);
}
public void CreateBreakpoint(out ICorDebugValueBreakpoint ppBreakpoint)
{
Debugger.Interop.CorDebug.ICorDebugValueBreakpoint out_ppBreakpoint;
this.WrappedObject.CreateBreakpoint(out out_ppBreakpoint);
ppBreakpoint = ICorDebugValueBreakpoint.Wrap(out_ppBreakpoint);
}
public void GetValue(System.IntPtr pTo)
{
this.WrappedObject.GetValue(pTo);
}
public void SetValue(System.IntPtr pFrom)
{
this.WrappedObject.SetValue(pFrom);
}
}
}

146
src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugHandleValue.cs

@ -0,0 +1,146 @@ @@ -0,0 +1,146 @@
// <file>
// <copyright see="prj:///doc/copyright.txt"/>
// <license see="prj:///doc/license.txt"/>
// <owner name="David Srbecký" email="dsrbecky@gmail.com"/>
// <version>$Revision$</version>
// </file>
namespace Debugger.Wrappers.CorDebug
{
using System;
public class ICorDebugHandleValue
{
private Debugger.Interop.CorDebug.ICorDebugHandleValue wrappedObject;
internal Debugger.Interop.CorDebug.ICorDebugHandleValue WrappedObject
{
get
{
return this.wrappedObject;
}
}
public ICorDebugHandleValue(Debugger.Interop.CorDebug.ICorDebugHandleValue wrappedObject)
{
this.wrappedObject = wrappedObject;
}
public static ICorDebugHandleValue Wrap(Debugger.Interop.CorDebug.ICorDebugHandleValue objectToWrap)
{
return new ICorDebugHandleValue(objectToWrap);
}
public bool Is<T>() where T: class
{
try {
CastTo<T>();
return true;
} catch {
return false;
}
}
public T As<T>() where T: class
{
try {
return CastTo<T>();
} catch {
return null;
}
}
public T CastTo<T>() where T: class
{
return (T)Activator.CreateInstance(typeof(T), this.WrappedObject);
}
public static bool operator ==(ICorDebugHandleValue o1, ICorDebugHandleValue o2)
{
return ((object)o1 == null && (object)o2 == null) ||
((object)o1 != null && (object)o2 != null && o1.WrappedObject == o2.WrappedObject);
}
public static bool operator !=(ICorDebugHandleValue o1, ICorDebugHandleValue o2)
{
return !(o1 == o2);
}
public override int GetHashCode()
{
return base.GetHashCode();
}
public override bool Equals(object o)
{
ICorDebugHandleValue casted = o as ICorDebugHandleValue;
return (casted != null) && (casted.WrappedObject == wrappedObject);
}
public void GetType(out uint pType)
{
this.WrappedObject.GetType(out pType);
}
public void GetSize(out uint pSize)
{
this.WrappedObject.GetSize(out pSize);
}
public void GetAddress(out ulong pAddress)
{
this.WrappedObject.GetAddress(out pAddress);
}
public void CreateBreakpoint(out ICorDebugValueBreakpoint ppBreakpoint)
{
Debugger.Interop.CorDebug.ICorDebugValueBreakpoint out_ppBreakpoint;
this.WrappedObject.CreateBreakpoint(out out_ppBreakpoint);
ppBreakpoint = ICorDebugValueBreakpoint.Wrap(out_ppBreakpoint);
}
public void IsNull(out int pbNull)
{
this.WrappedObject.IsNull(out pbNull);
}
public void GetValue(out ulong pValue)
{
this.WrappedObject.GetValue(out pValue);
}
public void SetValue(ulong value)
{
this.WrappedObject.SetValue(value);
}
public void Dereference(out ICorDebugValue ppValue)
{
Debugger.Interop.CorDebug.ICorDebugValue out_ppValue;
this.WrappedObject.Dereference(out out_ppValue);
ppValue = ICorDebugValue.Wrap(out_ppValue);
}
public void DereferenceStrong(out ICorDebugValue ppValue)
{
Debugger.Interop.CorDebug.ICorDebugValue out_ppValue;
this.WrappedObject.DereferenceStrong(out out_ppValue);
ppValue = ICorDebugValue.Wrap(out_ppValue);
}
public void GetHandleType(out CorDebugHandleType pType)
{
Debugger.Interop.CorDebug.CorDebugHandleType out_pType;
this.WrappedObject.GetHandleType(out out_pType);
pType = ((CorDebugHandleType)(out_pType));
}
public void Dispose()
{
this.WrappedObject.Dispose();
}
}
}

117
src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugHeapValue.cs

@ -0,0 +1,117 @@ @@ -0,0 +1,117 @@
// <file>
// <copyright see="prj:///doc/copyright.txt"/>
// <license see="prj:///doc/license.txt"/>
// <owner name="David Srbecký" email="dsrbecky@gmail.com"/>
// <version>$Revision$</version>
// </file>
namespace Debugger.Wrappers.CorDebug
{
using System;
public class ICorDebugHeapValue
{
private Debugger.Interop.CorDebug.ICorDebugHeapValue wrappedObject;
internal Debugger.Interop.CorDebug.ICorDebugHeapValue WrappedObject
{
get
{
return this.wrappedObject;
}
}
public ICorDebugHeapValue(Debugger.Interop.CorDebug.ICorDebugHeapValue wrappedObject)
{
this.wrappedObject = wrappedObject;
}
public static ICorDebugHeapValue Wrap(Debugger.Interop.CorDebug.ICorDebugHeapValue objectToWrap)
{
return new ICorDebugHeapValue(objectToWrap);
}
public bool Is<T>() where T: class
{
try {
CastTo<T>();
return true;
} catch {
return false;
}
}
public T As<T>() where T: class
{
try {
return CastTo<T>();
} catch {
return null;
}
}
public T CastTo<T>() where T: class
{
return (T)Activator.CreateInstance(typeof(T), this.WrappedObject);
}
public static bool operator ==(ICorDebugHeapValue o1, ICorDebugHeapValue o2)
{
return ((object)o1 == null && (object)o2 == null) ||
((object)o1 != null && (object)o2 != null && o1.WrappedObject == o2.WrappedObject);
}
public static bool operator !=(ICorDebugHeapValue o1, ICorDebugHeapValue o2)
{
return !(o1 == o2);
}
public override int GetHashCode()
{
return base.GetHashCode();
}
public override bool Equals(object o)
{
ICorDebugHeapValue casted = o as ICorDebugHeapValue;
return (casted != null) && (casted.WrappedObject == wrappedObject);
}
public void GetType(out uint pType)
{
this.WrappedObject.GetType(out pType);
}
public void GetSize(out uint pSize)
{
this.WrappedObject.GetSize(out pSize);
}
public void GetAddress(out ulong pAddress)
{
this.WrappedObject.GetAddress(out pAddress);
}
public void CreateBreakpoint(out ICorDebugValueBreakpoint ppBreakpoint)
{
Debugger.Interop.CorDebug.ICorDebugValueBreakpoint out_ppBreakpoint;
this.WrappedObject.CreateBreakpoint(out out_ppBreakpoint);
ppBreakpoint = ICorDebugValueBreakpoint.Wrap(out_ppBreakpoint);
}
public void IsValid(out int pbValid)
{
this.WrappedObject.IsValid(out pbValid);
}
public void CreateRelocBreakpoint(out ICorDebugValueBreakpoint ppBreakpoint)
{
Debugger.Interop.CorDebug.ICorDebugValueBreakpoint out_ppBreakpoint;
this.WrappedObject.CreateRelocBreakpoint(out out_ppBreakpoint);
ppBreakpoint = ICorDebugValueBreakpoint.Wrap(out_ppBreakpoint);
}
}
}

90
src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugHeapValue2.cs

@ -0,0 +1,90 @@ @@ -0,0 +1,90 @@
// <file>
// <copyright see="prj:///doc/copyright.txt"/>
// <license see="prj:///doc/license.txt"/>
// <owner name="David Srbecký" email="dsrbecky@gmail.com"/>
// <version>$Revision$</version>
// </file>
namespace Debugger.Wrappers.CorDebug
{
using System;
public class ICorDebugHeapValue2
{
private Debugger.Interop.CorDebug.ICorDebugHeapValue2 wrappedObject;
internal Debugger.Interop.CorDebug.ICorDebugHeapValue2 WrappedObject
{
get
{
return this.wrappedObject;
}
}
public ICorDebugHeapValue2(Debugger.Interop.CorDebug.ICorDebugHeapValue2 wrappedObject)
{
this.wrappedObject = wrappedObject;
}
public static ICorDebugHeapValue2 Wrap(Debugger.Interop.CorDebug.ICorDebugHeapValue2 objectToWrap)
{
return new ICorDebugHeapValue2(objectToWrap);
}
public bool Is<T>() where T: class
{
try {
CastTo<T>();
return true;
} catch {
return false;
}
}
public T As<T>() where T: class
{
try {
return CastTo<T>();
} catch {
return null;
}
}
public T CastTo<T>() where T: class
{
return (T)Activator.CreateInstance(typeof(T), this.WrappedObject);
}
public static bool operator ==(ICorDebugHeapValue2 o1, ICorDebugHeapValue2 o2)
{
return ((object)o1 == null && (object)o2 == null) ||
((object)o1 != null && (object)o2 != null && o1.WrappedObject == o2.WrappedObject);
}
public static bool operator !=(ICorDebugHeapValue2 o1, ICorDebugHeapValue2 o2)
{
return !(o1 == o2);
}
public override int GetHashCode()
{
return base.GetHashCode();
}
public override bool Equals(object o)
{
ICorDebugHeapValue2 casted = o as ICorDebugHeapValue2;
return (casted != null) && (casted.WrappedObject == wrappedObject);
}
public void CreateHandle(CorDebugHandleType type, out ICorDebugHandleValue ppHandle)
{
Debugger.Interop.CorDebug.ICorDebugHandleValue out_ppHandle;
this.WrappedObject.CreateHandle(((Debugger.Interop.CorDebug.CorDebugHandleType)(type)), out out_ppHandle);
ppHandle = ICorDebugHandleValue.Wrap(out_ppHandle);
}
}
}

192
src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugILFrame.cs

@ -0,0 +1,192 @@ @@ -0,0 +1,192 @@
// <file>
// <copyright see="prj:///doc/copyright.txt"/>
// <license see="prj:///doc/license.txt"/>
// <owner name="David Srbecký" email="dsrbecky@gmail.com"/>
// <version>$Revision$</version>
// </file>
namespace Debugger.Wrappers.CorDebug
{
using System;
public class ICorDebugILFrame
{
private Debugger.Interop.CorDebug.ICorDebugILFrame wrappedObject;
internal Debugger.Interop.CorDebug.ICorDebugILFrame WrappedObject
{
get
{
return this.wrappedObject;
}
}
public ICorDebugILFrame(Debugger.Interop.CorDebug.ICorDebugILFrame wrappedObject)
{
this.wrappedObject = wrappedObject;
}
public static ICorDebugILFrame Wrap(Debugger.Interop.CorDebug.ICorDebugILFrame objectToWrap)
{
return new ICorDebugILFrame(objectToWrap);
}
public bool Is<T>() where T: class
{
try {
CastTo<T>();
return true;
} catch {
return false;
}
}
public T As<T>() where T: class
{
try {
return CastTo<T>();
} catch {
return null;
}
}
public T CastTo<T>() where T: class
{
return (T)Activator.CreateInstance(typeof(T), this.WrappedObject);
}
public static bool operator ==(ICorDebugILFrame o1, ICorDebugILFrame o2)
{
return ((object)o1 == null && (object)o2 == null) ||
((object)o1 != null && (object)o2 != null && o1.WrappedObject == o2.WrappedObject);
}
public static bool operator !=(ICorDebugILFrame o1, ICorDebugILFrame o2)
{
return !(o1 == o2);
}
public override int GetHashCode()
{
return base.GetHashCode();
}
public override bool Equals(object o)
{
ICorDebugILFrame casted = o as ICorDebugILFrame;
return (casted != null) && (casted.WrappedObject == wrappedObject);
}
public void GetChain(out ICorDebugChain ppChain)
{
Debugger.Interop.CorDebug.ICorDebugChain out_ppChain;
this.WrappedObject.GetChain(out out_ppChain);
ppChain = ICorDebugChain.Wrap(out_ppChain);
}
public void GetCode(out ICorDebugCode ppCode)
{
Debugger.Interop.CorDebug.ICorDebugCode out_ppCode;
this.WrappedObject.GetCode(out out_ppCode);
ppCode = ICorDebugCode.Wrap(out_ppCode);
}
public void GetFunction(out ICorDebugFunction ppFunction)
{
Debugger.Interop.CorDebug.ICorDebugFunction out_ppFunction;
this.WrappedObject.GetFunction(out out_ppFunction);
ppFunction = ICorDebugFunction.Wrap(out_ppFunction);
}
public void GetFunctionToken(out uint pToken)
{
this.WrappedObject.GetFunctionToken(out pToken);
}
public void GetStackRange(out ulong pStart, out ulong pEnd)
{
this.WrappedObject.GetStackRange(out pStart, out pEnd);
}
public void GetCaller(out ICorDebugFrame ppFrame)
{
Debugger.Interop.CorDebug.ICorDebugFrame out_ppFrame;
this.WrappedObject.GetCaller(out out_ppFrame);
ppFrame = ICorDebugFrame.Wrap(out_ppFrame);
}
public void GetCallee(out ICorDebugFrame ppFrame)
{
Debugger.Interop.CorDebug.ICorDebugFrame out_ppFrame;
this.WrappedObject.GetCallee(out out_ppFrame);
ppFrame = ICorDebugFrame.Wrap(out_ppFrame);
}
public void CreateStepper(out ICorDebugStepper ppStepper)
{
Debugger.Interop.CorDebug.ICorDebugStepper out_ppStepper;
this.WrappedObject.CreateStepper(out out_ppStepper);
ppStepper = ICorDebugStepper.Wrap(out_ppStepper);
}
public void GetIP(out uint pnOffset, out CorDebugMappingResult pMappingResult)
{
Debugger.Interop.CorDebug.CorDebugMappingResult out_pMappingResult;
this.WrappedObject.GetIP(out pnOffset, out out_pMappingResult);
pMappingResult = ((CorDebugMappingResult)(out_pMappingResult));
}
public void SetIP(uint nOffset)
{
this.WrappedObject.SetIP(nOffset);
}
public void EnumerateLocalVariables(out ICorDebugValueEnum ppValueEnum)
{
Debugger.Interop.CorDebug.ICorDebugValueEnum out_ppValueEnum;
this.WrappedObject.EnumerateLocalVariables(out out_ppValueEnum);
ppValueEnum = ICorDebugValueEnum.Wrap(out_ppValueEnum);
}
public void GetLocalVariable(uint dwIndex, out ICorDebugValue ppValue)
{
Debugger.Interop.CorDebug.ICorDebugValue out_ppValue;
this.WrappedObject.GetLocalVariable(dwIndex, out out_ppValue);
ppValue = ICorDebugValue.Wrap(out_ppValue);
}
public void EnumerateArguments(out ICorDebugValueEnum ppValueEnum)
{
Debugger.Interop.CorDebug.ICorDebugValueEnum out_ppValueEnum;
this.WrappedObject.EnumerateArguments(out out_ppValueEnum);
ppValueEnum = ICorDebugValueEnum.Wrap(out_ppValueEnum);
}
public void GetArgument(uint dwIndex, out ICorDebugValue ppValue)
{
Debugger.Interop.CorDebug.ICorDebugValue out_ppValue;
this.WrappedObject.GetArgument(dwIndex, out out_ppValue);
ppValue = ICorDebugValue.Wrap(out_ppValue);
}
public void GetStackDepth(out uint pDepth)
{
this.WrappedObject.GetStackDepth(out pDepth);
}
public void GetStackValue(uint dwIndex, out ICorDebugValue ppValue)
{
Debugger.Interop.CorDebug.ICorDebugValue out_ppValue;
this.WrappedObject.GetStackValue(dwIndex, out out_ppValue);
ppValue = ICorDebugValue.Wrap(out_ppValue);
}
public void CanSetIP(uint nOffset)
{
this.WrappedObject.CanSetIP(nOffset);
}
}
}

95
src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugILFrame2.cs

@ -0,0 +1,95 @@ @@ -0,0 +1,95 @@
// <file>
// <copyright see="prj:///doc/copyright.txt"/>
// <license see="prj:///doc/license.txt"/>
// <owner name="David Srbecký" email="dsrbecky@gmail.com"/>
// <version>$Revision$</version>
// </file>
namespace Debugger.Wrappers.CorDebug
{
using System;
public class ICorDebugILFrame2
{
private Debugger.Interop.CorDebug.ICorDebugILFrame2 wrappedObject;
internal Debugger.Interop.CorDebug.ICorDebugILFrame2 WrappedObject
{
get
{
return this.wrappedObject;
}
}
public ICorDebugILFrame2(Debugger.Interop.CorDebug.ICorDebugILFrame2 wrappedObject)
{
this.wrappedObject = wrappedObject;
}
public static ICorDebugILFrame2 Wrap(Debugger.Interop.CorDebug.ICorDebugILFrame2 objectToWrap)
{
return new ICorDebugILFrame2(objectToWrap);
}
public bool Is<T>() where T: class
{
try {
CastTo<T>();
return true;
} catch {
return false;
}
}
public T As<T>() where T: class
{
try {
return CastTo<T>();
} catch {
return null;
}
}
public T CastTo<T>() where T: class
{
return (T)Activator.CreateInstance(typeof(T), this.WrappedObject);
}
public static bool operator ==(ICorDebugILFrame2 o1, ICorDebugILFrame2 o2)
{
return ((object)o1 == null && (object)o2 == null) ||
((object)o1 != null && (object)o2 != null && o1.WrappedObject == o2.WrappedObject);
}
public static bool operator !=(ICorDebugILFrame2 o1, ICorDebugILFrame2 o2)
{
return !(o1 == o2);
}
public override int GetHashCode()
{
return base.GetHashCode();
}
public override bool Equals(object o)
{
ICorDebugILFrame2 casted = o as ICorDebugILFrame2;
return (casted != null) && (casted.WrappedObject == wrappedObject);
}
public void RemapFunction(uint newILOffset)
{
this.WrappedObject.RemapFunction(newILOffset);
}
public void EnumerateTypeParameters(out ICorDebugTypeEnum ppTyParEnum)
{
Debugger.Interop.CorDebug.ICorDebugTypeEnum out_ppTyParEnum;
this.WrappedObject.EnumerateTypeParameters(out out_ppTyParEnum);
ppTyParEnum = ICorDebugTypeEnum.Wrap(out_ppTyParEnum);
}
}
}

142
src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugInternalFrame.cs

@ -0,0 +1,142 @@ @@ -0,0 +1,142 @@
// <file>
// <copyright see="prj:///doc/copyright.txt"/>
// <license see="prj:///doc/license.txt"/>
// <owner name="David Srbecký" email="dsrbecky@gmail.com"/>
// <version>$Revision$</version>
// </file>
namespace Debugger.Wrappers.CorDebug
{
using System;
public class ICorDebugInternalFrame
{
private Debugger.Interop.CorDebug.ICorDebugInternalFrame wrappedObject;
internal Debugger.Interop.CorDebug.ICorDebugInternalFrame WrappedObject
{
get
{
return this.wrappedObject;
}
}
public ICorDebugInternalFrame(Debugger.Interop.CorDebug.ICorDebugInternalFrame wrappedObject)
{
this.wrappedObject = wrappedObject;
}
public static ICorDebugInternalFrame Wrap(Debugger.Interop.CorDebug.ICorDebugInternalFrame objectToWrap)
{
return new ICorDebugInternalFrame(objectToWrap);
}
public bool Is<T>() where T: class
{
try {
CastTo<T>();
return true;
} catch {
return false;
}
}
public T As<T>() where T: class
{
try {
return CastTo<T>();
} catch {
return null;
}
}
public T CastTo<T>() where T: class
{
return (T)Activator.CreateInstance(typeof(T), this.WrappedObject);
}
public static bool operator ==(ICorDebugInternalFrame o1, ICorDebugInternalFrame o2)
{
return ((object)o1 == null && (object)o2 == null) ||
((object)o1 != null && (object)o2 != null && o1.WrappedObject == o2.WrappedObject);
}
public static bool operator !=(ICorDebugInternalFrame o1, ICorDebugInternalFrame o2)
{
return !(o1 == o2);
}
public override int GetHashCode()
{
return base.GetHashCode();
}
public override bool Equals(object o)
{
ICorDebugInternalFrame casted = o as ICorDebugInternalFrame;
return (casted != null) && (casted.WrappedObject == wrappedObject);
}
public void GetChain(out ICorDebugChain ppChain)
{
Debugger.Interop.CorDebug.ICorDebugChain out_ppChain;
this.WrappedObject.GetChain(out out_ppChain);
ppChain = ICorDebugChain.Wrap(out_ppChain);
}
public void GetCode(out ICorDebugCode ppCode)
{
Debugger.Interop.CorDebug.ICorDebugCode out_ppCode;
this.WrappedObject.GetCode(out out_ppCode);
ppCode = ICorDebugCode.Wrap(out_ppCode);
}
public void GetFunction(out ICorDebugFunction ppFunction)
{
Debugger.Interop.CorDebug.ICorDebugFunction out_ppFunction;
this.WrappedObject.GetFunction(out out_ppFunction);
ppFunction = ICorDebugFunction.Wrap(out_ppFunction);
}
public void GetFunctionToken(out uint pToken)
{
this.WrappedObject.GetFunctionToken(out pToken);
}
public void GetStackRange(out ulong pStart, out ulong pEnd)
{
this.WrappedObject.GetStackRange(out pStart, out pEnd);
}
public void GetCaller(out ICorDebugFrame ppFrame)
{
Debugger.Interop.CorDebug.ICorDebugFrame out_ppFrame;
this.WrappedObject.GetCaller(out out_ppFrame);
ppFrame = ICorDebugFrame.Wrap(out_ppFrame);
}
public void GetCallee(out ICorDebugFrame ppFrame)
{
Debugger.Interop.CorDebug.ICorDebugFrame out_ppFrame;
this.WrappedObject.GetCallee(out out_ppFrame);
ppFrame = ICorDebugFrame.Wrap(out_ppFrame);
}
public void CreateStepper(out ICorDebugStepper ppStepper)
{
Debugger.Interop.CorDebug.ICorDebugStepper out_ppStepper;
this.WrappedObject.CreateStepper(out out_ppStepper);
ppStepper = ICorDebugStepper.Wrap(out_ppStepper);
}
public void GetFrameType(out CorDebugInternalFrameType pType)
{
Debugger.Interop.CorDebug.CorDebugInternalFrameType out_pType;
this.WrappedObject.GetFrameType(out out_pType);
pType = ((CorDebugInternalFrameType)(out_pType));
}
}
}

110
src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugMDA.cs

@ -0,0 +1,110 @@ @@ -0,0 +1,110 @@
// <file>
// <copyright see="prj:///doc/copyright.txt"/>
// <license see="prj:///doc/license.txt"/>
// <owner name="David Srbecký" email="dsrbecky@gmail.com"/>
// <version>$Revision$</version>
// </file>
namespace Debugger.Wrappers.CorDebug
{
using System;
public class ICorDebugMDA
{
private Debugger.Interop.CorDebug.ICorDebugMDA wrappedObject;
internal Debugger.Interop.CorDebug.ICorDebugMDA WrappedObject
{
get
{
return this.wrappedObject;
}
}
public ICorDebugMDA(Debugger.Interop.CorDebug.ICorDebugMDA wrappedObject)
{
this.wrappedObject = wrappedObject;
}
public static ICorDebugMDA Wrap(Debugger.Interop.CorDebug.ICorDebugMDA objectToWrap)
{
return new ICorDebugMDA(objectToWrap);
}
public bool Is<T>() where T: class
{
try {
CastTo<T>();
return true;
} catch {
return false;
}
}
public T As<T>() where T: class
{
try {
return CastTo<T>();
} catch {
return null;
}
}
public T CastTo<T>() where T: class
{
return (T)Activator.CreateInstance(typeof(T), this.WrappedObject);
}
public static bool operator ==(ICorDebugMDA o1, ICorDebugMDA o2)
{
return ((object)o1 == null && (object)o2 == null) ||
((object)o1 != null && (object)o2 != null && o1.WrappedObject == o2.WrappedObject);
}
public static bool operator !=(ICorDebugMDA o1, ICorDebugMDA o2)
{
return !(o1 == o2);
}
public override int GetHashCode()
{
return base.GetHashCode();
}
public override bool Equals(object o)
{
ICorDebugMDA casted = o as ICorDebugMDA;
return (casted != null) && (casted.WrappedObject == wrappedObject);
}
public void GetName(uint cchName, out uint pcchName, System.IntPtr szName)
{
this.WrappedObject.GetName(cchName, out pcchName, szName);
}
public void GetDescription(uint cchName, out uint pcchName, System.IntPtr szName)
{
this.WrappedObject.GetDescription(cchName, out pcchName, szName);
}
public void GetXML(uint cchName, out uint pcchName, System.IntPtr szName)
{
this.WrappedObject.GetXML(cchName, out pcchName, szName);
}
public void GetFlags(ref CorDebugMDAFlags pFlags)
{
Debugger.Interop.CorDebug.CorDebugMDAFlags ref_pFlags = ((Debugger.Interop.CorDebug.CorDebugMDAFlags)(pFlags));
this.WrappedObject.GetFlags(ref ref_pFlags);
pFlags = ((CorDebugMDAFlags)(ref_pFlags));
}
public void GetOSThreadId(out uint pOsTid)
{
this.WrappedObject.GetOSThreadId(out pOsTid);
}
}
}

213
src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugManagedCallback.cs

@ -0,0 +1,213 @@ @@ -0,0 +1,213 @@
// <file>
// <copyright see="prj:///doc/copyright.txt"/>
// <license see="prj:///doc/license.txt"/>
// <owner name="David Srbecký" email="dsrbecky@gmail.com"/>
// <version>$Revision$</version>
// </file>
namespace Debugger.Wrappers.CorDebug
{
using System;
public class ICorDebugManagedCallback
{
private Debugger.Interop.CorDebug.ICorDebugManagedCallback wrappedObject;
internal Debugger.Interop.CorDebug.ICorDebugManagedCallback WrappedObject
{
get
{
return this.wrappedObject;
}
}
public ICorDebugManagedCallback(Debugger.Interop.CorDebug.ICorDebugManagedCallback wrappedObject)
{
this.wrappedObject = wrappedObject;
}
public static ICorDebugManagedCallback Wrap(Debugger.Interop.CorDebug.ICorDebugManagedCallback objectToWrap)
{
return new ICorDebugManagedCallback(objectToWrap);
}
public bool Is<T>() where T: class
{
try {
CastTo<T>();
return true;
} catch {
return false;
}
}
public T As<T>() where T: class
{
try {
return CastTo<T>();
} catch {
return null;
}
}
public T CastTo<T>() where T: class
{
return (T)Activator.CreateInstance(typeof(T), this.WrappedObject);
}
public static bool operator ==(ICorDebugManagedCallback o1, ICorDebugManagedCallback o2)
{
return ((object)o1 == null && (object)o2 == null) ||
((object)o1 != null && (object)o2 != null && o1.WrappedObject == o2.WrappedObject);
}
public static bool operator !=(ICorDebugManagedCallback o1, ICorDebugManagedCallback o2)
{
return !(o1 == o2);
}
public override int GetHashCode()
{
return base.GetHashCode();
}
public override bool Equals(object o)
{
ICorDebugManagedCallback casted = o as ICorDebugManagedCallback;
return (casted != null) && (casted.WrappedObject == wrappedObject);
}
public void Breakpoint(System.IntPtr pAppDomain, System.IntPtr pThread, System.IntPtr pBreakpoint)
{
this.WrappedObject.Breakpoint(pAppDomain, pThread, pBreakpoint);
}
public void StepComplete(System.IntPtr pAppDomain, System.IntPtr pThread, System.IntPtr pStepper, CorDebugStepReason reason)
{
this.WrappedObject.StepComplete(pAppDomain, pThread, pStepper, ((Debugger.Interop.CorDebug.CorDebugStepReason)(reason)));
}
public void Break(System.IntPtr pAppDomain, System.IntPtr thread)
{
this.WrappedObject.Break(pAppDomain, thread);
}
public void Exception(System.IntPtr pAppDomain, System.IntPtr pThread, int unhandled)
{
this.WrappedObject.Exception(pAppDomain, pThread, unhandled);
}
public void EvalComplete(System.IntPtr pAppDomain, System.IntPtr pThread, System.IntPtr pEval)
{
this.WrappedObject.EvalComplete(pAppDomain, pThread, pEval);
}
public void EvalException(System.IntPtr pAppDomain, System.IntPtr pThread, System.IntPtr pEval)
{
this.WrappedObject.EvalException(pAppDomain, pThread, pEval);
}
public void CreateProcess(System.IntPtr pProcess)
{
this.WrappedObject.CreateProcess(pProcess);
}
public void ExitProcess(System.IntPtr pProcess)
{
this.WrappedObject.ExitProcess(pProcess);
}
public void CreateThread(System.IntPtr pAppDomain, System.IntPtr thread)
{
this.WrappedObject.CreateThread(pAppDomain, thread);
}
public void ExitThread(System.IntPtr pAppDomain, System.IntPtr thread)
{
this.WrappedObject.ExitThread(pAppDomain, thread);
}
public void LoadModule(System.IntPtr pAppDomain, System.IntPtr pModule)
{
this.WrappedObject.LoadModule(pAppDomain, pModule);
}
public void UnloadModule(System.IntPtr pAppDomain, System.IntPtr pModule)
{
this.WrappedObject.UnloadModule(pAppDomain, pModule);
}
public void LoadClass(System.IntPtr pAppDomain, System.IntPtr c)
{
this.WrappedObject.LoadClass(pAppDomain, c);
}
public void UnloadClass(System.IntPtr pAppDomain, System.IntPtr c)
{
this.WrappedObject.UnloadClass(pAppDomain, c);
}
public void DebuggerError(System.IntPtr pProcess, int errorHR, uint errorCode)
{
this.WrappedObject.DebuggerError(pProcess, errorHR, errorCode);
}
public void LogMessage(System.IntPtr pAppDomain, System.IntPtr pThread, int lLevel, System.IntPtr pLogSwitchName, System.IntPtr pMessage)
{
this.WrappedObject.LogMessage(pAppDomain, pThread, lLevel, pLogSwitchName, pMessage);
}
public void LogSwitch(System.IntPtr pAppDomain, System.IntPtr pThread, int lLevel, uint ulReason, System.IntPtr pLogSwitchName, System.IntPtr pParentName)
{
this.WrappedObject.LogSwitch(pAppDomain, pThread, lLevel, ulReason, pLogSwitchName, pParentName);
}
public void CreateAppDomain(System.IntPtr pProcess, System.IntPtr pAppDomain)
{
this.WrappedObject.CreateAppDomain(pProcess, pAppDomain);
}
public void ExitAppDomain(System.IntPtr pProcess, System.IntPtr pAppDomain)
{
this.WrappedObject.ExitAppDomain(pProcess, pAppDomain);
}
public void LoadAssembly(System.IntPtr pAppDomain, System.IntPtr pAssembly)
{
this.WrappedObject.LoadAssembly(pAppDomain, pAssembly);
}
public void UnloadAssembly(System.IntPtr pAppDomain, System.IntPtr pAssembly)
{
this.WrappedObject.UnloadAssembly(pAppDomain, pAssembly);
}
public void ControlCTrap(System.IntPtr pProcess)
{
this.WrappedObject.ControlCTrap(pProcess);
}
public void NameChange(System.IntPtr pAppDomain, System.IntPtr pThread)
{
this.WrappedObject.NameChange(pAppDomain, pThread);
}
public void UpdateModuleSymbols(System.IntPtr pAppDomain, System.IntPtr pModule, System.IntPtr pSymbolStream)
{
this.WrappedObject.UpdateModuleSymbols(pAppDomain, pModule, pSymbolStream);
}
public void EditAndContinueRemap(System.IntPtr pAppDomain, System.IntPtr pThread, System.IntPtr pFunction, int fAccurate)
{
this.WrappedObject.EditAndContinueRemap(pAppDomain, pThread, pFunction, fAccurate);
}
public void BreakpointSetError(System.IntPtr pAppDomain, System.IntPtr pThread, System.IntPtr pBreakpoint, uint dwError)
{
this.WrappedObject.BreakpointSetError(pAppDomain, pThread, pBreakpoint, dwError);
}
}
}

123
src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugManagedCallback2.cs

@ -0,0 +1,123 @@ @@ -0,0 +1,123 @@
// <file>
// <copyright see="prj:///doc/copyright.txt"/>
// <license see="prj:///doc/license.txt"/>
// <owner name="David Srbecký" email="dsrbecky@gmail.com"/>
// <version>$Revision$</version>
// </file>
namespace Debugger.Wrappers.CorDebug
{
using System;
public class ICorDebugManagedCallback2
{
private Debugger.Interop.CorDebug.ICorDebugManagedCallback2 wrappedObject;
internal Debugger.Interop.CorDebug.ICorDebugManagedCallback2 WrappedObject
{
get
{
return this.wrappedObject;
}
}
public ICorDebugManagedCallback2(Debugger.Interop.CorDebug.ICorDebugManagedCallback2 wrappedObject)
{
this.wrappedObject = wrappedObject;
}
public static ICorDebugManagedCallback2 Wrap(Debugger.Interop.CorDebug.ICorDebugManagedCallback2 objectToWrap)
{
return new ICorDebugManagedCallback2(objectToWrap);
}
public bool Is<T>() where T: class
{
try {
CastTo<T>();
return true;
} catch {
return false;
}
}
public T As<T>() where T: class
{
try {
return CastTo<T>();
} catch {
return null;
}
}
public T CastTo<T>() where T: class
{
return (T)Activator.CreateInstance(typeof(T), this.WrappedObject);
}
public static bool operator ==(ICorDebugManagedCallback2 o1, ICorDebugManagedCallback2 o2)
{
return ((object)o1 == null && (object)o2 == null) ||
((object)o1 != null && (object)o2 != null && o1.WrappedObject == o2.WrappedObject);
}
public static bool operator !=(ICorDebugManagedCallback2 o1, ICorDebugManagedCallback2 o2)
{
return !(o1 == o2);
}
public override int GetHashCode()
{
return base.GetHashCode();
}
public override bool Equals(object o)
{
ICorDebugManagedCallback2 casted = o as ICorDebugManagedCallback2;
return (casted != null) && (casted.WrappedObject == wrappedObject);
}
public void FunctionRemapOpportunity(System.IntPtr pAppDomain, System.IntPtr pThread, System.IntPtr pOldFunction, System.IntPtr pNewFunction, uint oldILOffset)
{
this.WrappedObject.FunctionRemapOpportunity(pAppDomain, pThread, pOldFunction, pNewFunction, oldILOffset);
}
public void CreateConnection(System.IntPtr pProcess, uint dwConnectionId, ref ushort pConnName)
{
this.WrappedObject.CreateConnection(pProcess, dwConnectionId, ref pConnName);
}
public void ChangeConnection(System.IntPtr pProcess, uint dwConnectionId)
{
this.WrappedObject.ChangeConnection(pProcess, dwConnectionId);
}
public void DestroyConnection(System.IntPtr pProcess, uint dwConnectionId)
{
this.WrappedObject.DestroyConnection(pProcess, dwConnectionId);
}
public void Exception(System.IntPtr pAppDomain, System.IntPtr pThread, System.IntPtr pFrame, uint nOffset, CorDebugExceptionCallbackType dwEventType, uint dwFlags)
{
this.WrappedObject.Exception(pAppDomain, pThread, pFrame, nOffset, ((Debugger.Interop.CorDebug.CorDebugExceptionCallbackType)(dwEventType)), dwFlags);
}
public void ExceptionUnwind(System.IntPtr pAppDomain, System.IntPtr pThread, CorDebugExceptionUnwindCallbackType dwEventType, uint dwFlags)
{
this.WrappedObject.ExceptionUnwind(pAppDomain, pThread, ((Debugger.Interop.CorDebug.CorDebugExceptionUnwindCallbackType)(dwEventType)), dwFlags);
}
public void FunctionRemapComplete(System.IntPtr pAppDomain, System.IntPtr pThread, System.IntPtr pFunction)
{
this.WrappedObject.FunctionRemapComplete(pAppDomain, pThread, pFunction);
}
public void MDANotification(System.IntPtr pController, System.IntPtr pThread, System.IntPtr pMDA)
{
this.WrappedObject.MDANotification(pController, pThread, pMDA);
}
}
}

184
src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugModule.cs

@ -0,0 +1,184 @@ @@ -0,0 +1,184 @@
// <file>
// <copyright see="prj:///doc/copyright.txt"/>
// <license see="prj:///doc/license.txt"/>
// <owner name="David Srbecký" email="dsrbecky@gmail.com"/>
// <version>$Revision$</version>
// </file>
namespace Debugger.Wrappers.CorDebug
{
using System;
public class ICorDebugModule
{
private Debugger.Interop.CorDebug.ICorDebugModule wrappedObject;
internal Debugger.Interop.CorDebug.ICorDebugModule WrappedObject
{
get
{
return this.wrappedObject;
}
}
public ICorDebugModule(Debugger.Interop.CorDebug.ICorDebugModule wrappedObject)
{
this.wrappedObject = wrappedObject;
}
public static ICorDebugModule Wrap(Debugger.Interop.CorDebug.ICorDebugModule objectToWrap)
{
return new ICorDebugModule(objectToWrap);
}
public bool Is<T>() where T: class
{
try {
CastTo<T>();
return true;
} catch {
return false;
}
}
public T As<T>() where T: class
{
try {
return CastTo<T>();
} catch {
return null;
}
}
public T CastTo<T>() where T: class
{
return (T)Activator.CreateInstance(typeof(T), this.WrappedObject);
}
public static bool operator ==(ICorDebugModule o1, ICorDebugModule o2)
{
return ((object)o1 == null && (object)o2 == null) ||
((object)o1 != null && (object)o2 != null && o1.WrappedObject == o2.WrappedObject);
}
public static bool operator !=(ICorDebugModule o1, ICorDebugModule o2)
{
return !(o1 == o2);
}
public override int GetHashCode()
{
return base.GetHashCode();
}
public override bool Equals(object o)
{
ICorDebugModule casted = o as ICorDebugModule;
return (casted != null) && (casted.WrappedObject == wrappedObject);
}
public void GetProcess(out ICorDebugProcess ppProcess)
{
Debugger.Interop.CorDebug.ICorDebugProcess out_ppProcess;
this.WrappedObject.GetProcess(out out_ppProcess);
ppProcess = ICorDebugProcess.Wrap(out_ppProcess);
}
public void GetBaseAddress(out ulong pAddress)
{
this.WrappedObject.GetBaseAddress(out pAddress);
}
public void GetAssembly(out ICorDebugAssembly ppAssembly)
{
Debugger.Interop.CorDebug.ICorDebugAssembly out_ppAssembly;
this.WrappedObject.GetAssembly(out out_ppAssembly);
ppAssembly = ICorDebugAssembly.Wrap(out_ppAssembly);
}
public void GetName(uint cchName, out uint pcchName, System.IntPtr szName)
{
this.WrappedObject.GetName(cchName, out pcchName, szName);
}
public void EnableJITDebugging(int bTrackJITInfo, int bAllowJitOpts)
{
this.WrappedObject.EnableJITDebugging(bTrackJITInfo, bAllowJitOpts);
}
public void EnableClassLoadCallbacks(int bClassLoadCallbacks)
{
this.WrappedObject.EnableClassLoadCallbacks(bClassLoadCallbacks);
}
public void GetFunctionFromToken(uint methodDef, out ICorDebugFunction ppFunction)
{
Debugger.Interop.CorDebug.ICorDebugFunction out_ppFunction;
this.WrappedObject.GetFunctionFromToken(methodDef, out out_ppFunction);
ppFunction = ICorDebugFunction.Wrap(out_ppFunction);
}
public void GetFunctionFromRVA(ulong rva, out ICorDebugFunction ppFunction)
{
Debugger.Interop.CorDebug.ICorDebugFunction out_ppFunction;
this.WrappedObject.GetFunctionFromRVA(rva, out out_ppFunction);
ppFunction = ICorDebugFunction.Wrap(out_ppFunction);
}
public void GetClassFromToken(uint typeDef, out ICorDebugClass ppClass)
{
Debugger.Interop.CorDebug.ICorDebugClass out_ppClass;
this.WrappedObject.GetClassFromToken(typeDef, out out_ppClass);
ppClass = ICorDebugClass.Wrap(out_ppClass);
}
public void CreateBreakpoint(out ICorDebugModuleBreakpoint ppBreakpoint)
{
Debugger.Interop.CorDebug.ICorDebugModuleBreakpoint out_ppBreakpoint;
this.WrappedObject.CreateBreakpoint(out out_ppBreakpoint);
ppBreakpoint = ICorDebugModuleBreakpoint.Wrap(out_ppBreakpoint);
}
public void GetEditAndContinueSnapshot(out ICorDebugEditAndContinueSnapshot ppEditAndContinueSnapshot)
{
Debugger.Interop.CorDebug.ICorDebugEditAndContinueSnapshot out_ppEditAndContinueSnapshot;
this.WrappedObject.GetEditAndContinueSnapshot(out out_ppEditAndContinueSnapshot);
ppEditAndContinueSnapshot = ICorDebugEditAndContinueSnapshot.Wrap(out_ppEditAndContinueSnapshot);
}
public void GetMetaDataInterface(ref System.Guid riid, out object ppObj)
{
this.WrappedObject.GetMetaDataInterface(ref riid, out ppObj);
}
public void GetToken(out uint pToken)
{
this.WrappedObject.GetToken(out pToken);
}
public void IsDynamic(out int pDynamic)
{
this.WrappedObject.IsDynamic(out pDynamic);
}
public void GetGlobalVariableValue(uint fieldDef, out ICorDebugValue ppValue)
{
Debugger.Interop.CorDebug.ICorDebugValue out_ppValue;
this.WrappedObject.GetGlobalVariableValue(fieldDef, out out_ppValue);
ppValue = ICorDebugValue.Wrap(out_ppValue);
}
public void GetSize(out uint pcBytes)
{
this.WrappedObject.GetSize(out pcBytes);
}
public void IsInMemory(out int pInMemory)
{
this.WrappedObject.IsInMemory(out pInMemory);
}
}
}

110
src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugModule2.cs

@ -0,0 +1,110 @@ @@ -0,0 +1,110 @@
// <file>
// <copyright see="prj:///doc/copyright.txt"/>
// <license see="prj:///doc/license.txt"/>
// <owner name="David Srbecký" email="dsrbecky@gmail.com"/>
// <version>$Revision$</version>
// </file>
namespace Debugger.Wrappers.CorDebug
{
using System;
public class ICorDebugModule2
{
private Debugger.Interop.CorDebug.ICorDebugModule2 wrappedObject;
internal Debugger.Interop.CorDebug.ICorDebugModule2 WrappedObject
{
get
{
return this.wrappedObject;
}
}
public ICorDebugModule2(Debugger.Interop.CorDebug.ICorDebugModule2 wrappedObject)
{
this.wrappedObject = wrappedObject;
}
public static ICorDebugModule2 Wrap(Debugger.Interop.CorDebug.ICorDebugModule2 objectToWrap)
{
return new ICorDebugModule2(objectToWrap);
}
public bool Is<T>() where T: class
{
try {
CastTo<T>();
return true;
} catch {
return false;
}
}
public T As<T>() where T: class
{
try {
return CastTo<T>();
} catch {
return null;
}
}
public T CastTo<T>() where T: class
{
return (T)Activator.CreateInstance(typeof(T), this.WrappedObject);
}
public static bool operator ==(ICorDebugModule2 o1, ICorDebugModule2 o2)
{
return ((object)o1 == null && (object)o2 == null) ||
((object)o1 != null && (object)o2 != null && o1.WrappedObject == o2.WrappedObject);
}
public static bool operator !=(ICorDebugModule2 o1, ICorDebugModule2 o2)
{
return !(o1 == o2);
}
public override int GetHashCode()
{
return base.GetHashCode();
}
public override bool Equals(object o)
{
ICorDebugModule2 casted = o as ICorDebugModule2;
return (casted != null) && (casted.WrappedObject == wrappedObject);
}
public void SetJMCStatus(int bIsJustMyCode, uint cTokens, ref uint pTokens)
{
this.WrappedObject.SetJMCStatus(bIsJustMyCode, cTokens, ref pTokens);
}
public void ApplyChanges(uint cbMetadata, byte[] pbMetadata, uint cbIL, byte[] pbIL)
{
this.WrappedObject.ApplyChanges(cbMetadata, pbMetadata, cbIL, pbIL);
}
public void SetJITCompilerFlags(uint dwFlags)
{
this.WrappedObject.SetJITCompilerFlags(dwFlags);
}
public void GetJITCompilerFlags(out uint pdwFlags)
{
this.WrappedObject.GetJITCompilerFlags(out pdwFlags);
}
public void ResolveAssembly(uint tkAssemblyRef, ref ICorDebugAssembly ppAssembly)
{
Debugger.Interop.CorDebug.ICorDebugAssembly ref_ppAssembly = ppAssembly.WrappedObject;
this.WrappedObject.ResolveAssembly(tkAssemblyRef, ref ref_ppAssembly);
ppAssembly = ICorDebugAssembly.Wrap(ref_ppAssembly);
}
}
}

100
src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugModuleBreakpoint.cs

@ -0,0 +1,100 @@ @@ -0,0 +1,100 @@
// <file>
// <copyright see="prj:///doc/copyright.txt"/>
// <license see="prj:///doc/license.txt"/>
// <owner name="David Srbecký" email="dsrbecky@gmail.com"/>
// <version>$Revision$</version>
// </file>
namespace Debugger.Wrappers.CorDebug
{
using System;
public class ICorDebugModuleBreakpoint
{
private Debugger.Interop.CorDebug.ICorDebugModuleBreakpoint wrappedObject;
internal Debugger.Interop.CorDebug.ICorDebugModuleBreakpoint WrappedObject
{
get
{
return this.wrappedObject;
}
}
public ICorDebugModuleBreakpoint(Debugger.Interop.CorDebug.ICorDebugModuleBreakpoint wrappedObject)
{
this.wrappedObject = wrappedObject;
}
public static ICorDebugModuleBreakpoint Wrap(Debugger.Interop.CorDebug.ICorDebugModuleBreakpoint objectToWrap)
{
return new ICorDebugModuleBreakpoint(objectToWrap);
}
public bool Is<T>() where T: class
{
try {
CastTo<T>();
return true;
} catch {
return false;
}
}
public T As<T>() where T: class
{
try {
return CastTo<T>();
} catch {
return null;
}
}
public T CastTo<T>() where T: class
{
return (T)Activator.CreateInstance(typeof(T), this.WrappedObject);
}
public static bool operator ==(ICorDebugModuleBreakpoint o1, ICorDebugModuleBreakpoint o2)
{
return ((object)o1 == null && (object)o2 == null) ||
((object)o1 != null && (object)o2 != null && o1.WrappedObject == o2.WrappedObject);
}
public static bool operator !=(ICorDebugModuleBreakpoint o1, ICorDebugModuleBreakpoint o2)
{
return !(o1 == o2);
}
public override int GetHashCode()
{
return base.GetHashCode();
}
public override bool Equals(object o)
{
ICorDebugModuleBreakpoint casted = o as ICorDebugModuleBreakpoint;
return (casted != null) && (casted.WrappedObject == wrappedObject);
}
public void Activate(int bActive)
{
this.WrappedObject.Activate(bActive);
}
public void IsActive(out int pbActive)
{
this.WrappedObject.IsActive(out pbActive);
}
public void GetModule(out ICorDebugModule ppModule)
{
Debugger.Interop.CorDebug.ICorDebugModule out_ppModule;
this.WrappedObject.GetModule(out out_ppModule);
ppModule = ICorDebugModule.Wrap(out_ppModule);
}
}
}

110
src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugModuleEnum.cs

@ -0,0 +1,110 @@ @@ -0,0 +1,110 @@
// <file>
// <copyright see="prj:///doc/copyright.txt"/>
// <license see="prj:///doc/license.txt"/>
// <owner name="David Srbecký" email="dsrbecky@gmail.com"/>
// <version>$Revision$</version>
// </file>
namespace Debugger.Wrappers.CorDebug
{
using System;
public class ICorDebugModuleEnum
{
private Debugger.Interop.CorDebug.ICorDebugModuleEnum wrappedObject;
internal Debugger.Interop.CorDebug.ICorDebugModuleEnum WrappedObject
{
get
{
return this.wrappedObject;
}
}
public ICorDebugModuleEnum(Debugger.Interop.CorDebug.ICorDebugModuleEnum wrappedObject)
{
this.wrappedObject = wrappedObject;
}
public static ICorDebugModuleEnum Wrap(Debugger.Interop.CorDebug.ICorDebugModuleEnum objectToWrap)
{
return new ICorDebugModuleEnum(objectToWrap);
}
public bool Is<T>() where T: class
{
try {
CastTo<T>();
return true;
} catch {
return false;
}
}
public T As<T>() where T: class
{
try {
return CastTo<T>();
} catch {
return null;
}
}
public T CastTo<T>() where T: class
{
return (T)Activator.CreateInstance(typeof(T), this.WrappedObject);
}
public static bool operator ==(ICorDebugModuleEnum o1, ICorDebugModuleEnum o2)
{
return ((object)o1 == null && (object)o2 == null) ||
((object)o1 != null && (object)o2 != null && o1.WrappedObject == o2.WrappedObject);
}
public static bool operator !=(ICorDebugModuleEnum o1, ICorDebugModuleEnum o2)
{
return !(o1 == o2);
}
public override int GetHashCode()
{
return base.GetHashCode();
}
public override bool Equals(object o)
{
ICorDebugModuleEnum casted = o as ICorDebugModuleEnum;
return (casted != null) && (casted.WrappedObject == wrappedObject);
}
public void Skip(uint celt)
{
this.WrappedObject.Skip(celt);
}
public void Reset()
{
this.WrappedObject.Reset();
}
public void Clone(out ICorDebugEnum ppEnum)
{
Debugger.Interop.CorDebug.ICorDebugEnum out_ppEnum;
this.WrappedObject.Clone(out out_ppEnum);
ppEnum = ICorDebugEnum.Wrap(out_ppEnum);
}
public void GetCount(out uint pcelt)
{
this.WrappedObject.GetCount(out pcelt);
}
public void Next(uint celt, System.IntPtr modules, out uint pceltFetched)
{
this.WrappedObject.Next(celt, modules, out pceltFetched);
}
}
}

192
src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugNativeFrame.cs

@ -0,0 +1,192 @@ @@ -0,0 +1,192 @@
// <file>
// <copyright see="prj:///doc/copyright.txt"/>
// <license see="prj:///doc/license.txt"/>
// <owner name="David Srbecký" email="dsrbecky@gmail.com"/>
// <version>$Revision$</version>
// </file>
namespace Debugger.Wrappers.CorDebug
{
using System;
public class ICorDebugNativeFrame
{
private Debugger.Interop.CorDebug.ICorDebugNativeFrame wrappedObject;
internal Debugger.Interop.CorDebug.ICorDebugNativeFrame WrappedObject
{
get
{
return this.wrappedObject;
}
}
public ICorDebugNativeFrame(Debugger.Interop.CorDebug.ICorDebugNativeFrame wrappedObject)
{
this.wrappedObject = wrappedObject;
}
public static ICorDebugNativeFrame Wrap(Debugger.Interop.CorDebug.ICorDebugNativeFrame objectToWrap)
{
return new ICorDebugNativeFrame(objectToWrap);
}
public bool Is<T>() where T: class
{
try {
CastTo<T>();
return true;
} catch {
return false;
}
}
public T As<T>() where T: class
{
try {
return CastTo<T>();
} catch {
return null;
}
}
public T CastTo<T>() where T: class
{
return (T)Activator.CreateInstance(typeof(T), this.WrappedObject);
}
public static bool operator ==(ICorDebugNativeFrame o1, ICorDebugNativeFrame o2)
{
return ((object)o1 == null && (object)o2 == null) ||
((object)o1 != null && (object)o2 != null && o1.WrappedObject == o2.WrappedObject);
}
public static bool operator !=(ICorDebugNativeFrame o1, ICorDebugNativeFrame o2)
{
return !(o1 == o2);
}
public override int GetHashCode()
{
return base.GetHashCode();
}
public override bool Equals(object o)
{
ICorDebugNativeFrame casted = o as ICorDebugNativeFrame;
return (casted != null) && (casted.WrappedObject == wrappedObject);
}
public void GetChain(out ICorDebugChain ppChain)
{
Debugger.Interop.CorDebug.ICorDebugChain out_ppChain;
this.WrappedObject.GetChain(out out_ppChain);
ppChain = ICorDebugChain.Wrap(out_ppChain);
}
public void GetCode(out ICorDebugCode ppCode)
{
Debugger.Interop.CorDebug.ICorDebugCode out_ppCode;
this.WrappedObject.GetCode(out out_ppCode);
ppCode = ICorDebugCode.Wrap(out_ppCode);
}
public void GetFunction(out ICorDebugFunction ppFunction)
{
Debugger.Interop.CorDebug.ICorDebugFunction out_ppFunction;
this.WrappedObject.GetFunction(out out_ppFunction);
ppFunction = ICorDebugFunction.Wrap(out_ppFunction);
}
public void GetFunctionToken(out uint pToken)
{
this.WrappedObject.GetFunctionToken(out pToken);
}
public void GetStackRange(out ulong pStart, out ulong pEnd)
{
this.WrappedObject.GetStackRange(out pStart, out pEnd);
}
public void GetCaller(out ICorDebugFrame ppFrame)
{
Debugger.Interop.CorDebug.ICorDebugFrame out_ppFrame;
this.WrappedObject.GetCaller(out out_ppFrame);
ppFrame = ICorDebugFrame.Wrap(out_ppFrame);
}
public void GetCallee(out ICorDebugFrame ppFrame)
{
Debugger.Interop.CorDebug.ICorDebugFrame out_ppFrame;
this.WrappedObject.GetCallee(out out_ppFrame);
ppFrame = ICorDebugFrame.Wrap(out_ppFrame);
}
public void CreateStepper(out ICorDebugStepper ppStepper)
{
Debugger.Interop.CorDebug.ICorDebugStepper out_ppStepper;
this.WrappedObject.CreateStepper(out out_ppStepper);
ppStepper = ICorDebugStepper.Wrap(out_ppStepper);
}
public void GetIP(out uint pnOffset)
{
this.WrappedObject.GetIP(out pnOffset);
}
public void SetIP(uint nOffset)
{
this.WrappedObject.SetIP(nOffset);
}
public void GetRegisterSet(out ICorDebugRegisterSet ppRegisters)
{
Debugger.Interop.CorDebug.ICorDebugRegisterSet out_ppRegisters;
this.WrappedObject.GetRegisterSet(out out_ppRegisters);
ppRegisters = ICorDebugRegisterSet.Wrap(out_ppRegisters);
}
public void GetLocalRegisterValue(CorDebugRegister reg, uint cbSigBlob, uint pvSigBlob, out ICorDebugValue ppValue)
{
Debugger.Interop.CorDebug.ICorDebugValue out_ppValue;
this.WrappedObject.GetLocalRegisterValue(((Debugger.Interop.CorDebug.CorDebugRegister)(reg)), cbSigBlob, pvSigBlob, out out_ppValue);
ppValue = ICorDebugValue.Wrap(out_ppValue);
}
public void GetLocalDoubleRegisterValue(CorDebugRegister highWordReg, CorDebugRegister lowWordReg, uint cbSigBlob, uint pvSigBlob, out ICorDebugValue ppValue)
{
Debugger.Interop.CorDebug.ICorDebugValue out_ppValue;
this.WrappedObject.GetLocalDoubleRegisterValue(((Debugger.Interop.CorDebug.CorDebugRegister)(highWordReg)), ((Debugger.Interop.CorDebug.CorDebugRegister)(lowWordReg)), cbSigBlob, pvSigBlob, out out_ppValue);
ppValue = ICorDebugValue.Wrap(out_ppValue);
}
public void GetLocalMemoryValue(ulong address, uint cbSigBlob, uint pvSigBlob, out ICorDebugValue ppValue)
{
Debugger.Interop.CorDebug.ICorDebugValue out_ppValue;
this.WrappedObject.GetLocalMemoryValue(address, cbSigBlob, pvSigBlob, out out_ppValue);
ppValue = ICorDebugValue.Wrap(out_ppValue);
}
public void GetLocalRegisterMemoryValue(CorDebugRegister highWordReg, ulong lowWordAddress, uint cbSigBlob, uint pvSigBlob, out ICorDebugValue ppValue)
{
Debugger.Interop.CorDebug.ICorDebugValue out_ppValue;
this.WrappedObject.GetLocalRegisterMemoryValue(((Debugger.Interop.CorDebug.CorDebugRegister)(highWordReg)), lowWordAddress, cbSigBlob, pvSigBlob, out out_ppValue);
ppValue = ICorDebugValue.Wrap(out_ppValue);
}
public void GetLocalMemoryRegisterValue(ulong highWordAddress, CorDebugRegister lowWordRegister, uint cbSigBlob, uint pvSigBlob, out ICorDebugValue ppValue)
{
Debugger.Interop.CorDebug.ICorDebugValue out_ppValue;
this.WrappedObject.GetLocalMemoryRegisterValue(highWordAddress, ((Debugger.Interop.CorDebug.CorDebugRegister)(lowWordRegister)), cbSigBlob, pvSigBlob, out out_ppValue);
ppValue = ICorDebugValue.Wrap(out_ppValue);
}
public void CanSetIP(uint nOffset)
{
this.WrappedObject.CanSetIP(nOffset);
}
}
}

110
src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugObjectEnum.cs

@ -0,0 +1,110 @@ @@ -0,0 +1,110 @@
// <file>
// <copyright see="prj:///doc/copyright.txt"/>
// <license see="prj:///doc/license.txt"/>
// <owner name="David Srbecký" email="dsrbecky@gmail.com"/>
// <version>$Revision$</version>
// </file>
namespace Debugger.Wrappers.CorDebug
{
using System;
public class ICorDebugObjectEnum
{
private Debugger.Interop.CorDebug.ICorDebugObjectEnum wrappedObject;
internal Debugger.Interop.CorDebug.ICorDebugObjectEnum WrappedObject
{
get
{
return this.wrappedObject;
}
}
public ICorDebugObjectEnum(Debugger.Interop.CorDebug.ICorDebugObjectEnum wrappedObject)
{
this.wrappedObject = wrappedObject;
}
public static ICorDebugObjectEnum Wrap(Debugger.Interop.CorDebug.ICorDebugObjectEnum objectToWrap)
{
return new ICorDebugObjectEnum(objectToWrap);
}
public bool Is<T>() where T: class
{
try {
CastTo<T>();
return true;
} catch {
return false;
}
}
public T As<T>() where T: class
{
try {
return CastTo<T>();
} catch {
return null;
}
}
public T CastTo<T>() where T: class
{
return (T)Activator.CreateInstance(typeof(T), this.WrappedObject);
}
public static bool operator ==(ICorDebugObjectEnum o1, ICorDebugObjectEnum o2)
{
return ((object)o1 == null && (object)o2 == null) ||
((object)o1 != null && (object)o2 != null && o1.WrappedObject == o2.WrappedObject);
}
public static bool operator !=(ICorDebugObjectEnum o1, ICorDebugObjectEnum o2)
{
return !(o1 == o2);
}
public override int GetHashCode()
{
return base.GetHashCode();
}
public override bool Equals(object o)
{
ICorDebugObjectEnum casted = o as ICorDebugObjectEnum;
return (casted != null) && (casted.WrappedObject == wrappedObject);
}
public void Skip(uint celt)
{
this.WrappedObject.Skip(celt);
}
public void Reset()
{
this.WrappedObject.Reset();
}
public void Clone(out ICorDebugEnum ppEnum)
{
Debugger.Interop.CorDebug.ICorDebugEnum out_ppEnum;
this.WrappedObject.Clone(out out_ppEnum);
ppEnum = ICorDebugEnum.Wrap(out_ppEnum);
}
public void GetCount(out uint pcelt)
{
this.WrappedObject.GetCount(out pcelt);
}
public void Next(uint celt, System.IntPtr objects, out uint pceltFetched)
{
this.WrappedObject.Next(celt, objects, out pceltFetched);
}
}
}

148
src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugObjectValue.cs

@ -0,0 +1,148 @@ @@ -0,0 +1,148 @@
// <file>
// <copyright see="prj:///doc/copyright.txt"/>
// <license see="prj:///doc/license.txt"/>
// <owner name="David Srbecký" email="dsrbecky@gmail.com"/>
// <version>$Revision$</version>
// </file>
namespace Debugger.Wrappers.CorDebug
{
using System;
public class ICorDebugObjectValue
{
private Debugger.Interop.CorDebug.ICorDebugObjectValue wrappedObject;
internal Debugger.Interop.CorDebug.ICorDebugObjectValue WrappedObject
{
get
{
return this.wrappedObject;
}
}
public ICorDebugObjectValue(Debugger.Interop.CorDebug.ICorDebugObjectValue wrappedObject)
{
this.wrappedObject = wrappedObject;
}
public static ICorDebugObjectValue Wrap(Debugger.Interop.CorDebug.ICorDebugObjectValue objectToWrap)
{
return new ICorDebugObjectValue(objectToWrap);
}
public bool Is<T>() where T: class
{
try {
CastTo<T>();
return true;
} catch {
return false;
}
}
public T As<T>() where T: class
{
try {
return CastTo<T>();
} catch {
return null;
}
}
public T CastTo<T>() where T: class
{
return (T)Activator.CreateInstance(typeof(T), this.WrappedObject);
}
public static bool operator ==(ICorDebugObjectValue o1, ICorDebugObjectValue o2)
{
return ((object)o1 == null && (object)o2 == null) ||
((object)o1 != null && (object)o2 != null && o1.WrappedObject == o2.WrappedObject);
}
public static bool operator !=(ICorDebugObjectValue o1, ICorDebugObjectValue o2)
{
return !(o1 == o2);
}
public override int GetHashCode()
{
return base.GetHashCode();
}
public override bool Equals(object o)
{
ICorDebugObjectValue casted = o as ICorDebugObjectValue;
return (casted != null) && (casted.WrappedObject == wrappedObject);
}
public void GetType(out uint pType)
{
this.WrappedObject.GetType(out pType);
}
public void GetSize(out uint pSize)
{
this.WrappedObject.GetSize(out pSize);
}
public void GetAddress(out ulong pAddress)
{
this.WrappedObject.GetAddress(out pAddress);
}
public void CreateBreakpoint(out ICorDebugValueBreakpoint ppBreakpoint)
{
Debugger.Interop.CorDebug.ICorDebugValueBreakpoint out_ppBreakpoint;
this.WrappedObject.CreateBreakpoint(out out_ppBreakpoint);
ppBreakpoint = ICorDebugValueBreakpoint.Wrap(out_ppBreakpoint);
}
public void GetClass(out ICorDebugClass ppClass)
{
Debugger.Interop.CorDebug.ICorDebugClass out_ppClass;
this.WrappedObject.GetClass(out out_ppClass);
ppClass = ICorDebugClass.Wrap(out_ppClass);
}
public void GetFieldValue(ICorDebugClass pClass, uint fieldDef, out ICorDebugValue ppValue)
{
Debugger.Interop.CorDebug.ICorDebugValue out_ppValue;
this.WrappedObject.GetFieldValue(pClass.WrappedObject, fieldDef, out out_ppValue);
ppValue = ICorDebugValue.Wrap(out_ppValue);
}
public void GetVirtualMethod(uint memberRef, out ICorDebugFunction ppFunction)
{
Debugger.Interop.CorDebug.ICorDebugFunction out_ppFunction;
this.WrappedObject.GetVirtualMethod(memberRef, out out_ppFunction);
ppFunction = ICorDebugFunction.Wrap(out_ppFunction);
}
public void GetContext(out ICorDebugContext ppContext)
{
Debugger.Interop.CorDebug.ICorDebugContext out_ppContext;
this.WrappedObject.GetContext(out out_ppContext);
ppContext = ICorDebugContext.Wrap(out_ppContext);
}
public void IsValueClass(out int pbIsValueClass)
{
this.WrappedObject.IsValueClass(out pbIsValueClass);
}
public void GetManagedCopy(out object ppObject)
{
this.WrappedObject.GetManagedCopy(out ppObject);
}
public void SetFromManagedCopy(object pObject)
{
this.WrappedObject.SetFromManagedCopy(pObject);
}
}
}

92
src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugObjectValue2.cs

@ -0,0 +1,92 @@ @@ -0,0 +1,92 @@
// <file>
// <copyright see="prj:///doc/copyright.txt"/>
// <license see="prj:///doc/license.txt"/>
// <owner name="David Srbecký" email="dsrbecky@gmail.com"/>
// <version>$Revision$</version>
// </file>
namespace Debugger.Wrappers.CorDebug
{
using System;
public class ICorDebugObjectValue2
{
private Debugger.Interop.CorDebug.ICorDebugObjectValue2 wrappedObject;
internal Debugger.Interop.CorDebug.ICorDebugObjectValue2 WrappedObject
{
get
{
return this.wrappedObject;
}
}
public ICorDebugObjectValue2(Debugger.Interop.CorDebug.ICorDebugObjectValue2 wrappedObject)
{
this.wrappedObject = wrappedObject;
}
public static ICorDebugObjectValue2 Wrap(Debugger.Interop.CorDebug.ICorDebugObjectValue2 objectToWrap)
{
return new ICorDebugObjectValue2(objectToWrap);
}
public bool Is<T>() where T: class
{
try {
CastTo<T>();
return true;
} catch {
return false;
}
}
public T As<T>() where T: class
{
try {
return CastTo<T>();
} catch {
return null;
}
}
public T CastTo<T>() where T: class
{
return (T)Activator.CreateInstance(typeof(T), this.WrappedObject);
}
public static bool operator ==(ICorDebugObjectValue2 o1, ICorDebugObjectValue2 o2)
{
return ((object)o1 == null && (object)o2 == null) ||
((object)o1 != null && (object)o2 != null && o1.WrappedObject == o2.WrappedObject);
}
public static bool operator !=(ICorDebugObjectValue2 o1, ICorDebugObjectValue2 o2)
{
return !(o1 == o2);
}
public override int GetHashCode()
{
return base.GetHashCode();
}
public override bool Equals(object o)
{
ICorDebugObjectValue2 casted = o as ICorDebugObjectValue2;
return (casted != null) && (casted.WrappedObject == wrappedObject);
}
public void GetVirtualMethodAndType(uint memberRef, out ICorDebugFunction ppFunction, out ICorDebugType ppType)
{
Debugger.Interop.CorDebug.ICorDebugFunction out_ppFunction;
Debugger.Interop.CorDebug.ICorDebugType out_ppType;
this.WrappedObject.GetVirtualMethodAndType(memberRef, out out_ppFunction, out out_ppType);
ppFunction = ICorDebugFunction.Wrap(out_ppFunction);
ppType = ICorDebugType.Wrap(out_ppType);
}
}
}

238
src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugProcess.cs

@ -0,0 +1,238 @@ @@ -0,0 +1,238 @@
// <file>
// <copyright see="prj:///doc/copyright.txt"/>
// <license see="prj:///doc/license.txt"/>
// <owner name="David Srbecký" email="dsrbecky@gmail.com"/>
// <version>$Revision$</version>
// </file>
namespace Debugger.Wrappers.CorDebug
{
using System;
public class ICorDebugProcess
{
private Debugger.Interop.CorDebug.ICorDebugProcess wrappedObject;
internal Debugger.Interop.CorDebug.ICorDebugProcess WrappedObject
{
get
{
return this.wrappedObject;
}
}
public ICorDebugProcess(Debugger.Interop.CorDebug.ICorDebugProcess wrappedObject)
{
this.wrappedObject = wrappedObject;
}
public static ICorDebugProcess Wrap(Debugger.Interop.CorDebug.ICorDebugProcess objectToWrap)
{
return new ICorDebugProcess(objectToWrap);
}
public bool Is<T>() where T: class
{
try {
CastTo<T>();
return true;
} catch {
return false;
}
}
public T As<T>() where T: class
{
try {
return CastTo<T>();
} catch {
return null;
}
}
public T CastTo<T>() where T: class
{
return (T)Activator.CreateInstance(typeof(T), this.WrappedObject);
}
public static bool operator ==(ICorDebugProcess o1, ICorDebugProcess o2)
{
return ((object)o1 == null && (object)o2 == null) ||
((object)o1 != null && (object)o2 != null && o1.WrappedObject == o2.WrappedObject);
}
public static bool operator !=(ICorDebugProcess o1, ICorDebugProcess o2)
{
return !(o1 == o2);
}
public override int GetHashCode()
{
return base.GetHashCode();
}
public override bool Equals(object o)
{
ICorDebugProcess casted = o as ICorDebugProcess;
return (casted != null) && (casted.WrappedObject == wrappedObject);
}
public void Stop(uint dwTimeoutIgnored)
{
this.WrappedObject.Stop(dwTimeoutIgnored);
}
public void Continue(int fIsOutOfBand)
{
this.WrappedObject.Continue(fIsOutOfBand);
}
public void IsRunning(out int pbRunning)
{
this.WrappedObject.IsRunning(out pbRunning);
}
public void HasQueuedCallbacks(ICorDebugThread pThread, out int pbQueued)
{
this.WrappedObject.HasQueuedCallbacks(pThread.WrappedObject, out pbQueued);
}
public void EnumerateThreads(out ICorDebugThreadEnum ppThreads)
{
Debugger.Interop.CorDebug.ICorDebugThreadEnum out_ppThreads;
this.WrappedObject.EnumerateThreads(out out_ppThreads);
ppThreads = ICorDebugThreadEnum.Wrap(out_ppThreads);
}
public void SetAllThreadsDebugState(CorDebugThreadState state, ICorDebugThread pExceptThisThread)
{
this.WrappedObject.SetAllThreadsDebugState(((Debugger.Interop.CorDebug.CorDebugThreadState)(state)), pExceptThisThread.WrappedObject);
}
public void Detach()
{
this.WrappedObject.Detach();
}
public void Terminate(uint exitCode)
{
this.WrappedObject.Terminate(exitCode);
}
public void CanCommitChanges(uint cSnapshots, ref ICorDebugEditAndContinueSnapshot pSnapshots, out ICorDebugErrorInfoEnum pError)
{
Debugger.Interop.CorDebug.ICorDebugEditAndContinueSnapshot ref_pSnapshots = pSnapshots.WrappedObject;
Debugger.Interop.CorDebug.ICorDebugErrorInfoEnum out_pError;
this.WrappedObject.CanCommitChanges(cSnapshots, ref ref_pSnapshots, out out_pError);
pSnapshots = ICorDebugEditAndContinueSnapshot.Wrap(ref_pSnapshots);
pError = ICorDebugErrorInfoEnum.Wrap(out_pError);
}
public void CommitChanges(uint cSnapshots, ref ICorDebugEditAndContinueSnapshot pSnapshots, out ICorDebugErrorInfoEnum pError)
{
Debugger.Interop.CorDebug.ICorDebugEditAndContinueSnapshot ref_pSnapshots = pSnapshots.WrappedObject;
Debugger.Interop.CorDebug.ICorDebugErrorInfoEnum out_pError;
this.WrappedObject.CommitChanges(cSnapshots, ref ref_pSnapshots, out out_pError);
pSnapshots = ICorDebugEditAndContinueSnapshot.Wrap(ref_pSnapshots);
pError = ICorDebugErrorInfoEnum.Wrap(out_pError);
}
public void GetID(out uint pdwProcessId)
{
this.WrappedObject.GetID(out pdwProcessId);
}
public void GetHandle(out uint phProcessHandle)
{
this.WrappedObject.GetHandle(out phProcessHandle);
}
public void GetThread(uint dwThreadId, out ICorDebugThread ppThread)
{
Debugger.Interop.CorDebug.ICorDebugThread out_ppThread;
this.WrappedObject.GetThread(dwThreadId, out out_ppThread);
ppThread = ICorDebugThread.Wrap(out_ppThread);
}
public void EnumerateObjects(out ICorDebugObjectEnum ppObjects)
{
Debugger.Interop.CorDebug.ICorDebugObjectEnum out_ppObjects;
this.WrappedObject.EnumerateObjects(out out_ppObjects);
ppObjects = ICorDebugObjectEnum.Wrap(out_ppObjects);
}
public void IsTransitionStub(ulong address, out int pbTransitionStub)
{
this.WrappedObject.IsTransitionStub(address, out pbTransitionStub);
}
public void IsOSSuspended(uint threadID, out int pbSuspended)
{
this.WrappedObject.IsOSSuspended(threadID, out pbSuspended);
}
public void GetThreadContext(uint threadID, uint contextSize, System.IntPtr context)
{
this.WrappedObject.GetThreadContext(threadID, contextSize, context);
}
public void SetThreadContext(uint threadID, uint contextSize, System.IntPtr context)
{
this.WrappedObject.SetThreadContext(threadID, contextSize, context);
}
public void ReadMemory(ulong address, uint size, System.IntPtr buffer, out uint read)
{
this.WrappedObject.ReadMemory(address, size, buffer, out read);
}
public void WriteMemory(ulong address, uint size, ref byte buffer, out uint written)
{
this.WrappedObject.WriteMemory(address, size, ref buffer, out written);
}
public void ClearCurrentException(uint threadID)
{
this.WrappedObject.ClearCurrentException(threadID);
}
public void EnableLogMessages(int fOnOff)
{
this.WrappedObject.EnableLogMessages(fOnOff);
}
public void ModifyLogSwitch(ref ushort pLogSwitchName, int lLevel)
{
this.WrappedObject.ModifyLogSwitch(ref pLogSwitchName, lLevel);
}
public void EnumerateAppDomains(out ICorDebugAppDomainEnum ppAppDomains)
{
Debugger.Interop.CorDebug.ICorDebugAppDomainEnum out_ppAppDomains;
this.WrappedObject.EnumerateAppDomains(out out_ppAppDomains);
ppAppDomains = ICorDebugAppDomainEnum.Wrap(out_ppAppDomains);
}
public void GetObject(out ICorDebugValue ppObject)
{
Debugger.Interop.CorDebug.ICorDebugValue out_ppObject;
this.WrappedObject.GetObject(out out_ppObject);
ppObject = ICorDebugValue.Wrap(out_ppObject);
}
public void ThreadForFiberCookie(uint fiberCookie, out ICorDebugThread ppThread)
{
Debugger.Interop.CorDebug.ICorDebugThread out_ppThread;
this.WrappedObject.ThreadForFiberCookie(fiberCookie, out out_ppThread);
ppThread = ICorDebugThread.Wrap(out_ppThread);
}
public void GetHelperThreadID(out uint pThreadID)
{
this.WrappedObject.GetHelperThreadID(out pThreadID);
}
}
}

122
src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugProcess2.cs

@ -0,0 +1,122 @@ @@ -0,0 +1,122 @@
// <file>
// <copyright see="prj:///doc/copyright.txt"/>
// <license see="prj:///doc/license.txt"/>
// <owner name="David Srbecký" email="dsrbecky@gmail.com"/>
// <version>$Revision$</version>
// </file>
namespace Debugger.Wrappers.CorDebug
{
using System;
public class ICorDebugProcess2
{
private Debugger.Interop.CorDebug.ICorDebugProcess2 wrappedObject;
internal Debugger.Interop.CorDebug.ICorDebugProcess2 WrappedObject
{
get
{
return this.wrappedObject;
}
}
public ICorDebugProcess2(Debugger.Interop.CorDebug.ICorDebugProcess2 wrappedObject)
{
this.wrappedObject = wrappedObject;
}
public static ICorDebugProcess2 Wrap(Debugger.Interop.CorDebug.ICorDebugProcess2 objectToWrap)
{
return new ICorDebugProcess2(objectToWrap);
}
public bool Is<T>() where T: class
{
try {
CastTo<T>();
return true;
} catch {
return false;
}
}
public T As<T>() where T: class
{
try {
return CastTo<T>();
} catch {
return null;
}
}
public T CastTo<T>() where T: class
{
return (T)Activator.CreateInstance(typeof(T), this.WrappedObject);
}
public static bool operator ==(ICorDebugProcess2 o1, ICorDebugProcess2 o2)
{
return ((object)o1 == null && (object)o2 == null) ||
((object)o1 != null && (object)o2 != null && o1.WrappedObject == o2.WrappedObject);
}
public static bool operator !=(ICorDebugProcess2 o1, ICorDebugProcess2 o2)
{
return !(o1 == o2);
}
public override int GetHashCode()
{
return base.GetHashCode();
}
public override bool Equals(object o)
{
ICorDebugProcess2 casted = o as ICorDebugProcess2;
return (casted != null) && (casted.WrappedObject == wrappedObject);
}
public void GetThreadForTaskID(ulong taskid, out ICorDebugThread2 ppThread)
{
Debugger.Interop.CorDebug.ICorDebugThread2 out_ppThread;
this.WrappedObject.GetThreadForTaskID(taskid, out out_ppThread);
ppThread = ICorDebugThread2.Wrap(out_ppThread);
}
public void GetVersion(out Debugger.Interop.CorDebug._COR_VERSION version)
{
this.WrappedObject.GetVersion(out version);
}
public void SetUnmanagedBreakpoint(ulong address, uint bufsize, System.IntPtr buffer, out uint bufLen)
{
this.WrappedObject.SetUnmanagedBreakpoint(address, bufsize, buffer, out bufLen);
}
public void ClearUnmanagedBreakpoint(ulong address)
{
this.WrappedObject.ClearUnmanagedBreakpoint(address);
}
public void SetDesiredNGENCompilerFlags(uint pdwFlags)
{
this.WrappedObject.SetDesiredNGENCompilerFlags(pdwFlags);
}
public void GetDesiredNGENCompilerFlags(out uint pdwFlags)
{
this.WrappedObject.GetDesiredNGENCompilerFlags(out pdwFlags);
}
public void GetReferenceValueFromGCHandle(uint handle, out ICorDebugReferenceValue pOutValue)
{
Debugger.Interop.CorDebug.ICorDebugReferenceValue out_pOutValue;
this.WrappedObject.GetReferenceValueFromGCHandle(handle, out out_pOutValue);
pOutValue = ICorDebugReferenceValue.Wrap(out_pOutValue);
}
}
}

110
src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugProcessEnum.cs

@ -0,0 +1,110 @@ @@ -0,0 +1,110 @@
// <file>
// <copyright see="prj:///doc/copyright.txt"/>
// <license see="prj:///doc/license.txt"/>
// <owner name="David Srbecký" email="dsrbecky@gmail.com"/>
// <version>$Revision$</version>
// </file>
namespace Debugger.Wrappers.CorDebug
{
using System;
public class ICorDebugProcessEnum
{
private Debugger.Interop.CorDebug.ICorDebugProcessEnum wrappedObject;
internal Debugger.Interop.CorDebug.ICorDebugProcessEnum WrappedObject
{
get
{
return this.wrappedObject;
}
}
public ICorDebugProcessEnum(Debugger.Interop.CorDebug.ICorDebugProcessEnum wrappedObject)
{
this.wrappedObject = wrappedObject;
}
public static ICorDebugProcessEnum Wrap(Debugger.Interop.CorDebug.ICorDebugProcessEnum objectToWrap)
{
return new ICorDebugProcessEnum(objectToWrap);
}
public bool Is<T>() where T: class
{
try {
CastTo<T>();
return true;
} catch {
return false;
}
}
public T As<T>() where T: class
{
try {
return CastTo<T>();
} catch {
return null;
}
}
public T CastTo<T>() where T: class
{
return (T)Activator.CreateInstance(typeof(T), this.WrappedObject);
}
public static bool operator ==(ICorDebugProcessEnum o1, ICorDebugProcessEnum o2)
{
return ((object)o1 == null && (object)o2 == null) ||
((object)o1 != null && (object)o2 != null && o1.WrappedObject == o2.WrappedObject);
}
public static bool operator !=(ICorDebugProcessEnum o1, ICorDebugProcessEnum o2)
{
return !(o1 == o2);
}
public override int GetHashCode()
{
return base.GetHashCode();
}
public override bool Equals(object o)
{
ICorDebugProcessEnum casted = o as ICorDebugProcessEnum;
return (casted != null) && (casted.WrappedObject == wrappedObject);
}
public void Skip(uint celt)
{
this.WrappedObject.Skip(celt);
}
public void Reset()
{
this.WrappedObject.Reset();
}
public void Clone(out ICorDebugEnum ppEnum)
{
Debugger.Interop.CorDebug.ICorDebugEnum out_ppEnum;
this.WrappedObject.Clone(out out_ppEnum);
ppEnum = ICorDebugEnum.Wrap(out_ppEnum);
}
public void GetCount(out uint pcelt)
{
this.WrappedObject.GetCount(out pcelt);
}
public void Next(uint celt, System.IntPtr processes, out uint pceltFetched)
{
this.WrappedObject.Next(celt, processes, out pceltFetched);
}
}
}

134
src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugReferenceValue.cs

@ -0,0 +1,134 @@ @@ -0,0 +1,134 @@
// <file>
// <copyright see="prj:///doc/copyright.txt"/>
// <license see="prj:///doc/license.txt"/>
// <owner name="David Srbecký" email="dsrbecky@gmail.com"/>
// <version>$Revision$</version>
// </file>
namespace Debugger.Wrappers.CorDebug
{
using System;
public class ICorDebugReferenceValue
{
private Debugger.Interop.CorDebug.ICorDebugReferenceValue wrappedObject;
internal Debugger.Interop.CorDebug.ICorDebugReferenceValue WrappedObject
{
get
{
return this.wrappedObject;
}
}
public ICorDebugReferenceValue(Debugger.Interop.CorDebug.ICorDebugReferenceValue wrappedObject)
{
this.wrappedObject = wrappedObject;
}
public static ICorDebugReferenceValue Wrap(Debugger.Interop.CorDebug.ICorDebugReferenceValue objectToWrap)
{
return new ICorDebugReferenceValue(objectToWrap);
}
public bool Is<T>() where T: class
{
try {
CastTo<T>();
return true;
} catch {
return false;
}
}
public T As<T>() where T: class
{
try {
return CastTo<T>();
} catch {
return null;
}
}
public T CastTo<T>() where T: class
{
return (T)Activator.CreateInstance(typeof(T), this.WrappedObject);
}
public static bool operator ==(ICorDebugReferenceValue o1, ICorDebugReferenceValue o2)
{
return ((object)o1 == null && (object)o2 == null) ||
((object)o1 != null && (object)o2 != null && o1.WrappedObject == o2.WrappedObject);
}
public static bool operator !=(ICorDebugReferenceValue o1, ICorDebugReferenceValue o2)
{
return !(o1 == o2);
}
public override int GetHashCode()
{
return base.GetHashCode();
}
public override bool Equals(object o)
{
ICorDebugReferenceValue casted = o as ICorDebugReferenceValue;
return (casted != null) && (casted.WrappedObject == wrappedObject);
}
public void GetType(out uint pType)
{
this.WrappedObject.GetType(out pType);
}
public void GetSize(out uint pSize)
{
this.WrappedObject.GetSize(out pSize);
}
public void GetAddress(out ulong pAddress)
{
this.WrappedObject.GetAddress(out pAddress);
}
public void CreateBreakpoint(out ICorDebugValueBreakpoint ppBreakpoint)
{
Debugger.Interop.CorDebug.ICorDebugValueBreakpoint out_ppBreakpoint;
this.WrappedObject.CreateBreakpoint(out out_ppBreakpoint);
ppBreakpoint = ICorDebugValueBreakpoint.Wrap(out_ppBreakpoint);
}
public void IsNull(out int pbNull)
{
this.WrappedObject.IsNull(out pbNull);
}
public void GetValue(out ulong pValue)
{
this.WrappedObject.GetValue(out pValue);
}
public void SetValue(ulong value)
{
this.WrappedObject.SetValue(value);
}
public void Dereference(out ICorDebugValue ppValue)
{
Debugger.Interop.CorDebug.ICorDebugValue out_ppValue;
this.WrappedObject.Dereference(out out_ppValue);
ppValue = ICorDebugValue.Wrap(out_ppValue);
}
public void DereferenceStrong(out ICorDebugValue ppValue)
{
Debugger.Interop.CorDebug.ICorDebugValue out_ppValue;
this.WrappedObject.DereferenceStrong(out out_ppValue);
ppValue = ICorDebugValue.Wrap(out_ppValue);
}
}
}

108
src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugRegisterSet.cs

@ -0,0 +1,108 @@ @@ -0,0 +1,108 @@
// <file>
// <copyright see="prj:///doc/copyright.txt"/>
// <license see="prj:///doc/license.txt"/>
// <owner name="David Srbecký" email="dsrbecky@gmail.com"/>
// <version>$Revision$</version>
// </file>
namespace Debugger.Wrappers.CorDebug
{
using System;
public class ICorDebugRegisterSet
{
private Debugger.Interop.CorDebug.ICorDebugRegisterSet wrappedObject;
internal Debugger.Interop.CorDebug.ICorDebugRegisterSet WrappedObject
{
get
{
return this.wrappedObject;
}
}
public ICorDebugRegisterSet(Debugger.Interop.CorDebug.ICorDebugRegisterSet wrappedObject)
{
this.wrappedObject = wrappedObject;
}
public static ICorDebugRegisterSet Wrap(Debugger.Interop.CorDebug.ICorDebugRegisterSet objectToWrap)
{
return new ICorDebugRegisterSet(objectToWrap);
}
public bool Is<T>() where T: class
{
try {
CastTo<T>();
return true;
} catch {
return false;
}
}
public T As<T>() where T: class
{
try {
return CastTo<T>();
} catch {
return null;
}
}
public T CastTo<T>() where T: class
{
return (T)Activator.CreateInstance(typeof(T), this.WrappedObject);
}
public static bool operator ==(ICorDebugRegisterSet o1, ICorDebugRegisterSet o2)
{
return ((object)o1 == null && (object)o2 == null) ||
((object)o1 != null && (object)o2 != null && o1.WrappedObject == o2.WrappedObject);
}
public static bool operator !=(ICorDebugRegisterSet o1, ICorDebugRegisterSet o2)
{
return !(o1 == o2);
}
public override int GetHashCode()
{
return base.GetHashCode();
}
public override bool Equals(object o)
{
ICorDebugRegisterSet casted = o as ICorDebugRegisterSet;
return (casted != null) && (casted.WrappedObject == wrappedObject);
}
public void GetRegistersAvailable(out ulong pAvailable)
{
this.WrappedObject.GetRegistersAvailable(out pAvailable);
}
public void GetRegisters(ulong mask, uint regCount, System.IntPtr regBuffer)
{
this.WrappedObject.GetRegisters(mask, regCount, regBuffer);
}
public void SetRegisters(ulong mask, uint regCount, ref ulong regBuffer)
{
this.WrappedObject.SetRegisters(mask, regCount, ref regBuffer);
}
public void GetThreadContext(uint contextSize, System.IntPtr context)
{
this.WrappedObject.GetThreadContext(contextSize, context);
}
public void SetThreadContext(uint contextSize, System.IntPtr context)
{
this.WrappedObject.SetThreadContext(contextSize, context);
}
}
}

123
src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugStepper.cs

@ -0,0 +1,123 @@ @@ -0,0 +1,123 @@
// <file>
// <copyright see="prj:///doc/copyright.txt"/>
// <license see="prj:///doc/license.txt"/>
// <owner name="David Srbecký" email="dsrbecky@gmail.com"/>
// <version>$Revision$</version>
// </file>
namespace Debugger.Wrappers.CorDebug
{
using System;
public class ICorDebugStepper
{
private Debugger.Interop.CorDebug.ICorDebugStepper wrappedObject;
internal Debugger.Interop.CorDebug.ICorDebugStepper WrappedObject
{
get
{
return this.wrappedObject;
}
}
public ICorDebugStepper(Debugger.Interop.CorDebug.ICorDebugStepper wrappedObject)
{
this.wrappedObject = wrappedObject;
}
public static ICorDebugStepper Wrap(Debugger.Interop.CorDebug.ICorDebugStepper objectToWrap)
{
return new ICorDebugStepper(objectToWrap);
}
public bool Is<T>() where T: class
{
try {
CastTo<T>();
return true;
} catch {
return false;
}
}
public T As<T>() where T: class
{
try {
return CastTo<T>();
} catch {
return null;
}
}
public T CastTo<T>() where T: class
{
return (T)Activator.CreateInstance(typeof(T), this.WrappedObject);
}
public static bool operator ==(ICorDebugStepper o1, ICorDebugStepper o2)
{
return ((object)o1 == null && (object)o2 == null) ||
((object)o1 != null && (object)o2 != null && o1.WrappedObject == o2.WrappedObject);
}
public static bool operator !=(ICorDebugStepper o1, ICorDebugStepper o2)
{
return !(o1 == o2);
}
public override int GetHashCode()
{
return base.GetHashCode();
}
public override bool Equals(object o)
{
ICorDebugStepper casted = o as ICorDebugStepper;
return (casted != null) && (casted.WrappedObject == wrappedObject);
}
public void IsActive(out int pbActive)
{
this.WrappedObject.IsActive(out pbActive);
}
public void Deactivate()
{
this.WrappedObject.Deactivate();
}
public void SetInterceptMask(CorDebugIntercept mask)
{
this.WrappedObject.SetInterceptMask(((Debugger.Interop.CorDebug.CorDebugIntercept)(mask)));
}
public void SetUnmappedStopMask(CorDebugUnmappedStop mask)
{
this.WrappedObject.SetUnmappedStopMask(((Debugger.Interop.CorDebug.CorDebugUnmappedStop)(mask)));
}
public void Step(int bStepIn)
{
this.WrappedObject.Step(bStepIn);
}
public void StepRange(int bStepIn, System.IntPtr ranges, uint cRangeCount)
{
this.WrappedObject.StepRange(bStepIn, ranges, cRangeCount);
}
public void StepOut()
{
this.WrappedObject.StepOut();
}
public void SetRangeIL(int bIL)
{
this.WrappedObject.SetRangeIL(bIL);
}
}
}

88
src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugStepper2.cs

@ -0,0 +1,88 @@ @@ -0,0 +1,88 @@
// <file>
// <copyright see="prj:///doc/copyright.txt"/>
// <license see="prj:///doc/license.txt"/>
// <owner name="David Srbecký" email="dsrbecky@gmail.com"/>
// <version>$Revision$</version>
// </file>
namespace Debugger.Wrappers.CorDebug
{
using System;
public class ICorDebugStepper2
{
private Debugger.Interop.CorDebug.ICorDebugStepper2 wrappedObject;
internal Debugger.Interop.CorDebug.ICorDebugStepper2 WrappedObject
{
get
{
return this.wrappedObject;
}
}
public ICorDebugStepper2(Debugger.Interop.CorDebug.ICorDebugStepper2 wrappedObject)
{
this.wrappedObject = wrappedObject;
}
public static ICorDebugStepper2 Wrap(Debugger.Interop.CorDebug.ICorDebugStepper2 objectToWrap)
{
return new ICorDebugStepper2(objectToWrap);
}
public bool Is<T>() where T: class
{
try {
CastTo<T>();
return true;
} catch {
return false;
}
}
public T As<T>() where T: class
{
try {
return CastTo<T>();
} catch {
return null;
}
}
public T CastTo<T>() where T: class
{
return (T)Activator.CreateInstance(typeof(T), this.WrappedObject);
}
public static bool operator ==(ICorDebugStepper2 o1, ICorDebugStepper2 o2)
{
return ((object)o1 == null && (object)o2 == null) ||
((object)o1 != null && (object)o2 != null && o1.WrappedObject == o2.WrappedObject);
}
public static bool operator !=(ICorDebugStepper2 o1, ICorDebugStepper2 o2)
{
return !(o1 == o2);
}
public override int GetHashCode()
{
return base.GetHashCode();
}
public override bool Equals(object o)
{
ICorDebugStepper2 casted = o as ICorDebugStepper2;
return (casted != null) && (casted.WrappedObject == wrappedObject);
}
public void SetJMC(int fIsJMCStepper)
{
this.WrappedObject.SetJMC(fIsJMCStepper);
}
}
}

110
src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugStepperEnum.cs

@ -0,0 +1,110 @@ @@ -0,0 +1,110 @@
// <file>
// <copyright see="prj:///doc/copyright.txt"/>
// <license see="prj:///doc/license.txt"/>
// <owner name="David Srbecký" email="dsrbecky@gmail.com"/>
// <version>$Revision$</version>
// </file>
namespace Debugger.Wrappers.CorDebug
{
using System;
public class ICorDebugStepperEnum
{
private Debugger.Interop.CorDebug.ICorDebugStepperEnum wrappedObject;
internal Debugger.Interop.CorDebug.ICorDebugStepperEnum WrappedObject
{
get
{
return this.wrappedObject;
}
}
public ICorDebugStepperEnum(Debugger.Interop.CorDebug.ICorDebugStepperEnum wrappedObject)
{
this.wrappedObject = wrappedObject;
}
public static ICorDebugStepperEnum Wrap(Debugger.Interop.CorDebug.ICorDebugStepperEnum objectToWrap)
{
return new ICorDebugStepperEnum(objectToWrap);
}
public bool Is<T>() where T: class
{
try {
CastTo<T>();
return true;
} catch {
return false;
}
}
public T As<T>() where T: class
{
try {
return CastTo<T>();
} catch {
return null;
}
}
public T CastTo<T>() where T: class
{
return (T)Activator.CreateInstance(typeof(T), this.WrappedObject);
}
public static bool operator ==(ICorDebugStepperEnum o1, ICorDebugStepperEnum o2)
{
return ((object)o1 == null && (object)o2 == null) ||
((object)o1 != null && (object)o2 != null && o1.WrappedObject == o2.WrappedObject);
}
public static bool operator !=(ICorDebugStepperEnum o1, ICorDebugStepperEnum o2)
{
return !(o1 == o2);
}
public override int GetHashCode()
{
return base.GetHashCode();
}
public override bool Equals(object o)
{
ICorDebugStepperEnum casted = o as ICorDebugStepperEnum;
return (casted != null) && (casted.WrappedObject == wrappedObject);
}
public void Skip(uint celt)
{
this.WrappedObject.Skip(celt);
}
public void Reset()
{
this.WrappedObject.Reset();
}
public void Clone(out ICorDebugEnum ppEnum)
{
Debugger.Interop.CorDebug.ICorDebugEnum out_ppEnum;
this.WrappedObject.Clone(out out_ppEnum);
ppEnum = ICorDebugEnum.Wrap(out_ppEnum);
}
public void GetCount(out uint pcelt)
{
this.WrappedObject.GetCount(out pcelt);
}
public void Next(uint celt, System.IntPtr steppers, out uint pceltFetched)
{
this.WrappedObject.Next(celt, steppers, out pceltFetched);
}
}
}

127
src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugStringValue.cs

@ -0,0 +1,127 @@ @@ -0,0 +1,127 @@
// <file>
// <copyright see="prj:///doc/copyright.txt"/>
// <license see="prj:///doc/license.txt"/>
// <owner name="David Srbecký" email="dsrbecky@gmail.com"/>
// <version>$Revision$</version>
// </file>
namespace Debugger.Wrappers.CorDebug
{
using System;
public class ICorDebugStringValue
{
private Debugger.Interop.CorDebug.ICorDebugStringValue wrappedObject;
internal Debugger.Interop.CorDebug.ICorDebugStringValue WrappedObject
{
get
{
return this.wrappedObject;
}
}
public ICorDebugStringValue(Debugger.Interop.CorDebug.ICorDebugStringValue wrappedObject)
{
this.wrappedObject = wrappedObject;
}
public static ICorDebugStringValue Wrap(Debugger.Interop.CorDebug.ICorDebugStringValue objectToWrap)
{
return new ICorDebugStringValue(objectToWrap);
}
public bool Is<T>() where T: class
{
try {
CastTo<T>();
return true;
} catch {
return false;
}
}
public T As<T>() where T: class
{
try {
return CastTo<T>();
} catch {
return null;
}
}
public T CastTo<T>() where T: class
{
return (T)Activator.CreateInstance(typeof(T), this.WrappedObject);
}
public static bool operator ==(ICorDebugStringValue o1, ICorDebugStringValue o2)
{
return ((object)o1 == null && (object)o2 == null) ||
((object)o1 != null && (object)o2 != null && o1.WrappedObject == o2.WrappedObject);
}
public static bool operator !=(ICorDebugStringValue o1, ICorDebugStringValue o2)
{
return !(o1 == o2);
}
public override int GetHashCode()
{
return base.GetHashCode();
}
public override bool Equals(object o)
{
ICorDebugStringValue casted = o as ICorDebugStringValue;
return (casted != null) && (casted.WrappedObject == wrappedObject);
}
public void GetType(out uint pType)
{
this.WrappedObject.GetType(out pType);
}
public void GetSize(out uint pSize)
{
this.WrappedObject.GetSize(out pSize);
}
public void GetAddress(out ulong pAddress)
{
this.WrappedObject.GetAddress(out pAddress);
}
public void CreateBreakpoint(out ICorDebugValueBreakpoint ppBreakpoint)
{
Debugger.Interop.CorDebug.ICorDebugValueBreakpoint out_ppBreakpoint;
this.WrappedObject.CreateBreakpoint(out out_ppBreakpoint);
ppBreakpoint = ICorDebugValueBreakpoint.Wrap(out_ppBreakpoint);
}
public void IsValid(out int pbValid)
{
this.WrappedObject.IsValid(out pbValid);
}
public void CreateRelocBreakpoint(out ICorDebugValueBreakpoint ppBreakpoint)
{
Debugger.Interop.CorDebug.ICorDebugValueBreakpoint out_ppBreakpoint;
this.WrappedObject.CreateRelocBreakpoint(out out_ppBreakpoint);
ppBreakpoint = ICorDebugValueBreakpoint.Wrap(out_ppBreakpoint);
}
public void GetLength(out uint pcchString)
{
this.WrappedObject.GetLength(out pcchString);
}
public void GetString(uint cchString, out uint pcchString, System.IntPtr szString)
{
this.WrappedObject.GetString(cchString, out pcchString, szString);
}
}
}

187
src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugThread.cs

@ -0,0 +1,187 @@ @@ -0,0 +1,187 @@
// <file>
// <copyright see="prj:///doc/copyright.txt"/>
// <license see="prj:///doc/license.txt"/>
// <owner name="David Srbecký" email="dsrbecky@gmail.com"/>
// <version>$Revision$</version>
// </file>
namespace Debugger.Wrappers.CorDebug
{
using System;
public class ICorDebugThread
{
private Debugger.Interop.CorDebug.ICorDebugThread wrappedObject;
internal Debugger.Interop.CorDebug.ICorDebugThread WrappedObject
{
get
{
return this.wrappedObject;
}
}
public ICorDebugThread(Debugger.Interop.CorDebug.ICorDebugThread wrappedObject)
{
this.wrappedObject = wrappedObject;
}
public static ICorDebugThread Wrap(Debugger.Interop.CorDebug.ICorDebugThread objectToWrap)
{
return new ICorDebugThread(objectToWrap);
}
public bool Is<T>() where T: class
{
try {
CastTo<T>();
return true;
} catch {
return false;
}
}
public T As<T>() where T: class
{
try {
return CastTo<T>();
} catch {
return null;
}
}
public T CastTo<T>() where T: class
{
return (T)Activator.CreateInstance(typeof(T), this.WrappedObject);
}
public static bool operator ==(ICorDebugThread o1, ICorDebugThread o2)
{
return ((object)o1 == null && (object)o2 == null) ||
((object)o1 != null && (object)o2 != null && o1.WrappedObject == o2.WrappedObject);
}
public static bool operator !=(ICorDebugThread o1, ICorDebugThread o2)
{
return !(o1 == o2);
}
public override int GetHashCode()
{
return base.GetHashCode();
}
public override bool Equals(object o)
{
ICorDebugThread casted = o as ICorDebugThread;
return (casted != null) && (casted.WrappedObject == wrappedObject);
}
public void GetProcess(out ICorDebugProcess ppProcess)
{
Debugger.Interop.CorDebug.ICorDebugProcess out_ppProcess;
this.WrappedObject.GetProcess(out out_ppProcess);
ppProcess = ICorDebugProcess.Wrap(out_ppProcess);
}
public void GetID(out uint pdwThreadId)
{
this.WrappedObject.GetID(out pdwThreadId);
}
public void GetHandle(out uint phThreadHandle)
{
this.WrappedObject.GetHandle(out phThreadHandle);
}
public void GetAppDomain(out ICorDebugAppDomain ppAppDomain)
{
Debugger.Interop.CorDebug.ICorDebugAppDomain out_ppAppDomain;
this.WrappedObject.GetAppDomain(out out_ppAppDomain);
ppAppDomain = ICorDebugAppDomain.Wrap(out_ppAppDomain);
}
public void SetDebugState(CorDebugThreadState state)
{
this.WrappedObject.SetDebugState(((Debugger.Interop.CorDebug.CorDebugThreadState)(state)));
}
public void GetDebugState(out CorDebugThreadState pState)
{
Debugger.Interop.CorDebug.CorDebugThreadState out_pState;
this.WrappedObject.GetDebugState(out out_pState);
pState = ((CorDebugThreadState)(out_pState));
}
public void GetUserState(out CorDebugUserState pState)
{
Debugger.Interop.CorDebug.CorDebugUserState out_pState;
this.WrappedObject.GetUserState(out out_pState);
pState = ((CorDebugUserState)(out_pState));
}
public void GetCurrentException(out ICorDebugValue ppExceptionObject)
{
Debugger.Interop.CorDebug.ICorDebugValue out_ppExceptionObject;
this.WrappedObject.GetCurrentException(out out_ppExceptionObject);
ppExceptionObject = ICorDebugValue.Wrap(out_ppExceptionObject);
}
public void ClearCurrentException()
{
this.WrappedObject.ClearCurrentException();
}
public void CreateStepper(out ICorDebugStepper ppStepper)
{
Debugger.Interop.CorDebug.ICorDebugStepper out_ppStepper;
this.WrappedObject.CreateStepper(out out_ppStepper);
ppStepper = ICorDebugStepper.Wrap(out_ppStepper);
}
public void EnumerateChains(out ICorDebugChainEnum ppChains)
{
Debugger.Interop.CorDebug.ICorDebugChainEnum out_ppChains;
this.WrappedObject.EnumerateChains(out out_ppChains);
ppChains = ICorDebugChainEnum.Wrap(out_ppChains);
}
public void GetActiveChain(out ICorDebugChain ppChain)
{
Debugger.Interop.CorDebug.ICorDebugChain out_ppChain;
this.WrappedObject.GetActiveChain(out out_ppChain);
ppChain = ICorDebugChain.Wrap(out_ppChain);
}
public void GetActiveFrame(out ICorDebugFrame ppFrame)
{
Debugger.Interop.CorDebug.ICorDebugFrame out_ppFrame;
this.WrappedObject.GetActiveFrame(out out_ppFrame);
ppFrame = ICorDebugFrame.Wrap(out_ppFrame);
}
public void GetRegisterSet(out ICorDebugRegisterSet ppRegisters)
{
Debugger.Interop.CorDebug.ICorDebugRegisterSet out_ppRegisters;
this.WrappedObject.GetRegisterSet(out out_ppRegisters);
ppRegisters = ICorDebugRegisterSet.Wrap(out_ppRegisters);
}
public void CreateEval(out ICorDebugEval ppEval)
{
Debugger.Interop.CorDebug.ICorDebugEval out_ppEval;
this.WrappedObject.CreateEval(out out_ppEval);
ppEval = ICorDebugEval.Wrap(out_ppEval);
}
public void GetObject(out ICorDebugValue ppObject)
{
Debugger.Interop.CorDebug.ICorDebugValue out_ppObject;
this.WrappedObject.GetObject(out out_ppObject);
ppObject = ICorDebugValue.Wrap(out_ppObject);
}
}
}

108
src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugThread2.cs

@ -0,0 +1,108 @@ @@ -0,0 +1,108 @@
// <file>
// <copyright see="prj:///doc/copyright.txt"/>
// <license see="prj:///doc/license.txt"/>
// <owner name="David Srbecký" email="dsrbecky@gmail.com"/>
// <version>$Revision$</version>
// </file>
namespace Debugger.Wrappers.CorDebug
{
using System;
public class ICorDebugThread2
{
private Debugger.Interop.CorDebug.ICorDebugThread2 wrappedObject;
internal Debugger.Interop.CorDebug.ICorDebugThread2 WrappedObject
{
get
{
return this.wrappedObject;
}
}
public ICorDebugThread2(Debugger.Interop.CorDebug.ICorDebugThread2 wrappedObject)
{
this.wrappedObject = wrappedObject;
}
public static ICorDebugThread2 Wrap(Debugger.Interop.CorDebug.ICorDebugThread2 objectToWrap)
{
return new ICorDebugThread2(objectToWrap);
}
public bool Is<T>() where T: class
{
try {
CastTo<T>();
return true;
} catch {
return false;
}
}
public T As<T>() where T: class
{
try {
return CastTo<T>();
} catch {
return null;
}
}
public T CastTo<T>() where T: class
{
return (T)Activator.CreateInstance(typeof(T), this.WrappedObject);
}
public static bool operator ==(ICorDebugThread2 o1, ICorDebugThread2 o2)
{
return ((object)o1 == null && (object)o2 == null) ||
((object)o1 != null && (object)o2 != null && o1.WrappedObject == o2.WrappedObject);
}
public static bool operator !=(ICorDebugThread2 o1, ICorDebugThread2 o2)
{
return !(o1 == o2);
}
public override int GetHashCode()
{
return base.GetHashCode();
}
public override bool Equals(object o)
{
ICorDebugThread2 casted = o as ICorDebugThread2;
return (casted != null) && (casted.WrappedObject == wrappedObject);
}
public void GetActiveFunctions(uint cFunctions, out uint pcFunctions, System.IntPtr pFunctions)
{
this.WrappedObject.GetActiveFunctions(cFunctions, out pcFunctions, pFunctions);
}
public void GetConnectionID(out uint pdwConnectionId)
{
this.WrappedObject.GetConnectionID(out pdwConnectionId);
}
public void GetTaskID(out ulong pTaskId)
{
this.WrappedObject.GetTaskID(out pTaskId);
}
public void GetVolatileOSThreadID(out uint pdwTid)
{
this.WrappedObject.GetVolatileOSThreadID(out pdwTid);
}
public void InterceptCurrentException(ICorDebugFrame pFrame)
{
this.WrappedObject.InterceptCurrentException(pFrame.WrappedObject);
}
}
}

110
src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugThreadEnum.cs

@ -0,0 +1,110 @@ @@ -0,0 +1,110 @@
// <file>
// <copyright see="prj:///doc/copyright.txt"/>
// <license see="prj:///doc/license.txt"/>
// <owner name="David Srbecký" email="dsrbecky@gmail.com"/>
// <version>$Revision$</version>
// </file>
namespace Debugger.Wrappers.CorDebug
{
using System;
public class ICorDebugThreadEnum
{
private Debugger.Interop.CorDebug.ICorDebugThreadEnum wrappedObject;
internal Debugger.Interop.CorDebug.ICorDebugThreadEnum WrappedObject
{
get
{
return this.wrappedObject;
}
}
public ICorDebugThreadEnum(Debugger.Interop.CorDebug.ICorDebugThreadEnum wrappedObject)
{
this.wrappedObject = wrappedObject;
}
public static ICorDebugThreadEnum Wrap(Debugger.Interop.CorDebug.ICorDebugThreadEnum objectToWrap)
{
return new ICorDebugThreadEnum(objectToWrap);
}
public bool Is<T>() where T: class
{
try {
CastTo<T>();
return true;
} catch {
return false;
}
}
public T As<T>() where T: class
{
try {
return CastTo<T>();
} catch {
return null;
}
}
public T CastTo<T>() where T: class
{
return (T)Activator.CreateInstance(typeof(T), this.WrappedObject);
}
public static bool operator ==(ICorDebugThreadEnum o1, ICorDebugThreadEnum o2)
{
return ((object)o1 == null && (object)o2 == null) ||
((object)o1 != null && (object)o2 != null && o1.WrappedObject == o2.WrappedObject);
}
public static bool operator !=(ICorDebugThreadEnum o1, ICorDebugThreadEnum o2)
{
return !(o1 == o2);
}
public override int GetHashCode()
{
return base.GetHashCode();
}
public override bool Equals(object o)
{
ICorDebugThreadEnum casted = o as ICorDebugThreadEnum;
return (casted != null) && (casted.WrappedObject == wrappedObject);
}
public void Skip(uint celt)
{
this.WrappedObject.Skip(celt);
}
public void Reset()
{
this.WrappedObject.Reset();
}
public void Clone(out ICorDebugEnum ppEnum)
{
Debugger.Interop.CorDebug.ICorDebugEnum out_ppEnum;
this.WrappedObject.Clone(out out_ppEnum);
ppEnum = ICorDebugEnum.Wrap(out_ppEnum);
}
public void GetCount(out uint pcelt)
{
this.WrappedObject.GetCount(out pcelt);
}
public void Next(uint celt, System.IntPtr threads, out uint pceltFetched)
{
this.WrappedObject.Next(celt, threads, out pceltFetched);
}
}
}

128
src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugType.cs

@ -0,0 +1,128 @@ @@ -0,0 +1,128 @@
// <file>
// <copyright see="prj:///doc/copyright.txt"/>
// <license see="prj:///doc/license.txt"/>
// <owner name="David Srbecký" email="dsrbecky@gmail.com"/>
// <version>$Revision$</version>
// </file>
namespace Debugger.Wrappers.CorDebug
{
using System;
public class ICorDebugType
{
private Debugger.Interop.CorDebug.ICorDebugType wrappedObject;
internal Debugger.Interop.CorDebug.ICorDebugType WrappedObject
{
get
{
return this.wrappedObject;
}
}
public ICorDebugType(Debugger.Interop.CorDebug.ICorDebugType wrappedObject)
{
this.wrappedObject = wrappedObject;
}
public static ICorDebugType Wrap(Debugger.Interop.CorDebug.ICorDebugType objectToWrap)
{
return new ICorDebugType(objectToWrap);
}
public bool Is<T>() where T: class
{
try {
CastTo<T>();
return true;
} catch {
return false;
}
}
public T As<T>() where T: class
{
try {
return CastTo<T>();
} catch {
return null;
}
}
public T CastTo<T>() where T: class
{
return (T)Activator.CreateInstance(typeof(T), this.WrappedObject);
}
public static bool operator ==(ICorDebugType o1, ICorDebugType o2)
{
return ((object)o1 == null && (object)o2 == null) ||
((object)o1 != null && (object)o2 != null && o1.WrappedObject == o2.WrappedObject);
}
public static bool operator !=(ICorDebugType o1, ICorDebugType o2)
{
return !(o1 == o2);
}
public override int GetHashCode()
{
return base.GetHashCode();
}
public override bool Equals(object o)
{
ICorDebugType casted = o as ICorDebugType;
return (casted != null) && (casted.WrappedObject == wrappedObject);
}
public void GetType(out uint ty)
{
this.WrappedObject.GetType(out ty);
}
public void GetClass(out ICorDebugClass ppClass)
{
Debugger.Interop.CorDebug.ICorDebugClass out_ppClass;
this.WrappedObject.GetClass(out out_ppClass);
ppClass = ICorDebugClass.Wrap(out_ppClass);
}
public void EnumerateTypeParameters(out ICorDebugTypeEnum ppTyParEnum)
{
Debugger.Interop.CorDebug.ICorDebugTypeEnum out_ppTyParEnum;
this.WrappedObject.EnumerateTypeParameters(out out_ppTyParEnum);
ppTyParEnum = ICorDebugTypeEnum.Wrap(out_ppTyParEnum);
}
public void GetFirstTypeParameter(out ICorDebugType value)
{
Debugger.Interop.CorDebug.ICorDebugType out_value;
this.WrappedObject.GetFirstTypeParameter(out out_value);
value = ICorDebugType.Wrap(out_value);
}
public void GetBase(out ICorDebugType pBase)
{
Debugger.Interop.CorDebug.ICorDebugType out_pBase;
this.WrappedObject.GetBase(out out_pBase);
pBase = ICorDebugType.Wrap(out_pBase);
}
public void GetStaticFieldValue(uint fieldDef, ICorDebugFrame pFrame, out ICorDebugValue ppValue)
{
Debugger.Interop.CorDebug.ICorDebugValue out_ppValue;
this.WrappedObject.GetStaticFieldValue(fieldDef, pFrame.WrappedObject, out out_ppValue);
ppValue = ICorDebugValue.Wrap(out_ppValue);
}
public void GetRank(out uint pnRank)
{
this.WrappedObject.GetRank(out pnRank);
}
}
}

110
src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugTypeEnum.cs

@ -0,0 +1,110 @@ @@ -0,0 +1,110 @@
// <file>
// <copyright see="prj:///doc/copyright.txt"/>
// <license see="prj:///doc/license.txt"/>
// <owner name="David Srbecký" email="dsrbecky@gmail.com"/>
// <version>$Revision$</version>
// </file>
namespace Debugger.Wrappers.CorDebug
{
using System;
public class ICorDebugTypeEnum
{
private Debugger.Interop.CorDebug.ICorDebugTypeEnum wrappedObject;
internal Debugger.Interop.CorDebug.ICorDebugTypeEnum WrappedObject
{
get
{
return this.wrappedObject;
}
}
public ICorDebugTypeEnum(Debugger.Interop.CorDebug.ICorDebugTypeEnum wrappedObject)
{
this.wrappedObject = wrappedObject;
}
public static ICorDebugTypeEnum Wrap(Debugger.Interop.CorDebug.ICorDebugTypeEnum objectToWrap)
{
return new ICorDebugTypeEnum(objectToWrap);
}
public bool Is<T>() where T: class
{
try {
CastTo<T>();
return true;
} catch {
return false;
}
}
public T As<T>() where T: class
{
try {
return CastTo<T>();
} catch {
return null;
}
}
public T CastTo<T>() where T: class
{
return (T)Activator.CreateInstance(typeof(T), this.WrappedObject);
}
public static bool operator ==(ICorDebugTypeEnum o1, ICorDebugTypeEnum o2)
{
return ((object)o1 == null && (object)o2 == null) ||
((object)o1 != null && (object)o2 != null && o1.WrappedObject == o2.WrappedObject);
}
public static bool operator !=(ICorDebugTypeEnum o1, ICorDebugTypeEnum o2)
{
return !(o1 == o2);
}
public override int GetHashCode()
{
return base.GetHashCode();
}
public override bool Equals(object o)
{
ICorDebugTypeEnum casted = o as ICorDebugTypeEnum;
return (casted != null) && (casted.WrappedObject == wrappedObject);
}
public void Skip(uint celt)
{
this.WrappedObject.Skip(celt);
}
public void Reset()
{
this.WrappedObject.Reset();
}
public void Clone(out ICorDebugEnum ppEnum)
{
Debugger.Interop.CorDebug.ICorDebugEnum out_ppEnum;
this.WrappedObject.Clone(out out_ppEnum);
ppEnum = ICorDebugEnum.Wrap(out_ppEnum);
}
public void GetCount(out uint pcelt)
{
this.WrappedObject.GetCount(out pcelt);
}
public void Next(uint celt, System.IntPtr values, out uint pceltFetched)
{
this.WrappedObject.Next(celt, values, out pceltFetched);
}
}
}

88
src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugUnmanagedCallback.cs

@ -0,0 +1,88 @@ @@ -0,0 +1,88 @@
// <file>
// <copyright see="prj:///doc/copyright.txt"/>
// <license see="prj:///doc/license.txt"/>
// <owner name="David Srbecký" email="dsrbecky@gmail.com"/>
// <version>$Revision$</version>
// </file>
namespace Debugger.Wrappers.CorDebug
{
using System;
public class ICorDebugUnmanagedCallback
{
private Debugger.Interop.CorDebug.ICorDebugUnmanagedCallback wrappedObject;
internal Debugger.Interop.CorDebug.ICorDebugUnmanagedCallback WrappedObject
{
get
{
return this.wrappedObject;
}
}
public ICorDebugUnmanagedCallback(Debugger.Interop.CorDebug.ICorDebugUnmanagedCallback wrappedObject)
{
this.wrappedObject = wrappedObject;
}
public static ICorDebugUnmanagedCallback Wrap(Debugger.Interop.CorDebug.ICorDebugUnmanagedCallback objectToWrap)
{
return new ICorDebugUnmanagedCallback(objectToWrap);
}
public bool Is<T>() where T: class
{
try {
CastTo<T>();
return true;
} catch {
return false;
}
}
public T As<T>() where T: class
{
try {
return CastTo<T>();
} catch {
return null;
}
}
public T CastTo<T>() where T: class
{
return (T)Activator.CreateInstance(typeof(T), this.WrappedObject);
}
public static bool operator ==(ICorDebugUnmanagedCallback o1, ICorDebugUnmanagedCallback o2)
{
return ((object)o1 == null && (object)o2 == null) ||
((object)o1 != null && (object)o2 != null && o1.WrappedObject == o2.WrappedObject);
}
public static bool operator !=(ICorDebugUnmanagedCallback o1, ICorDebugUnmanagedCallback o2)
{
return !(o1 == o2);
}
public override int GetHashCode()
{
return base.GetHashCode();
}
public override bool Equals(object o)
{
ICorDebugUnmanagedCallback casted = o as ICorDebugUnmanagedCallback;
return (casted != null) && (casted.WrappedObject == wrappedObject);
}
public void DebugEvent(uint pDebugEvent, int fOutOfBand)
{
this.WrappedObject.DebugEvent(pDebugEvent, fOutOfBand);
}
}
}

105
src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugValue.cs

@ -0,0 +1,105 @@ @@ -0,0 +1,105 @@
// <file>
// <copyright see="prj:///doc/copyright.txt"/>
// <license see="prj:///doc/license.txt"/>
// <owner name="David Srbecký" email="dsrbecky@gmail.com"/>
// <version>$Revision$</version>
// </file>
namespace Debugger.Wrappers.CorDebug
{
using System;
public class ICorDebugValue
{
private Debugger.Interop.CorDebug.ICorDebugValue wrappedObject;
internal Debugger.Interop.CorDebug.ICorDebugValue WrappedObject
{
get
{
return this.wrappedObject;
}
}
public ICorDebugValue(Debugger.Interop.CorDebug.ICorDebugValue wrappedObject)
{
this.wrappedObject = wrappedObject;
}
public static ICorDebugValue Wrap(Debugger.Interop.CorDebug.ICorDebugValue objectToWrap)
{
return new ICorDebugValue(objectToWrap);
}
public bool Is<T>() where T: class
{
try {
CastTo<T>();
return true;
} catch {
return false;
}
}
public T As<T>() where T: class
{
try {
return CastTo<T>();
} catch {
return null;
}
}
public T CastTo<T>() where T: class
{
return (T)Activator.CreateInstance(typeof(T), this.WrappedObject);
}
public static bool operator ==(ICorDebugValue o1, ICorDebugValue o2)
{
return ((object)o1 == null && (object)o2 == null) ||
((object)o1 != null && (object)o2 != null && o1.WrappedObject == o2.WrappedObject);
}
public static bool operator !=(ICorDebugValue o1, ICorDebugValue o2)
{
return !(o1 == o2);
}
public override int GetHashCode()
{
return base.GetHashCode();
}
public override bool Equals(object o)
{
ICorDebugValue casted = o as ICorDebugValue;
return (casted != null) && (casted.WrappedObject == wrappedObject);
}
public void GetType(out uint pType)
{
this.WrappedObject.GetType(out pType);
}
public void GetSize(out uint pSize)
{
this.WrappedObject.GetSize(out pSize);
}
public void GetAddress(out ulong pAddress)
{
this.WrappedObject.GetAddress(out pAddress);
}
public void CreateBreakpoint(out ICorDebugValueBreakpoint ppBreakpoint)
{
Debugger.Interop.CorDebug.ICorDebugValueBreakpoint out_ppBreakpoint;
this.WrappedObject.CreateBreakpoint(out out_ppBreakpoint);
ppBreakpoint = ICorDebugValueBreakpoint.Wrap(out_ppBreakpoint);
}
}
}

90
src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugValue2.cs

@ -0,0 +1,90 @@ @@ -0,0 +1,90 @@
// <file>
// <copyright see="prj:///doc/copyright.txt"/>
// <license see="prj:///doc/license.txt"/>
// <owner name="David Srbecký" email="dsrbecky@gmail.com"/>
// <version>$Revision$</version>
// </file>
namespace Debugger.Wrappers.CorDebug
{
using System;
public class ICorDebugValue2
{
private Debugger.Interop.CorDebug.ICorDebugValue2 wrappedObject;
internal Debugger.Interop.CorDebug.ICorDebugValue2 WrappedObject
{
get
{
return this.wrappedObject;
}
}
public ICorDebugValue2(Debugger.Interop.CorDebug.ICorDebugValue2 wrappedObject)
{
this.wrappedObject = wrappedObject;
}
public static ICorDebugValue2 Wrap(Debugger.Interop.CorDebug.ICorDebugValue2 objectToWrap)
{
return new ICorDebugValue2(objectToWrap);
}
public bool Is<T>() where T: class
{
try {
CastTo<T>();
return true;
} catch {
return false;
}
}
public T As<T>() where T: class
{
try {
return CastTo<T>();
} catch {
return null;
}
}
public T CastTo<T>() where T: class
{
return (T)Activator.CreateInstance(typeof(T), this.WrappedObject);
}
public static bool operator ==(ICorDebugValue2 o1, ICorDebugValue2 o2)
{
return ((object)o1 == null && (object)o2 == null) ||
((object)o1 != null && (object)o2 != null && o1.WrappedObject == o2.WrappedObject);
}
public static bool operator !=(ICorDebugValue2 o1, ICorDebugValue2 o2)
{
return !(o1 == o2);
}
public override int GetHashCode()
{
return base.GetHashCode();
}
public override bool Equals(object o)
{
ICorDebugValue2 casted = o as ICorDebugValue2;
return (casted != null) && (casted.WrappedObject == wrappedObject);
}
public void GetExactType(out ICorDebugType ppType)
{
Debugger.Interop.CorDebug.ICorDebugType out_ppType;
this.WrappedObject.GetExactType(out out_ppType);
ppType = ICorDebugType.Wrap(out_ppType);
}
}
}

100
src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugValueBreakpoint.cs

@ -0,0 +1,100 @@ @@ -0,0 +1,100 @@
// <file>
// <copyright see="prj:///doc/copyright.txt"/>
// <license see="prj:///doc/license.txt"/>
// <owner name="David Srbecký" email="dsrbecky@gmail.com"/>
// <version>$Revision$</version>
// </file>
namespace Debugger.Wrappers.CorDebug
{
using System;
public class ICorDebugValueBreakpoint
{
private Debugger.Interop.CorDebug.ICorDebugValueBreakpoint wrappedObject;
internal Debugger.Interop.CorDebug.ICorDebugValueBreakpoint WrappedObject
{
get
{
return this.wrappedObject;
}
}
public ICorDebugValueBreakpoint(Debugger.Interop.CorDebug.ICorDebugValueBreakpoint wrappedObject)
{
this.wrappedObject = wrappedObject;
}
public static ICorDebugValueBreakpoint Wrap(Debugger.Interop.CorDebug.ICorDebugValueBreakpoint objectToWrap)
{
return new ICorDebugValueBreakpoint(objectToWrap);
}
public bool Is<T>() where T: class
{
try {
CastTo<T>();
return true;
} catch {
return false;
}
}
public T As<T>() where T: class
{
try {
return CastTo<T>();
} catch {
return null;
}
}
public T CastTo<T>() where T: class
{
return (T)Activator.CreateInstance(typeof(T), this.WrappedObject);
}
public static bool operator ==(ICorDebugValueBreakpoint o1, ICorDebugValueBreakpoint o2)
{
return ((object)o1 == null && (object)o2 == null) ||
((object)o1 != null && (object)o2 != null && o1.WrappedObject == o2.WrappedObject);
}
public static bool operator !=(ICorDebugValueBreakpoint o1, ICorDebugValueBreakpoint o2)
{
return !(o1 == o2);
}
public override int GetHashCode()
{
return base.GetHashCode();
}
public override bool Equals(object o)
{
ICorDebugValueBreakpoint casted = o as ICorDebugValueBreakpoint;
return (casted != null) && (casted.WrappedObject == wrappedObject);
}
public void Activate(int bActive)
{
this.WrappedObject.Activate(bActive);
}
public void IsActive(out int pbActive)
{
this.WrappedObject.IsActive(out pbActive);
}
public void GetValue(out ICorDebugValue ppValue)
{
Debugger.Interop.CorDebug.ICorDebugValue out_ppValue;
this.WrappedObject.GetValue(out out_ppValue);
ppValue = ICorDebugValue.Wrap(out_ppValue);
}
}
}

110
src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugValueEnum.cs

@ -0,0 +1,110 @@ @@ -0,0 +1,110 @@
// <file>
// <copyright see="prj:///doc/copyright.txt"/>
// <license see="prj:///doc/license.txt"/>
// <owner name="David Srbecký" email="dsrbecky@gmail.com"/>
// <version>$Revision$</version>
// </file>
namespace Debugger.Wrappers.CorDebug
{
using System;
public class ICorDebugValueEnum
{
private Debugger.Interop.CorDebug.ICorDebugValueEnum wrappedObject;
internal Debugger.Interop.CorDebug.ICorDebugValueEnum WrappedObject
{
get
{
return this.wrappedObject;
}
}
public ICorDebugValueEnum(Debugger.Interop.CorDebug.ICorDebugValueEnum wrappedObject)
{
this.wrappedObject = wrappedObject;
}
public static ICorDebugValueEnum Wrap(Debugger.Interop.CorDebug.ICorDebugValueEnum objectToWrap)
{
return new ICorDebugValueEnum(objectToWrap);
}
public bool Is<T>() where T: class
{
try {
CastTo<T>();
return true;
} catch {
return false;
}
}
public T As<T>() where T: class
{
try {
return CastTo<T>();
} catch {
return null;
}
}
public T CastTo<T>() where T: class
{
return (T)Activator.CreateInstance(typeof(T), this.WrappedObject);
}
public static bool operator ==(ICorDebugValueEnum o1, ICorDebugValueEnum o2)
{
return ((object)o1 == null && (object)o2 == null) ||
((object)o1 != null && (object)o2 != null && o1.WrappedObject == o2.WrappedObject);
}
public static bool operator !=(ICorDebugValueEnum o1, ICorDebugValueEnum o2)
{
return !(o1 == o2);
}
public override int GetHashCode()
{
return base.GetHashCode();
}
public override bool Equals(object o)
{
ICorDebugValueEnum casted = o as ICorDebugValueEnum;
return (casted != null) && (casted.WrappedObject == wrappedObject);
}
public void Skip(uint celt)
{
this.WrappedObject.Skip(celt);
}
public void Reset()
{
this.WrappedObject.Reset();
}
public void Clone(out ICorDebugEnum ppEnum)
{
Debugger.Interop.CorDebug.ICorDebugEnum out_ppEnum;
this.WrappedObject.Clone(out out_ppEnum);
ppEnum = ICorDebugEnum.Wrap(out_ppEnum);
}
public void GetCount(out uint pcelt)
{
this.WrappedObject.GetCount(out pcelt);
}
public void Next(uint celt, System.IntPtr values, out uint pceltFetched)
{
this.WrappedObject.Next(celt, values, out pceltFetched);
}
}
}

93
src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ISequentialStream.cs

@ -0,0 +1,93 @@ @@ -0,0 +1,93 @@
// <file>
// <copyright see="prj:///doc/copyright.txt"/>
// <license see="prj:///doc/license.txt"/>
// <owner name="David Srbecký" email="dsrbecky@gmail.com"/>
// <version>$Revision$</version>
// </file>
namespace Debugger.Wrappers.CorDebug
{
using System;
public class ISequentialStream
{
private Debugger.Interop.CorDebug.ISequentialStream wrappedObject;
internal Debugger.Interop.CorDebug.ISequentialStream WrappedObject
{
get
{
return this.wrappedObject;
}
}
public ISequentialStream(Debugger.Interop.CorDebug.ISequentialStream wrappedObject)
{
this.wrappedObject = wrappedObject;
}
public static ISequentialStream Wrap(Debugger.Interop.CorDebug.ISequentialStream objectToWrap)
{
return new ISequentialStream(objectToWrap);
}
public bool Is<T>() where T: class
{
try {
CastTo<T>();
return true;
} catch {
return false;
}
}
public T As<T>() where T: class
{
try {
return CastTo<T>();
} catch {
return null;
}
}
public T CastTo<T>() where T: class
{
return (T)Activator.CreateInstance(typeof(T), this.WrappedObject);
}
public static bool operator ==(ISequentialStream o1, ISequentialStream o2)
{
return ((object)o1 == null && (object)o2 == null) ||
((object)o1 != null && (object)o2 != null && o1.WrappedObject == o2.WrappedObject);
}
public static bool operator !=(ISequentialStream o1, ISequentialStream o2)
{
return !(o1 == o2);
}
public override int GetHashCode()
{
return base.GetHashCode();
}
public override bool Equals(object o)
{
ISequentialStream casted = o as ISequentialStream;
return (casted != null) && (casted.WrappedObject == wrappedObject);
}
public void RemoteRead(out byte pv, uint cb, out uint pcbRead)
{
this.WrappedObject.RemoteRead(out pv, cb, out pcbRead);
}
public void RemoteWrite(ref byte pv, uint cb, out uint pcbWritten)
{
this.WrappedObject.RemoteWrite(ref pv, cb, out pcbWritten);
}
}
}

140
src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/IStream.cs

@ -0,0 +1,140 @@ @@ -0,0 +1,140 @@
// <file>
// <copyright see="prj:///doc/copyright.txt"/>
// <license see="prj:///doc/license.txt"/>
// <owner name="David Srbecký" email="dsrbecky@gmail.com"/>
// <version>$Revision$</version>
// </file>
namespace Debugger.Wrappers.CorDebug
{
using System;
public class IStream
{
private Debugger.Interop.CorDebug.IStream wrappedObject;
internal Debugger.Interop.CorDebug.IStream WrappedObject
{
get
{
return this.wrappedObject;
}
}
public IStream(Debugger.Interop.CorDebug.IStream wrappedObject)
{
this.wrappedObject = wrappedObject;
}
public static IStream Wrap(Debugger.Interop.CorDebug.IStream objectToWrap)
{
return new IStream(objectToWrap);
}
public bool Is<T>() where T: class
{
try {
CastTo<T>();
return true;
} catch {
return false;
}
}
public T As<T>() where T: class
{
try {
return CastTo<T>();
} catch {
return null;
}
}
public T CastTo<T>() where T: class
{
return (T)Activator.CreateInstance(typeof(T), this.WrappedObject);
}
public static bool operator ==(IStream o1, IStream o2)
{
return ((object)o1 == null && (object)o2 == null) ||
((object)o1 != null && (object)o2 != null && o1.WrappedObject == o2.WrappedObject);
}
public static bool operator !=(IStream o1, IStream o2)
{
return !(o1 == o2);
}
public override int GetHashCode()
{
return base.GetHashCode();
}
public override bool Equals(object o)
{
IStream casted = o as IStream;
return (casted != null) && (casted.WrappedObject == wrappedObject);
}
public void RemoteRead(out byte pv, uint cb, out uint pcbRead)
{
this.WrappedObject.RemoteRead(out pv, cb, out pcbRead);
}
public void RemoteWrite(ref byte pv, uint cb, out uint pcbWritten)
{
this.WrappedObject.RemoteWrite(ref pv, cb, out pcbWritten);
}
public void RemoteSeek(Debugger.Interop.CorDebug._LARGE_INTEGER dlibMove, uint dwOrigin, out Debugger.Interop.CorDebug._ULARGE_INTEGER plibNewPosition)
{
this.WrappedObject.RemoteSeek(dlibMove, dwOrigin, out plibNewPosition);
}
public void SetSize(Debugger.Interop.CorDebug._ULARGE_INTEGER libNewSize)
{
this.WrappedObject.SetSize(libNewSize);
}
public void RemoteCopyTo(IStream pstm, Debugger.Interop.CorDebug._ULARGE_INTEGER cb, out Debugger.Interop.CorDebug._ULARGE_INTEGER pcbRead, out Debugger.Interop.CorDebug._ULARGE_INTEGER pcbWritten)
{
this.WrappedObject.RemoteCopyTo(pstm.WrappedObject, cb, out pcbRead, out pcbWritten);
}
public void Commit(uint grfCommitFlags)
{
this.WrappedObject.Commit(grfCommitFlags);
}
public void Revert()
{
this.WrappedObject.Revert();
}
public void LockRegion(Debugger.Interop.CorDebug._ULARGE_INTEGER libOffset, Debugger.Interop.CorDebug._ULARGE_INTEGER cb, uint dwLockType)
{
this.WrappedObject.LockRegion(libOffset, cb, dwLockType);
}
public void UnlockRegion(Debugger.Interop.CorDebug._ULARGE_INTEGER libOffset, Debugger.Interop.CorDebug._ULARGE_INTEGER cb, uint dwLockType)
{
this.WrappedObject.UnlockRegion(libOffset, cb, dwLockType);
}
public void Stat(out Debugger.Interop.CorDebug.tagSTATSTG pstatstg, uint grfStatFlag)
{
this.WrappedObject.Stat(out pstatstg, grfStatFlag);
}
public void Clone(out IStream ppstm)
{
Debugger.Interop.CorDebug.IStream out_ppstm;
this.WrappedObject.Clone(out out_ppstm);
ppstm = IStream.Wrap(out_ppstm);
}
}
}
Loading…
Cancel
Save