diff options
author | David Karlaš <david.karlas@xamarin.com> | 2017-03-14 16:57:29 +0300 |
---|---|---|
committer | David Karlaš <david.karlas@xamarin.com> | 2017-03-14 16:57:29 +0300 |
commit | e62583eeca0eb53da57e6d71a76dff8e914857fd (patch) | |
tree | 4c9572fada35e0ee117b8a1a30f3f5f80d997e95 /main/src/addins/MonoDevelop.Debugger.Win32 | |
parent | 8206448d751c208926b277bed2d354ff0d378926 (diff) | |
parent | 2c96b36d23f4f747af069eb237a6231138dd5933 (diff) |
Merge vNext into roslyn-ivt
# Conflicts:
# main/src/addins/MonoDevelop.Debugger.Win32/CorApi/CorApi.csproj
# main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/CorApi2.csproj
# main/src/addins/MonoDevelop.Debugger.Win32/Mono.Debugging.Win32/Mono.Debugging.Win32.csproj
# version-checks
Diffstat (limited to 'main/src/addins/MonoDevelop.Debugger.Win32')
102 files changed, 0 insertions, 25828 deletions
diff --git a/main/src/addins/MonoDevelop.Debugger.Win32/CorApi/.editorconfig b/main/src/addins/MonoDevelop.Debugger.Win32/CorApi/.editorconfig deleted file mode 100644 index f3a408cbb1..0000000000 --- a/main/src/addins/MonoDevelop.Debugger.Win32/CorApi/.editorconfig +++ /dev/null @@ -1,4 +0,0 @@ -[*.cs]
-indent_style = space
-indent_size = 4
-end_of_line = crlf
\ No newline at end of file diff --git a/main/src/addins/MonoDevelop.Debugger.Win32/CorApi/ICorDebugWrappers.cs b/main/src/addins/MonoDevelop.Debugger.Win32/CorApi/ICorDebugWrappers.cs deleted file mode 100644 index 51625f08dc..0000000000 --- a/main/src/addins/MonoDevelop.Debugger.Win32/CorApi/ICorDebugWrappers.cs +++ /dev/null @@ -1,1935 +0,0 @@ -//---------------------------------------------------------------------
-// This file is part of the CLR Managed Debugger (mdbg) Sample.
-//
-// Copyright (C) Microsoft Corporation. All rights reserved.
-//
-// Imports ICorDebug interface from CorDebug.idl into managed code.
-//---------------------------------------------------------------------
-
-
-using System;
-using System.Text;
-using System.Runtime.CompilerServices;
-using System.Runtime.InteropServices;
-
-using IStream = System.Runtime.InteropServices.ComTypes.IStream;
-using Microsoft.Samples.Debugging.CorMetadata.NativeApi;
-using Microsoft.Win32.SafeHandles;
-
-namespace Microsoft.Samples.Debugging.CorDebug.NativeApi
-{
- [StructLayout(LayoutKind.Sequential, Pack = 4)]
- public struct _COR_VERSION
- {
- public uint dwMajor;
- public uint dwMinor;
- public uint dwBuild;
- public uint dwSubBuild;
- }
-
- [StructLayout(LayoutKind.Sequential, Pack = 8)]
- public struct _LARGE_INTEGER
- {
- public long QuadPart;
- }
-
- [StructLayout(LayoutKind.Sequential, Pack = 4)]
- public struct _SECURITY_ATTRIBUTES
- {
- public uint nLength;
- public IntPtr lpSecurityDescriptor;
- public int bInheritHandle;
- }
-
- [StructLayout(LayoutKind.Sequential, Pack = 8)]
- public struct _ULARGE_INTEGER
- {
- public ulong QuadPart;
- }
-
- [StructLayout(LayoutKind.Sequential, Pack = 4)]
- public struct COR_IL_MAP
- {
- public uint oldOffset;
- public uint newOffset;
- public int fAccurate;
- }
-
- public enum CorDebugCreateProcessFlags
- {
- DEBUG_NO_SPECIAL_OPTIONS
- }
-
- public enum CorDebugExceptionCallbackType
- {
- // Fields
- DEBUG_EXCEPTION_CATCH_HANDLER_FOUND = 3,
- DEBUG_EXCEPTION_FIRST_CHANCE = 1,
- DEBUG_EXCEPTION_UNHANDLED = 4,
- DEBUG_EXCEPTION_USER_FIRST_CHANCE = 2
- }
-
- public enum CorDebugExceptionUnwindCallbackType
- {
- // Fields
- DEBUG_EXCEPTION_INTERCEPTED = 2,
- DEBUG_EXCEPTION_UNWIND_BEGIN = 1
- }
-
-
- public enum CorDebugRegister
- {
- // Fields
- REGISTER_AMD64_R10 = 11,
- REGISTER_AMD64_R11 = 12,
- REGISTER_AMD64_R12 = 13,
- REGISTER_AMD64_R13 = 14,
- REGISTER_AMD64_R14 = 15,
- REGISTER_AMD64_R15 = 0x10,
- REGISTER_AMD64_R8 = 9,
- REGISTER_AMD64_R9 = 10,
- REGISTER_AMD64_RAX = 3,
- REGISTER_AMD64_RBP = 2,
- REGISTER_AMD64_RBX = 6,
- REGISTER_AMD64_RCX = 4,
- REGISTER_AMD64_RDI = 8,
- REGISTER_AMD64_RDX = 5,
- REGISTER_AMD64_RIP = 0,
- REGISTER_AMD64_RSI = 7,
- REGISTER_AMD64_RSP = 1,
- REGISTER_AMD64_XMM0 = 0x11,
- REGISTER_AMD64_XMM1 = 0x12,
- REGISTER_AMD64_XMM10 = 0x1b,
- REGISTER_AMD64_XMM11 = 0x1c,
- REGISTER_AMD64_XMM12 = 0x1d,
- REGISTER_AMD64_XMM13 = 30,
- REGISTER_AMD64_XMM14 = 0x1f,
- REGISTER_AMD64_XMM15 = 0x20,
- REGISTER_AMD64_XMM2 = 0x13,
- REGISTER_AMD64_XMM3 = 20,
- REGISTER_AMD64_XMM4 = 0x15,
- REGISTER_AMD64_XMM5 = 0x16,
- REGISTER_AMD64_XMM6 = 0x17,
- REGISTER_AMD64_XMM7 = 0x18,
- REGISTER_AMD64_XMM8 = 0x19,
- REGISTER_AMD64_XMM9 = 0x1a,
- REGISTER_FRAME_POINTER = 2,
- REGISTER_IA64_BSP = 2,
- REGISTER_IA64_F0 = 0x83,
- REGISTER_IA64_R0 = 3,
- REGISTER_INSTRUCTION_POINTER = 0,
- REGISTER_STACK_POINTER = 1,
- REGISTER_X86_EAX = 3,
- REGISTER_X86_EBP = 2,
- REGISTER_X86_EBX = 6,
- REGISTER_X86_ECX = 4,
- REGISTER_X86_EDI = 8,
- REGISTER_X86_EDX = 5,
- REGISTER_X86_EIP = 0,
- REGISTER_X86_ESI = 7,
- REGISTER_X86_ESP = 1,
- REGISTER_X86_FPSTACK_0 = 9,
- REGISTER_X86_FPSTACK_1 = 10,
- REGISTER_X86_FPSTACK_2 = 11,
- REGISTER_X86_FPSTACK_3 = 12,
- REGISTER_X86_FPSTACK_4 = 13,
- REGISTER_X86_FPSTACK_5 = 14,
- REGISTER_X86_FPSTACK_6 = 15,
- REGISTER_X86_FPSTACK_7 = 0x10
- }
-
-
-
-
-
- [Flags]
- public enum CorDebugUserState
- {
- // Fields
- USER_STOP_REQUESTED = 0x01,
- USER_SUSPEND_REQUESTED = 0x02,
- USER_BACKGROUND = 0x04,
- USER_UNSTARTED = 0x08,
- USER_STOPPED = 0x10,
- USER_WAIT_SLEEP_JOIN = 0x20,
- USER_SUSPENDED = 0x40,
- USER_UNSAFE_POINT = 0x80
- }
-
- // [Xamarin] Expression evaluator.
- [CLSCompliant (true)]
- [Flags]
- public enum CorElementType
- {
- // Fields
- ELEMENT_TYPE_ARRAY = 20,
- ELEMENT_TYPE_BOOLEAN = 2,
- ELEMENT_TYPE_BYREF = 0x10,
- ELEMENT_TYPE_CHAR = 3,
- ELEMENT_TYPE_CLASS = 0x12,
- ELEMENT_TYPE_CMOD_OPT = 0x20,
- ELEMENT_TYPE_CMOD_REQD = 0x1f,
- ELEMENT_TYPE_END = 0,
- ELEMENT_TYPE_FNPTR = 0x1b,
- ELEMENT_TYPE_GENERICINST = 0x15,
- ELEMENT_TYPE_I = 0x18,
- ELEMENT_TYPE_I1 = 4,
- ELEMENT_TYPE_I2 = 6,
- ELEMENT_TYPE_I4 = 8,
- ELEMENT_TYPE_I8 = 10,
- ELEMENT_TYPE_INTERNAL = 0x21,
- ELEMENT_TYPE_MAX = 0x22,
- ELEMENT_TYPE_MODIFIER = 0x40,
- ELEMENT_TYPE_MVAR = 0x1e,
- ELEMENT_TYPE_OBJECT = 0x1c,
- ELEMENT_TYPE_PINNED = 0x05 | ELEMENT_TYPE_MODIFIER,
- ELEMENT_TYPE_PTR = 15,
- ELEMENT_TYPE_R4 = 12,
- ELEMENT_TYPE_R8 = 13,
- ELEMENT_TYPE_SENTINEL = 0x01 | ELEMENT_TYPE_MODIFIER,
- ELEMENT_TYPE_STRING = 14,
- ELEMENT_TYPE_SZARRAY = 0x1d,
- ELEMENT_TYPE_TYPEDBYREF = 0x16,
- ELEMENT_TYPE_U = 0x19,
- ELEMENT_TYPE_U1 = 5,
- ELEMENT_TYPE_U2 = 7,
- ELEMENT_TYPE_U4 = 9,
- ELEMENT_TYPE_U8 = 11,
- ELEMENT_TYPE_VALUETYPE = 0x11,
- ELEMENT_TYPE_VAR = 0x13,
- ELEMENT_TYPE_VOID = 1,
-
-
- // from corpriv.h (CoreCLR sources)
-
- // ZAPSIG types
- // ZapSig encoding for ELEMENT_TYPE_VAR and ELEMENT_TYPE_MVAR. It is always followed
- // by the RID of a GenericParam token, encoded as a compressed integer.
- ELEMENT_TYPE_VAR_ZAPSIG = 0x3b,
-
- // ZapSig encoding for an array MethodTable to allow it to remain such after decoding
- // (rather than being transformed into the TypeHandle representing that array)
- //
- // The element is always followed by ELEMENT_TYPE_SZARRAY or ELEMENT_TYPE_ARRAY
- ELEMENT_TYPE_NATIVE_ARRAY_TEMPLATE_ZAPSIG = 0x3c,
-
- // ZapSig encoding for native value types in IL stubs. IL stub signatures may contain
- // ELEMENT_TYPE_INTERNAL followed by ParamTypeDesc with ELEMENT_TYPE_VALUETYPE element
- // type. It acts like a modifier to the underlying structure making it look like its
- // unmanaged view (size determined by unmanaged layout, blittable, no GC pointers).
- //
- // ELEMENT_TYPE_NATIVE_VALUETYPE_ZAPSIG is used when encoding such types to NGEN images.
- // The signature looks like this: ET_NATIVE_VALUETYPE_ZAPSIG ET_VALUETYPE <token>.
- // See code:ZapSig.GetSignatureForTypeHandle and code:SigPointer.GetTypeHandleThrowing
- // where the encoding/decoding takes place.
- ELEMENT_TYPE_NATIVE_VALUETYPE_ZAPSIG = 0x3d,
-
- ELEMENT_TYPE_CANON_ZAPSIG = 0x3e, // zapsig encoding for [mscorlib]System.__Canon
- ELEMENT_TYPE_MODULE_ZAPSIG = 0x3f, // zapsig encoding for external module id#
-
- }
-
- #region Top-level interfaces
- [ComImport, Guid("3D6F5F61-7538-11D3-8D5B-00104B35E7EF"), InterfaceType(1)]
- public interface ICorDebug
- {
- //
- void Initialize();
- //
- void Terminate();
- //
- void SetManagedHandler([In, MarshalAs(UnmanagedType.Interface)] ICorDebugManagedCallback pCallback);
- //
- void SetUnmanagedHandler([In, MarshalAs(UnmanagedType.Interface)] ICorDebugUnmanagedCallback pCallback);
- //
- void CreateProcess([In, MarshalAs(UnmanagedType.LPWStr)] string lpApplicationName, [In, MarshalAs(UnmanagedType.LPWStr)] string lpCommandLine, [In] SECURITY_ATTRIBUTES lpProcessAttributes, [In] SECURITY_ATTRIBUTES lpThreadAttributes, [In] int bInheritHandles, [In] uint dwCreationFlags, [In] IntPtr lpEnvironment, [In, MarshalAs(UnmanagedType.LPWStr)] string lpCurrentDirectory, [In] STARTUPINFO lpStartupInfo, [In] PROCESS_INFORMATION lpProcessInformation, [In] CorDebugCreateProcessFlags debuggingFlags, [Out, MarshalAs(UnmanagedType.Interface)] out ICorDebugProcess ppProcess);
- //
- void DebugActiveProcess([In] uint id, [In] int win32Attach, [Out, MarshalAs(UnmanagedType.Interface)] out ICorDebugProcess ppProcess);
- //
- void EnumerateProcesses([Out, MarshalAs(UnmanagedType.Interface)] out ICorDebugProcessEnum ppProcess);
- //
- void GetProcess([In] uint dwProcessId, [Out, MarshalAs(UnmanagedType.Interface)] out ICorDebugProcess ppProcess);
- //
- void CanLaunchOrAttach([In] uint dwProcessId, [In] int win32DebuggingEnabled);
- }
-
- [ComImport, CoClass(typeof(CorDebugClass)), Guid("3D6F5F61-7538-11D3-8D5B-00104B35E7EF")]
- public interface CorDebug : ICorDebug
- {
- }
-
-
-
- [ComImport, ClassInterface((short)0), Guid("6fef44d0-39e7-4c77-be8e-c9f8cf988630"), TypeLibType((short)2)]
- public class CorDebugClass : ICorDebug, CorDebug
- {
- // Methods
-
- [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
- public virtual extern void CanLaunchOrAttach([In] uint dwProcessId, [In] int win32DebuggingEnabled);
-
- [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
- public virtual extern void CreateProcess([In, MarshalAs(UnmanagedType.LPWStr)] string lpApplicationName, [In, MarshalAs(UnmanagedType.LPWStr)] string lpCommandLine, [In] SECURITY_ATTRIBUTES lpProcessAttributes, [In] SECURITY_ATTRIBUTES lpThreadAttributes, [In] int bInheritHandles, [In] uint dwCreationFlags, [In] IntPtr lpEnvironment, [In, MarshalAs(UnmanagedType.LPWStr)] string lpCurrentDirectory, [In] STARTUPINFO lpStartupInfo, [In] PROCESS_INFORMATION lpProcessInformation, [In] CorDebugCreateProcessFlags debuggingFlags, [Out, MarshalAs(UnmanagedType.Interface)] out ICorDebugProcess ppProcess);
-
- [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
- public virtual extern void DebugActiveProcess([In] uint id, [In] int win32Attach, [Out, MarshalAs(UnmanagedType.Interface)] out ICorDebugProcess ppProcess);
-
- [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
- public virtual extern void EnumerateProcesses([Out, MarshalAs(UnmanagedType.Interface)] out ICorDebugProcessEnum ppProcess);
-
- [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
- public virtual extern void GetProcess([In] uint dwProcessId, [Out, MarshalAs(UnmanagedType.Interface)] out ICorDebugProcess ppProcess);
-
- [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
- public virtual extern void Initialize();
-
- [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
- public virtual extern void SetManagedHandler([In, MarshalAs(UnmanagedType.Interface)] ICorDebugManagedCallback pCallback);
-
- [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
- public virtual extern void SetUnmanagedHandler([In, MarshalAs(UnmanagedType.Interface)] ICorDebugUnmanagedCallback pCallback);
-
- [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
- public virtual extern void Terminate();
- }
-
- [ComImport, Guid("3D6F5F61-7538-11D3-8D5B-00104B35E7EF"), CoClass(typeof(CorDebugManagerClass))]
- public interface CorDebugManager : ICorDebug
- {
- }
-
- [ComImport, ClassInterface((short)0), TypeLibType((short)2), Guid("B76B17EF-16FA-43A3-BABF-DB6E59439EB0")]
- public class CorDebugManagerClass : ICorDebug, CorDebugManager
- {
- // Methods
-
- [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
- public virtual extern void CanLaunchOrAttach([In] uint dwProcessId, [In] int win32DebuggingEnabled);
-
- [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
- public virtual extern void CreateProcess([In, MarshalAs(UnmanagedType.LPWStr)] string lpApplicationName, [In, MarshalAs(UnmanagedType.LPWStr)] string lpCommandLine, [In] SECURITY_ATTRIBUTES lpProcessAttributes, [In] SECURITY_ATTRIBUTES lpThreadAttributes, [In] int bInheritHandles, [In] uint dwCreationFlags, [In] IntPtr lpEnvironment, [In, MarshalAs(UnmanagedType.LPWStr)] string lpCurrentDirectory, [In, ComAliasName("Microsoft.Debugging.CorDebug.NativeApi.ULONG_PTR")] STARTUPINFO lpStartupInfo, [In, ComAliasName("Microsoft.Debugging.CorDebug.NativeApi.ULONG_PTR")] PROCESS_INFORMATION lpProcessInformation, [In] CorDebugCreateProcessFlags debuggingFlags, [Out, MarshalAs(UnmanagedType.Interface)] out ICorDebugProcess ppProcess);
-
- [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
- public virtual extern void DebugActiveProcess([In] uint id, [In] int win32Attach, [Out, MarshalAs(UnmanagedType.Interface)] out ICorDebugProcess ppProcess);
-
- [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
- public virtual extern void EnumerateProcesses([Out, MarshalAs(UnmanagedType.Interface)] out ICorDebugProcessEnum ppProcess);
-
- [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
- public virtual extern void GetProcess([In] uint dwProcessId, [Out, MarshalAs(UnmanagedType.Interface)] out ICorDebugProcess ppProcess);
-
- [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
- public virtual extern void Initialize();
-
- [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
- public virtual extern void SetManagedHandler([In, MarshalAs(UnmanagedType.Interface)] ICorDebugManagedCallback pCallback);
-
- [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
- public virtual extern void SetUnmanagedHandler([In, MarshalAs(UnmanagedType.Interface)] ICorDebugUnmanagedCallback pCallback);
-
- [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
- public virtual extern void Terminate();
- }
-
- [ComImport, Guid("3D6F5F61-7538-11D3-8D5B-00104B35E7EF"), CoClass(typeof(EmbeddedCLRCorDebugClass))]
- public interface EmbeddedCLRCorDebug : ICorDebug
- {
- }
-
- [ComImport, TypeLibType(2), Guid("211F1254-BC7E-4AF5-B9AA-067308D83DD1"), ClassInterface((short)0)]
- public class EmbeddedCLRCorDebugClass : ICorDebug, EmbeddedCLRCorDebug
- {
- // Methods
-
- [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
- public virtual extern void CanLaunchOrAttach([In] uint dwProcessId, [In] int win32DebuggingEnabled);
-
- [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
- public virtual extern void CreateProcess([In, MarshalAs(UnmanagedType.LPWStr)] string lpApplicationName, [In, MarshalAs(UnmanagedType.LPWStr)] string lpCommandLine, [In] SECURITY_ATTRIBUTES lpProcessAttributes, [In] SECURITY_ATTRIBUTES lpThreadAttributes, [In] int bInheritHandles, [In] uint dwCreationFlags, [In] IntPtr lpEnvironment, [In, MarshalAs(UnmanagedType.LPWStr)] string lpCurrentDirectory, [In, ComAliasName("Microsoft.Debugging.CorDebug.NativeApi.ULONG_PTR")] STARTUPINFO lpStartupInfo, [In, ComAliasName("Microsoft.Debugging.CorDebug.NativeApi.ULONG_PTR")] PROCESS_INFORMATION lpProcessInformation, [In] CorDebugCreateProcessFlags debuggingFlags, [Out, MarshalAs(UnmanagedType.Interface)] out ICorDebugProcess ppProcess);
-
- [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
- public virtual extern void DebugActiveProcess([In] uint id, [In] int win32Attach, [Out, MarshalAs(UnmanagedType.Interface)] out ICorDebugProcess ppProcess);
-
- [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
- public virtual extern void EnumerateProcesses([Out, MarshalAs(UnmanagedType.Interface)] out ICorDebugProcessEnum ppProcess);
-
- [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
- public virtual extern void GetProcess([In] uint dwProcessId, [Out, MarshalAs(UnmanagedType.Interface)] out ICorDebugProcess ppProcess);
-
- [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
- public virtual extern void Initialize();
-
- [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
- public virtual extern void SetManagedHandler([In, MarshalAs(UnmanagedType.Interface)] ICorDebugManagedCallback pCallback);
-
- [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
- public virtual extern void SetUnmanagedHandler([In, MarshalAs(UnmanagedType.Interface)] ICorDebugUnmanagedCallback pCallback);
-
- [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
- public virtual extern void Terminate();
- }
- #endregion // Top-level interfaces
-
- #region AppDomain, Process
- public enum CorDebugThreadState
- {
- THREAD_RUN,
- THREAD_SUSPEND
- }
-
- [ComImport, Guid("3D6F5F62-7538-11D3-8D5B-00104B35E7EF"), InterfaceType(1)]
- public interface ICorDebugController
- {
-
- void Stop([In] uint dwTimeout);
-
- void Continue([In] int fIsOutOfBand);
-
- void IsRunning([Out] out int pbRunning);
-
- void HasQueuedCallbacks([In, MarshalAs(UnmanagedType.Interface)] ICorDebugThread pThread, [Out] out int pbQueued);
-
- void EnumerateThreads([Out, MarshalAs(UnmanagedType.Interface)] out ICorDebugThreadEnum ppThreads);
-
- void SetAllThreadsDebugState([In] CorDebugThreadState state, [In, MarshalAs(UnmanagedType.Interface)] ICorDebugThread pExceptThisThread);
-
- void Detach();
-
- void Terminate([In] uint exitCode);
-
- void CanCommitChanges([In] uint cSnapshots, [In, MarshalAs(UnmanagedType.Interface)] ref ICorDebugEditAndContinueSnapshot pSnapshots, [Out, MarshalAs(UnmanagedType.Interface)] out ICorDebugErrorInfoEnum pError);
-
- void CommitChanges([In] uint cSnapshots, [In, MarshalAs(UnmanagedType.Interface)] ref ICorDebugEditAndContinueSnapshot pSnapshots, [Out, MarshalAs(UnmanagedType.Interface)] out ICorDebugErrorInfoEnum pError);
- }
-
- [ComImport, ComConversionLoss, InterfaceType(1), Guid("3D6F5F64-7538-11D3-8D5B-00104B35E7EF")]
- public interface ICorDebugProcess : ICorDebugController
- {
-
- new void Stop([In] uint dwTimeout);
-
- new void Continue([In] int fIsOutOfBand);
-
- new void IsRunning([Out] out int pbRunning);
-
- new void HasQueuedCallbacks([In, MarshalAs(UnmanagedType.Interface)] ICorDebugThread pThread, [Out] out int pbQueued);
-
- new void EnumerateThreads([Out, MarshalAs(UnmanagedType.Interface)] out ICorDebugThreadEnum ppThreads);
-
- new void SetAllThreadsDebugState([In] CorDebugThreadState state, [In, MarshalAs(UnmanagedType.Interface)] ICorDebugThread pExceptThisThread);
-
- new void Detach();
-
- new void Terminate([In] uint exitCode);
-
- new void CanCommitChanges([In] uint cSnapshots, [In, MarshalAs(UnmanagedType.Interface)] ref ICorDebugEditAndContinueSnapshot pSnapshots, [Out, MarshalAs(UnmanagedType.Interface)] out ICorDebugErrorInfoEnum pError);
-
- new void CommitChanges([In] uint cSnapshots, [In, MarshalAs(UnmanagedType.Interface)] ref ICorDebugEditAndContinueSnapshot pSnapshots, [Out, MarshalAs(UnmanagedType.Interface)] out ICorDebugErrorInfoEnum pError);
-
-
-
- void GetID([Out] out uint pdwProcessId);
-
- void GetHandle([Out, ComAliasName("HPROCESS*")] out IntPtr phProcessHandle);
-
- void GetThread([In] uint dwThreadId, [Out, MarshalAs(UnmanagedType.Interface)] out ICorDebugThread ppThread);
-
- void EnumerateObjects([Out, MarshalAs(UnmanagedType.Interface)] out ICorDebugObjectEnum ppObjects);
-
- void IsTransitionStub([In] ulong address, [Out] out int pbTransitionStub);
-
- void IsOSSuspended([In] uint threadID, [Out] out int pbSuspended);
-
- void GetThreadContext([In] uint threadID, [In] uint contextSize, [In, ComAliasName("BYTE*")] IntPtr context);
-
- void SetThreadContext([In] uint threadID, [In] uint contextSize, [In, ComAliasName("BYTE*")] IntPtr context);
-
- void ReadMemory([In] ulong address, [In] uint size, [Out, MarshalAs(UnmanagedType.LPArray)] byte[] buffer, [Out, ComAliasName("SIZE_T*")] out IntPtr read);
-
- void WriteMemory([In] ulong address, [In] uint size, [In, MarshalAs(UnmanagedType.LPArray)] byte[] buffer, [Out, ComAliasName("SIZE_T*")] out IntPtr written);
-
- void ClearCurrentException([In] uint threadID);
-
- void EnableLogMessages([In] int fOnOff);
-
- void ModifyLogSwitch([In, MarshalAs(UnmanagedType.LPWStr)] string pLogSwitchName, [In] int lLevel);
-
- void EnumerateAppDomains([Out, MarshalAs(UnmanagedType.Interface)] out ICorDebugAppDomainEnum ppAppDomains);
-
- void GetObject([Out, MarshalAs(UnmanagedType.Interface)] out ICorDebugValue ppObject);
-
- void ThreadForFiberCookie([In] uint fiberCookie, [Out, MarshalAs(UnmanagedType.Interface)] out ICorDebugThread ppThread);
-
- void GetHelperThreadID([Out] out uint pThreadID);
- }
-
- [ComImport, Guid("AD1B3588-0EF0-4744-A496-AA09A9F80371"), InterfaceType(1), ComConversionLoss]
- public interface ICorDebugProcess2
- {
-
- void GetThreadForTaskID([In] ulong taskid, [Out, MarshalAs(UnmanagedType.Interface)] out ICorDebugThread2 ppThread);
-
- void GetVersion([Out] out _COR_VERSION version);
-
- void SetUnmanagedBreakpoint([In] ulong address, [In] uint bufsize, [Out, MarshalAs(UnmanagedType.LPArray)] byte[] buffer, [Out] out uint bufLen);
-
- void ClearUnmanagedBreakpoint([In] ulong address);
-
- void SetDesiredNGENCompilerFlags([In] uint pdwFlags);
-
- void GetDesiredNGENCompilerFlags([Out] out uint pdwFlags);
-
- void GetReferenceValueFromGCHandle([In] IntPtr handle, [Out, MarshalAs(UnmanagedType.Interface)] out ICorDebugReferenceValue pOutValue);
- }
-
-
- [ComImport, ComConversionLoss, InterfaceType(1), Guid("CC7BCB05-8A68-11D2-983C-0000F808342D")]
- public interface ICorDebugProcessEnum : ICorDebugEnum
- {
-
- new void Skip([In] uint celt);
-
- new void Reset();
-
- new void Clone([Out, MarshalAs(UnmanagedType.Interface)] out ICorDebugEnum ppEnum);
-
- new void GetCount([Out] out uint pcelt);
- [PreserveSig, MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
- int Next([In] uint celt, [Out, MarshalAs(UnmanagedType.LPArray)] ICorDebugProcess[] processes, [Out] out uint pceltFetched);
- }
-
-
-
-
- [ComImport, ComConversionLoss, InterfaceType(1), Guid("3D6F5F63-7538-11D3-8D5B-00104B35E7EF")]
- public interface ICorDebugAppDomain : ICorDebugController
- {
-
- new void Stop([In] uint dwTimeout);
-
- new void Continue([In] int fIsOutOfBand);
-
- new void IsRunning([Out] out int pbRunning);
-
- new void HasQueuedCallbacks([In, MarshalAs(UnmanagedType.Interface)] ICorDebugThread pThread, [Out] out int pbQueued);
-
- new void EnumerateThreads([Out, MarshalAs(UnmanagedType.Interface)] out ICorDebugThreadEnum ppThreads);
-
- new void SetAllThreadsDebugState([In] CorDebugThreadState state, [In, MarshalAs(UnmanagedType.Interface)] ICorDebugThread pExceptThisThread);
-
- new void Detach();
-
- new void Terminate([In] uint exitCode);
-
- new void CanCommitChanges([In] uint cSnapshots, [In, MarshalAs(UnmanagedType.Interface)] ref ICorDebugEditAndContinueSnapshot pSnapshots, [Out, MarshalAs(UnmanagedType.Interface)] out ICorDebugErrorInfoEnum pError);
-
- new void CommitChanges([In] uint cSnapshots, [In, MarshalAs(UnmanagedType.Interface)] ref ICorDebugEditAndContinueSnapshot pSnapshots, [Out, MarshalAs(UnmanagedType.Interface)] out ICorDebugErrorInfoEnum pError);
-
-
-
- void GetProcess([Out, MarshalAs(UnmanagedType.Interface)] out ICorDebugProcess ppProcess);
-
- void EnumerateAssemblies([Out, MarshalAs(UnmanagedType.Interface)] out ICorDebugAssemblyEnum ppAssemblies);
-
- void GetModuleFromMetaDataInterface([In, MarshalAs(UnmanagedType.IUnknown)] object pIMetaData, [Out, MarshalAs(UnmanagedType.Interface)] out ICorDebugModule ppModule);
-
- void EnumerateBreakpoints([Out, MarshalAs(UnmanagedType.Interface)] out ICorDebugBreakpointEnum ppBreakpoints);
-
- void EnumerateSteppers([Out, MarshalAs(UnmanagedType.Interface)] out ICorDebugStepperEnum ppSteppers);
-
- void IsAttached([Out] out int pbAttached);
-
- void GetName([In] uint cchName, [Out] out uint pcchName, [Out, MarshalAs(UnmanagedType.LPWStr)] StringBuilder szName);
-
- void GetObject([Out, MarshalAs(UnmanagedType.Interface)] out ICorDebugValue ppObject);
-
- void Attach();
-
- void GetID([Out] out uint pId);
- }
-
- [ComImport, InterfaceType(1), Guid("096E81D5-ECDA-4202-83F5-C65980A9EF75")]
- public interface ICorDebugAppDomain2
- {
-
- void GetArrayOrPointerType([In] CorElementType elementType, [In] uint nRank, [In, MarshalAs(UnmanagedType.Interface)] ICorDebugType pTypeArg, [Out, MarshalAs(UnmanagedType.Interface)] out ICorDebugType ppType);
-
- void GetFunctionPointerType([In] uint nTypeArgs, [In, MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 0)] ICorDebugType[] ppTypeArgs, [Out, MarshalAs(UnmanagedType.Interface)] out ICorDebugType ppType);
- }
-
- [ComImport, InterfaceType(1), Guid("63CA1B24-4359-4883-BD57-13F815F58744"), ComConversionLoss]
- public interface ICorDebugAppDomainEnum : ICorDebugEnum
- {
-
- new void Skip([In] uint celt);
-
- new void Reset();
-
- new void Clone([Out, MarshalAs(UnmanagedType.Interface)] out ICorDebugEnum ppEnum);
-
- new void GetCount([Out] out uint pcelt);
- [PreserveSig, MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
- int Next([In] uint celt, [Out, MarshalAs(UnmanagedType.LPArray)] ICorDebugAppDomain[] values, [Out] out uint pceltFetched);
- }
-
- #endregion // AppDomain, Process
-
-
- #region Assembly
-
- [ComImport, ComConversionLoss, Guid("DF59507C-D47A-459E-BCE2-6427EAC8FD06"), InterfaceType(1)]
- public interface ICorDebugAssembly
- {
-
- void GetProcess([Out, MarshalAs(UnmanagedType.Interface)] out ICorDebugProcess ppProcess);
-
- void GetAppDomain([Out, MarshalAs(UnmanagedType.Interface)] out ICorDebugAppDomain ppAppDomain);
-
- void EnumerateModules([Out, MarshalAs(UnmanagedType.Interface)] out ICorDebugModuleEnum ppModules);
-
- void GetCodeBase([In] uint cchName, [Out] out uint pcchName, [MarshalAs(UnmanagedType.LPArray)] char[] szName);
-
- void GetName([In] uint cchName, [Out] out uint pcchName, [MarshalAs(UnmanagedType.LPArray)] char[] szName);
- }
-
- [ComImport, InterfaceType(1), Guid("426D1F9E-6DD4-44C8-AEC7-26CDBAF4E398")]
- public interface ICorDebugAssembly2
- {
-
- void IsFullyTrusted([Out] out int pbFullyTrusted);
- }
-
- [ComImport, Guid("4A2A1EC9-85EC-4BFB-9F15-A89FDFE0FE83"), ComConversionLoss, InterfaceType(1)]
- public interface ICorDebugAssemblyEnum : ICorDebugEnum
- {
-
- new void Skip([In] uint celt);
-
- new void Reset();
-
- new void Clone([Out, MarshalAs(UnmanagedType.Interface)] out ICorDebugEnum ppEnum);
-
- new void GetCount([Out] out uint pcelt);
- [PreserveSig, MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
- int Next([In] uint celt, [Out, MarshalAs(UnmanagedType.LPArray)] ICorDebugAssembly[] values, [Out] out uint pceltFetched);
- }
- #endregion Assembly
-
-
- #region Execution Control
-
- #region Breakpoints
- [ComImport, InterfaceType(1), Guid("CC7BCAE8-8A68-11D2-983C-0000F808342D")]
- public interface ICorDebugBreakpoint
- {
-
- void Activate([In] int bActive);
-
- void IsActive([Out] out int pbActive);
- }
-
- [ComImport, Guid("CC7BCB03-8A68-11D2-983C-0000F808342D"), ComConversionLoss, InterfaceType(1)]
- public interface ICorDebugBreakpointEnum : ICorDebugEnum
- {
-
- new void Skip([In] uint celt);
-
- new void Reset();
-
- new void Clone([Out, MarshalAs(UnmanagedType.Interface)] out ICorDebugEnum ppEnum);
-
- new void GetCount([Out] out uint pcelt);
- [PreserveSig, MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
- int Next([In] uint celt, [Out, MarshalAs(UnmanagedType.LPArray)] ICorDebugBreakpoint[] breakpoints, [Out] out uint pceltFetched);
- }
-
- [ComImport, Guid("CC7BCAE9-8A68-11D2-983C-0000F808342D"), InterfaceType(1)]
- public interface ICorDebugFunctionBreakpoint : ICorDebugBreakpoint
- {
-
- new void Activate([In] int bActive);
-
- new void IsActive([Out] out int pbActive);
-
-
- void GetFunction([Out, MarshalAs(UnmanagedType.Interface)] out ICorDebugFunction ppFunction);
-
- void GetOffset([Out] out uint pnOffset);
- }
-
- #endregion Breakpoints
-
- #region Stepping
- [Flags]
- public enum CorDebugUnmappedStop
- {
- // Fields
- STOP_ALL = 0xffff,
- STOP_NONE = 0,
- STOP_PROLOG = 1,
- STOP_EPILOG = 2,
- STOP_NO_MAPPING_INFO = 4,
- STOP_OTHER_UNMAPPED = 8,
- STOP_UNMANAGED = 0x10
- }
-
- public enum CorDebugStepReason
- {
- STEP_NORMAL,
- STEP_RETURN,
- STEP_CALL,
- STEP_EXCEPTION_FILTER,
- STEP_EXCEPTION_HANDLER,
- STEP_INTERCEPT,
- STEP_EXIT
- }
- [Flags]
- public enum CorDebugIntercept
- {
- // Fields
- INTERCEPT_NONE = 0,
- INTERCEPT_ALL = 0xffff,
- INTERCEPT_CLASS_INIT = 1,
- INTERCEPT_EXCEPTION_FILTER = 2,
- INTERCEPT_SECURITY = 4,
- INTERCEPT_CONTEXT_POLICY = 8,
- INTERCEPT_INTERCEPTION = 0x10,
- }
-
- [StructLayout(LayoutKind.Sequential, Pack = 4)]
- public struct COR_DEBUG_STEP_RANGE
- {
- public uint startOffset;
- public uint endOffset;
- }
-
- [ComImport, Guid("CC7BCAEC-8A68-11D2-983C-0000F808342D"), InterfaceType(1)]
- public interface ICorDebugStepper
- {
-
- void IsActive([Out] out int pbActive);
-
- void Deactivate();
-
- void SetInterceptMask([In] CorDebugIntercept mask);
-
- void SetUnmappedStopMask([In] CorDebugUnmappedStop mask);
-
- void Step([In] int bStepIn);
-
- void StepRange([In] int bStepIn, [In, MarshalAs(UnmanagedType.LPArray)] COR_DEBUG_STEP_RANGE[] ranges, [In] uint cRangeCount);
-
- void StepOut();
-
- void SetRangeIL([In] int bIL);
- }
-
- [ComImport, Guid("C5B6E9C3-E7D1-4A8E-873B-7F047F0706F7"), InterfaceType(1)]
- public interface ICorDebugStepper2
- {
-
- void SetJMC([In] int fIsJMCStepper);
- }
-
- [ComImport, ComConversionLoss, Guid("CC7BCB04-8A68-11D2-983C-0000F808342D"), InterfaceType(1)]
- public interface ICorDebugStepperEnum : ICorDebugEnum
- {
-
- new void Skip([In] uint celt);
-
- new void Reset();
-
- new void Clone([Out, MarshalAs(UnmanagedType.Interface)] out ICorDebugEnum ppEnum);
-
- new void GetCount([Out] out uint pcelt);
- [PreserveSig, MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
- int Next([In] uint celt, [Out, MarshalAs(UnmanagedType.LPArray)] ICorDebugStepper[] steppers, [Out] out uint pceltFetched);
- }
-
- #endregion
-
- #endregion Execution Control
-
-
- #region Class, Type
-
- [ComImport, Guid("CC7BCAF5-8A68-11D2-983C-0000F808342D"), InterfaceType(1)]
- public interface ICorDebugClass
- {
-
- void GetModule([Out, MarshalAs(UnmanagedType.Interface)] out ICorDebugModule pModule);
-
- void GetToken([Out] out uint pTypeDef);
-
- void GetStaticFieldValue([In] uint fieldDef, [In, MarshalAs(UnmanagedType.Interface)] ICorDebugFrame pFrame, [Out, MarshalAs(UnmanagedType.Interface)] out ICorDebugValue ppValue);
- }
-
- [ComImport, Guid("B008EA8D-7AB1-43F7-BB20-FBB5A04038AE"), InterfaceType(1)]
- public interface ICorDebugClass2
- {
-
- void GetParameterizedType([In] CorElementType elementType, [In] uint nTypeArgs, [In, MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 1)] ICorDebugType[] ppTypeArgs, [Out, MarshalAs(UnmanagedType.Interface)] out ICorDebugType ppType);
-
- void SetJMCStatus([In] int bIsJustMyCode);
- }
-
- [ComImport, Guid("D613F0BB-ACE1-4C19-BD72-E4C08D5DA7F5"), InterfaceType(1)]
- public interface ICorDebugType
- {
-
- void GetType([Out] out CorElementType ty);
-
-
- void GetClass([Out, MarshalAs(UnmanagedType.Interface)] out ICorDebugClass ppClass);
-
-
- void EnumerateTypeParameters([Out, MarshalAs(UnmanagedType.Interface)] out ICorDebugTypeEnum ppTyParEnum);
-
- void GetFirstTypeParameter([Out, MarshalAs(UnmanagedType.Interface)] out ICorDebugType value);
-
- void GetBase([Out, MarshalAs(UnmanagedType.Interface)] out ICorDebugType pBase);
-
- void GetStaticFieldValue([In] uint fieldDef, [In, MarshalAs(UnmanagedType.Interface)] ICorDebugFrame pFrame, [Out, MarshalAs(UnmanagedType.Interface)] out ICorDebugValue ppValue);
-
- void GetRank([Out] out uint pnRank);
- }
-
- [ComImport, Guid("10F27499-9DF2-43CE-8333-A321D7C99CB4"), InterfaceType(1), ComConversionLoss]
- public interface ICorDebugTypeEnum : ICorDebugEnum
- {
-
- new void Skip([In] uint celt);
-
- new void Reset();
-
- new void Clone([Out, MarshalAs(UnmanagedType.Interface)] out ICorDebugEnum ppEnum);
-
- new void GetCount([Out] out uint pcelt);
- [PreserveSig, MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
- int Next([In] uint celt, [Out, MarshalAs(UnmanagedType.LPArray)] ICorDebugType[] values, [Out] out uint pceltFetched);
- }
-
-
- #endregion // Class, Type
-
-
- #region Code and Function
- [StructLayout(LayoutKind.Sequential, Pack = 4)]
- public struct COR_DEBUG_IL_TO_NATIVE_MAP
- {
- public uint ilOffset;
- public uint nativeStartOffset;
- public uint nativeEndOffset;
- }
-
- [ComImport, InterfaceType(1), Guid("CC7BCAF4-8A68-11D2-983C-0000F808342D"), ComConversionLoss]
- public interface ICorDebugCode
- {
-
- void IsIL([Out] out int pbIL);
-
- void GetFunction([Out, MarshalAs(UnmanagedType.Interface)] out ICorDebugFunction ppFunction);
-
- void GetAddress([Out] out ulong pStart);
-
- void GetSize([Out] out uint pcBytes);
-
- void CreateBreakpoint([In] uint offset, [Out, MarshalAs(UnmanagedType.Interface)] out ICorDebugFunctionBreakpoint ppBreakpoint);
-
-
- void GetCode([In] uint startOffset, [In] uint endOffset, [In] uint cBufferAlloc, [Out, MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 5)] byte[] buffer, [Out] out uint pcBufferSize);
-
- void GetVersionNumber([Out] out uint nVersion);
-
- void GetILToNativeMapping([In] uint cMap, [Out] out uint pcMap, [Out, MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 1)] COR_DEBUG_IL_TO_NATIVE_MAP[] map);
-
- void GetEnCRemapSequencePoints([In] uint cMap, [Out] out uint pcMap, [Out, MarshalAs(UnmanagedType.LPArray)] uint[] offsets);
- }
-
- [StructLayout(LayoutKind.Sequential, Pack = 8)]
- public struct _CodeChunkInfo
- {
- public ulong startAddr;
- public uint length;
- }
-
- [ComImport, ComConversionLoss, Guid("5F696509-452F-4436-A3FE-4D11FE7E2347"), InterfaceType(1)]
- public interface ICorDebugCode2
- {
-
- void GetCodeChunks([In] uint cbufSize, [Out] out uint pcnumChunks, [Out, MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 1)] _CodeChunkInfo[] chunks);
-
- void GetCompilerFlags([Out] out uint pdwFlags);
- }
-
- [ComImport, Guid("55E96461-9645-45E4-A2FF-0367877ABCDE"), InterfaceType(1), ComConversionLoss]
- public interface ICorDebugCodeEnum : ICorDebugEnum
- {
-
- new void Skip([In] uint celt);
-
- new void Reset();
-
- new void Clone([Out, MarshalAs(UnmanagedType.Interface)] out ICorDebugEnum ppEnum);
-
- new void GetCount([Out] out uint pcelt);
- [PreserveSig, MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
- int Next([In] uint celt, [Out, MarshalAs(UnmanagedType.LPArray)] ICorDebugCode[] values, [Out] out uint pceltFetched);
- }
-
- [ComImport, Guid("CC7BCAF3-8A68-11D2-983C-0000F808342D"), InterfaceType(1)]
- public interface ICorDebugFunction
- {
-
- void GetModule([Out, MarshalAs(UnmanagedType.Interface)] out ICorDebugModule ppModule);
-
- void GetClass([Out, MarshalAs(UnmanagedType.Interface)] out ICorDebugClass ppClass);
-
- void GetToken([Out] out uint pMethodDef);
-
- void GetILCode([Out, MarshalAs(UnmanagedType.Interface)] out ICorDebugCode ppCode);
-
- void GetNativeCode([Out, MarshalAs(UnmanagedType.Interface)] out ICorDebugCode ppCode);
-
- void CreateBreakpoint([Out, MarshalAs(UnmanagedType.Interface)] out ICorDebugFunctionBreakpoint ppBreakpoint);
-
- void GetLocalVarSigToken([Out] out uint pmdSig);
-
- void GetCurrentVersionNumber([Out] out uint pnCurrentVersion);
- }
-
- [ComImport, InterfaceType(1), Guid("EF0C490B-94C3-4E4D-B629-DDC134C532D8")]
- public interface ICorDebugFunction2
- {
-
- void SetJMCStatus([In] int bIsJustMyCode);
-
- void GetJMCStatus([Out] out int pbIsJustMyCode);
-
- void EnumerateNativeCode([Out, MarshalAs(UnmanagedType.Interface)] out ICorDebugCodeEnum ppCodeEnum);
-
- void GetVersionNumber([Out] out uint pnVersion);
- }
-
-
- #endregion Code and Function
-
-
- #region Deprecated
- //
- // These interfaces are not used
- //
-
- [ComImport, InterfaceType(1), Guid("CC7BCB00-8A68-11D2-983C-0000F808342D")]
- public interface ICorDebugContext : ICorDebugObjectValue
- {
-
- new void GetType([Out] out CorElementType pType);
-
- new void GetSize([Out] out uint pSize);
-
- new void GetAddress([Out] out ulong pAddress);
-
- new void CreateBreakpoint([Out, MarshalAs(UnmanagedType.Interface)] out ICorDebugValueBreakpoint ppBreakpoint);
-
-
- new void GetClass([Out, MarshalAs(UnmanagedType.Interface)] out ICorDebugClass ppClass);
-
- new void GetFieldValue([In, MarshalAs(UnmanagedType.Interface)] ICorDebugClass pClass, [In] uint fieldDef, [Out, MarshalAs(UnmanagedType.Interface)] out ICorDebugValue ppValue);
-
- new void GetVirtualMethod([In] uint memberRef, [Out, MarshalAs(UnmanagedType.Interface)] out ICorDebugFunction ppFunction);
-
- new void GetContext([Out, MarshalAs(UnmanagedType.Interface)] out ICorDebugContext ppContext);
-
- new void IsValueClass([Out] out int pbIsValueClass);
-
- new void GetManagedCopy([Out, MarshalAs(UnmanagedType.IUnknown)] out object ppObject);
-
- new void SetFromManagedCopy([In, MarshalAs(UnmanagedType.IUnknown)] object pObject);
- }
-
- [ComImport, InterfaceType(1), Guid("6DC3FA01-D7CB-11D2-8A95-0080C792E5D8")]
- public interface ICorDebugEditAndContinueSnapshot
- {
-
- void CopyMetaData([In, MarshalAs(UnmanagedType.Interface)] IStream pIStream, [Out] out Guid pMvid);
-
- void GetMvid([Out] out Guid pMvid);
-
- void GetRoDataRVA([Out] out uint pRoDataRVA);
-
- void GetRwDataRVA([Out] out uint pRwDataRVA);
-
- void SetPEBytes([In, MarshalAs(UnmanagedType.Interface)] IStream pIStream);
-
- void SetILMap([In] uint mdFunction, [In] uint cMapSize, [In] ref COR_IL_MAP map);
-
- void SetPESymbolBytes([In, MarshalAs(UnmanagedType.Interface)] IStream pIStream);
- }
-
- [ComImport, ComConversionLoss, InterfaceType(1), Guid("F0E18809-72B5-11D2-976F-00A0C9B4D50C")]
- public interface ICorDebugErrorInfoEnum : ICorDebugEnum
- {
-
- new void Skip([In] uint celt);
-
- new void Reset();
-
- new void Clone([Out, MarshalAs(UnmanagedType.Interface)] out ICorDebugEnum ppEnum);
-
- new void GetCount([Out] out uint pcelt);
- [PreserveSig, MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
- int Next([In] uint celt, [Out, ComAliasName("ICorDebugEditAndContinueErrorInfo**")] IntPtr errors, [Out] out uint pceltFetched);
- }
- #endregion Deprecated
-
-
-
- [ComImport, InterfaceType(1), Guid("CC7BCB01-8A68-11D2-983C-0000F808342D")]
- public interface ICorDebugEnum
- {
-
- void Skip([In] uint celt);
-
- void Reset();
-
- void Clone([Out, MarshalAs(UnmanagedType.Interface)] out ICorDebugEnum ppEnum);
-
- void GetCount([Out] out uint pcelt);
- }
-
-
-
- #region Function Evaluation
- [ComImport, InterfaceType(1), Guid("CC7BCAF6-8A68-11D2-983C-0000F808342D")]
- public interface ICorDebugEval
- {
-
- void CallFunction([In, MarshalAs(UnmanagedType.Interface)] ICorDebugFunction pFunction, [In] uint nArgs, [In, MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 1)] ICorDebugValue[] ppArgs);
-
- void NewObject([In, MarshalAs(UnmanagedType.Interface)] ICorDebugFunction pConstructor, [In] uint nArgs, [In, MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 1)] ICorDebugValue[] ppArgs);
-
- void NewObjectNoConstructor([In, MarshalAs(UnmanagedType.Interface)] ICorDebugClass pClass);
-
- void NewString([In, MarshalAs(UnmanagedType.LPWStr)] string @string);
-
- void NewArray([In] CorElementType elementType, [In, MarshalAs(UnmanagedType.Interface)] ICorDebugClass pElementClass, [In] uint rank, [In] ref uint dims, [In] ref uint lowBounds);
-
- void IsActive([Out] out int pbActive);
-
- void Abort();
-
- void GetResult([Out, MarshalAs(UnmanagedType.Interface)] out ICorDebugValue ppResult);
-
- void GetThread([Out, MarshalAs(UnmanagedType.Interface)] out ICorDebugThread ppThread);
-
- void CreateValue([In] CorElementType elementType, [In, MarshalAs(UnmanagedType.Interface)] ICorDebugClass pElementClass, [Out, MarshalAs(UnmanagedType.Interface)] out ICorDebugValue ppValue);
- }
-
- [ComImport, Guid("FB0D9CE7-BE66-4683-9D32-A42A04E2FD91"), InterfaceType(1)]
- public interface ICorDebugEval2
- {
-
- void CallParameterizedFunction([In, MarshalAs(UnmanagedType.Interface)] ICorDebugFunction pFunction, [In] uint nTypeArgs, [In, MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 1)] ICorDebugType[] ppTypeArgs, [In] uint nArgs, [In, MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 3)] ICorDebugValue[] ppArgs);
-
- void CreateValueForType([In, MarshalAs(UnmanagedType.Interface)] ICorDebugType pType, [Out, MarshalAs(UnmanagedType.Interface)] out ICorDebugValue ppValue);
-
- void NewParameterizedObject([In, MarshalAs(UnmanagedType.Interface)] ICorDebugFunction pConstructor, [In] uint nTypeArgs, [In, MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 1)] ICorDebugType[] ppTypeArgs, [In] uint nArgs, [In, MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 3)] ICorDebugValue[] ppArgs);
-
- void NewParameterizedObjectNoConstructor([In, MarshalAs(UnmanagedType.Interface)] ICorDebugClass pClass, [In] uint nTypeArgs, [In, MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 1)] ICorDebugType[] ppTypeArgs);
-
- void NewParameterizedArray([In, MarshalAs(UnmanagedType.Interface)] ICorDebugType pElementType, [In] uint rank, [In] ref uint dims, [In] ref uint lowBounds);
-
- void NewStringWithLength([In, MarshalAs(UnmanagedType.LPWStr)] string @string, [In] uint uiLength);
-
- void RudeAbort();
- }
- #endregion Function Evaluation
-
-
-
- #region ICorDebugValue
-
- [ComImport, Guid("CC7BCAF7-8A68-11D2-983C-0000F808342D"), InterfaceType(1)]
- public interface ICorDebugValue
- {
-
- void GetType([Out] out CorElementType pType);
-
- void GetSize([Out] out uint pSize);
-
- void GetAddress([Out] out ulong pAddress);
-
- void CreateBreakpoint([Out, MarshalAs(UnmanagedType.Interface)] out ICorDebugValueBreakpoint ppBreakpoint);
- }
-
- [ComImport, Guid("5E0B54E7-D88A-4626-9420-A691E0A78B49"), InterfaceType(1)]
- public interface ICorDebugValue2
- {
-
- void GetExactType([Out, MarshalAs(UnmanagedType.Interface)] out ICorDebugType ppType);
- }
-
- [ComImport, InterfaceType(1), Guid("CC7BCAF8-8A68-11D2-983C-0000F808342D")]
- public interface ICorDebugGenericValue : ICorDebugValue
- {
-
- new void GetType([Out] out CorElementType pType);
-
- new void GetSize([Out] out uint pSize);
-
- new void GetAddress([Out] out ulong pAddress);
-
- new void CreateBreakpoint([Out, MarshalAs(UnmanagedType.Interface)] out ICorDebugValueBreakpoint ppBreakpoint);
-
-
- void GetValue([Out] IntPtr pTo);
-
- void SetValue([In] IntPtr pFrom);
- }
-
- [ComImport, InterfaceType(1), Guid("CC7BCAF9-8A68-11D2-983C-0000F808342D")]
- public interface ICorDebugReferenceValue : ICorDebugValue
- {
-
- new void GetType([Out] out CorElementType pType);
-
- new void GetSize([Out] out uint pSize);
-
- new void GetAddress([Out] out ulong pAddress);
-
- new void CreateBreakpoint([Out, MarshalAs(UnmanagedType.Interface)] out ICorDebugValueBreakpoint ppBreakpoint);
-
-
- void IsNull([Out] out int pbNull);
-
- void GetValue([Out] out ulong pValue);
-
- void SetValue([In] ulong value);
-
- void Dereference([Out, MarshalAs(UnmanagedType.Interface)] out ICorDebugValue ppValue);
-
- void DereferenceStrong([Out, MarshalAs(UnmanagedType.Interface)] out ICorDebugValue ppValue);
- }
-
-
- public enum CorDebugHandleType
- {
- // Fields
- HANDLE_STRONG = 1,
- HANDLE_WEAK_TRACK_RESURRECTION = 2
- }
-
- [ComImport, Guid("029596E8-276B-46A1-9821-732E96BBB00B"), InterfaceType(1)]
- public interface ICorDebugHandleValue : ICorDebugReferenceValue
- {
-
- new void GetType([Out] out CorElementType pType);
-
- new void GetSize([Out] out uint pSize);
-
- new void GetAddress([Out] out ulong pAddress);
-
- new void CreateBreakpoint([Out, MarshalAs(UnmanagedType.Interface)] out ICorDebugValueBreakpoint ppBreakpoint);
-
-
- new void IsNull([Out] out int pbNull);
-
- new void GetValue([Out] out ulong pValue);
-
- new void SetValue([In] ulong value);
-
- new void Dereference([Out, MarshalAs(UnmanagedType.Interface)] out ICorDebugValue ppValue);
-
- new void DereferenceStrong([Out, MarshalAs(UnmanagedType.Interface)] out ICorDebugValue ppValue);
-
-
- void GetHandleType([Out] out CorDebugHandleType pType);
-
- void Dispose();
- }
-
- [ComImport, Guid("CC7BCAFA-8A68-11D2-983C-0000F808342D"), InterfaceType(1)]
- public interface ICorDebugHeapValue : ICorDebugValue
- {
-
- new void GetType([Out] out CorElementType pType);
-
- new void GetSize([Out] out uint pSize);
-
- new void GetAddress([Out] out ulong pAddress);
-
- new void CreateBreakpoint([Out, MarshalAs(UnmanagedType.Interface)] out ICorDebugValueBreakpoint ppBreakpoint);
-
-
-
- void IsValid([Out] out int pbValid);
-
- void CreateRelocBreakpoint([Out, MarshalAs(UnmanagedType.Interface)] out ICorDebugValueBreakpoint ppBreakpoint);
-
- }
-
- [ComImport, InterfaceType(1), Guid("E3AC4D6C-9CB7-43E6-96CC-B21540E5083C")]
- public interface ICorDebugHeapValue2
- {
-
- void CreateHandle([In] CorDebugHandleType type, [Out, MarshalAs(UnmanagedType.Interface)] out ICorDebugHandleValue ppHandle);
- }
-
- [ComImport, InterfaceType(1), Guid("CC7BCAFC-8A68-11D2-983C-0000F808342D")]
- public interface ICorDebugBoxValue : ICorDebugHeapValue
- {
-
- new void GetType([Out] out CorElementType pType);
-
- new void GetSize([Out] out uint pSize);
-
- new void GetAddress([Out] out ulong pAddress);
-
- new void CreateBreakpoint([Out, MarshalAs(UnmanagedType.Interface)] out ICorDebugValueBreakpoint ppBreakpoint);
-
-
- new void IsValid([Out] out int pbValid);
-
-
- new void CreateRelocBreakpoint([Out, MarshalAs(UnmanagedType.Interface)] out ICorDebugValueBreakpoint ppBreakpoint);
-
-
- void GetObject([Out, MarshalAs(UnmanagedType.Interface)] out ICorDebugObjectValue ppObject);
- }
-
- [ComImport, ComConversionLoss, Guid("0405B0DF-A660-11D2-BD02-0000F80849BD"), InterfaceType(1)]
- public interface ICorDebugArrayValue : ICorDebugHeapValue
- {
-
- new void GetType([Out] out CorElementType pType);
-
- new void GetSize([Out] out uint pSize);
-
- new void GetAddress([Out] out ulong pAddress);
-
- new void CreateBreakpoint([Out, MarshalAs(UnmanagedType.Interface)] out ICorDebugValueBreakpoint ppBreakpoint);
-
-
- new void IsValid([Out] out int pbValid);
-
-
- new void CreateRelocBreakpoint([Out, MarshalAs(UnmanagedType.Interface)] out ICorDebugValueBreakpoint ppBreakpoint);
-
-
- void GetElementType([Out] out CorElementType pType);
-
- void GetRank([Out] out uint pnRank);
-
- void GetCount([Out] out uint pnCount);
-
- void GetDimensions([In] uint cdim, [Out, MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 0)] uint[] dims);
-
- void HasBaseIndicies([Out] out int pbHasBaseIndicies);
-
- void GetBaseIndicies([In] uint cdim, [Out, MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 0)] uint[] indicies);
-
- void GetElement([In] uint cdim, [In, MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 0)] int[] indices, [Out, MarshalAs(UnmanagedType.Interface)] out ICorDebugValue ppValue);
-
- void GetElementAtPosition([In] uint nPosition, [Out, MarshalAs(UnmanagedType.Interface)] out ICorDebugValue ppValue);
- }
-
-
-
-
- [ComImport, InterfaceType(1), Guid("CC7BCAEB-8A68-11D2-983C-0000F808342D")]
- public interface ICorDebugValueBreakpoint : ICorDebugBreakpoint
- {
-
- new void Activate([In] int bActive);
-
- new void IsActive([Out] out int pbActive);
-
-
- void GetValue([Out, MarshalAs(UnmanagedType.Interface)] out ICorDebugValue ppValue);
- }
-
- [ComImport, ComConversionLoss, Guid("CC7BCB0A-8A68-11D2-983C-0000F808342D"), InterfaceType(1)]
- public interface ICorDebugValueEnum : ICorDebugEnum
- {
-
- new void Skip([In] uint celt);
-
- new void Reset();
-
- new void Clone([Out, MarshalAs(UnmanagedType.Interface)] out ICorDebugEnum ppEnum);
-
- new void GetCount([Out] out uint pcelt);
- [PreserveSig, MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
- int Next([In] uint celt, [Out, MarshalAs(UnmanagedType.LPArray)] ICorDebugValue[] values, [Out] out uint pceltFetched);
- }
-
-
- [ComImport, Guid("CC7BCAFD-8A68-11D2-983C-0000F808342D"), ComConversionLoss, InterfaceType(1)]
- public interface ICorDebugStringValue : ICorDebugHeapValue
- {
-
- new void GetType([Out] out CorElementType pType);
-
- new void GetSize([Out] out uint pSize);
-
- new void GetAddress([Out] out ulong pAddress);
-
- new void CreateBreakpoint([Out, MarshalAs(UnmanagedType.Interface)] out ICorDebugValueBreakpoint ppBreakpoint);
-
-
- new void IsValid([Out] out int pbValid);
-
- new void CreateRelocBreakpoint([Out, MarshalAs(UnmanagedType.Interface)] out ICorDebugValueBreakpoint ppBreakpoint);
-
-
- void GetLength([Out] out uint pcchString);
-
- void GetString([In] uint cchString, [Out] out uint pcchString, [Out, MarshalAs(UnmanagedType.LPWStr)] StringBuilder szString);
- }
-
-
-
- [ComImport, InterfaceType(1), Guid("18AD3D6E-B7D2-11D2-BD04-0000F80849BD")]
- public interface ICorDebugObjectValue : ICorDebugValue
- {
-
- new void GetType([Out] out CorElementType pType);
-
- new void GetSize([Out] out uint pSize);
-
- new void GetAddress([Out] out ulong pAddress);
-
- new void CreateBreakpoint([Out, MarshalAs(UnmanagedType.Interface)] out ICorDebugValueBreakpoint ppBreakpoint);
-
-
- void GetClass([Out, MarshalAs(UnmanagedType.Interface)] out ICorDebugClass ppClass);
-
- void GetFieldValue([In, MarshalAs(UnmanagedType.Interface)] ICorDebugClass pClass, [In] uint fieldDef, [Out, MarshalAs(UnmanagedType.Interface)] out ICorDebugValue ppValue);
-
- void GetVirtualMethod([In] uint memberRef, [Out, MarshalAs(UnmanagedType.Interface)] out ICorDebugFunction ppFunction);
-
- void GetContext([Out, MarshalAs(UnmanagedType.Interface)] out ICorDebugContext ppContext);
-
- void IsValueClass([Out] out int pbIsValueClass);
-
- void GetManagedCopy([Out, MarshalAs(UnmanagedType.IUnknown)] out object ppObject);
-
- void SetFromManagedCopy([In, MarshalAs(UnmanagedType.IUnknown)] object pObject);
- }
-
- [ComImport, Guid("49E4A320-4A9B-4ECA-B105-229FB7D5009F"), InterfaceType(1)]
- public interface ICorDebugObjectValue2
- {
-
- void GetVirtualMethodAndType([In] uint memberRef, [Out, MarshalAs(UnmanagedType.Interface)] out ICorDebugFunction ppFunction, [Out, MarshalAs(UnmanagedType.Interface)] out ICorDebugType ppType);
- }
-
- [ComImport, ComConversionLoss, Guid("CC7BCB02-8A68-11D2-983C-0000F808342D"), InterfaceType(1)]
- public interface ICorDebugObjectEnum : ICorDebugEnum
- {
-
- new void Skip([In] uint celt);
-
- new void Reset();
-
- new void Clone([Out, MarshalAs(UnmanagedType.Interface)] out ICorDebugEnum ppEnum);
-
- new void GetCount([Out] out uint pcelt);
- [PreserveSig, MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
- int Next([In] uint celt, [Out, MarshalAs(UnmanagedType.LPArray)] ulong[] objects, [Out] out uint pceltFetched);
- }
-
- #endregion // ICorDebugValue
-
- #region Frames and Chains
-
- #region Chains
- public enum CorDebugChainReason
- {
- // Fields
- CHAIN_CLASS_INIT = 1,
- CHAIN_CONTEXT_POLICY = 8,
- CHAIN_CONTEXT_SWITCH = 0x400,
- CHAIN_DEBUGGER_EVAL = 0x200,
- CHAIN_ENTER_MANAGED = 0x80,
- CHAIN_ENTER_UNMANAGED = 0x100,
- CHAIN_EXCEPTION_FILTER = 2,
- CHAIN_FUNC_EVAL = 0x800,
- CHAIN_INTERCEPTION = 0x10,
- CHAIN_NONE = 0,
- CHAIN_PROCESS_START = 0x20,
- CHAIN_SECURITY = 4,
- CHAIN_THREAD_START = 0x40
- }
-
- [ComImport, Guid("CC7BCAEE-8A68-11D2-983C-0000F808342D"), InterfaceType(1)]
- public interface ICorDebugChain
- {
-
- void GetThread([Out, MarshalAs(UnmanagedType.Interface)] out ICorDebugThread ppThread);
-
- void GetStackRange([Out] out ulong pStart, [Out] out ulong pEnd);
-
- void GetContext([Out, MarshalAs(UnmanagedType.Interface)] out ICorDebugContext ppContext);
-
- void GetCaller([Out, MarshalAs(UnmanagedType.Interface)] out ICorDebugChain ppChain);
-
- void GetCallee([Out, MarshalAs(UnmanagedType.Interface)] out ICorDebugChain ppChain);
-
- void GetPrevious([Out, MarshalAs(UnmanagedType.Interface)] out ICorDebugChain ppChain);
-
- void GetNext([Out, MarshalAs(UnmanagedType.Interface)] out ICorDebugChain ppChain);
-
- void IsManaged([Out] out int pManaged);
-
- void EnumerateFrames([Out, MarshalAs(UnmanagedType.Interface)] out ICorDebugFrameEnum ppFrames);
-
- void GetActiveFrame([Out, MarshalAs(UnmanagedType.Interface)] out ICorDebugFrame ppFrame);
-
- void GetRegisterSet([Out, MarshalAs(UnmanagedType.Interface)] out ICorDebugRegisterSet ppRegisters);
-
- void GetReason([Out] out CorDebugChainReason pReason);
- }
-
- [ComImport, InterfaceType(1), ComConversionLoss, Guid("CC7BCB08-8A68-11D2-983C-0000F808342D")]
- public interface ICorDebugChainEnum : ICorDebugEnum
- {
-
- new void Skip([In] uint celt);
-
- new void Reset();
-
- new void Clone([Out, MarshalAs(UnmanagedType.Interface)] out ICorDebugEnum ppEnum);
-
- new void GetCount([Out] out uint pcelt);
- [PreserveSig, MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
- int Next([In] uint celt, [Out, MarshalAs(UnmanagedType.LPArray)] ICorDebugChain[] chains, [Out] out uint pceltFetched);
- }
- #endregion // end Chains
-
-
-
-
- [ComImport, Guid("CC7BCAEF-8A68-11D2-983C-0000F808342D"), InterfaceType(1)]
- public interface ICorDebugFrame
- {
-
- void GetChain([Out, MarshalAs(UnmanagedType.Interface)] out ICorDebugChain ppChain);
-
- void GetCode([Out, MarshalAs(UnmanagedType.Interface)] out ICorDebugCode ppCode);
-
- void GetFunction([Out, MarshalAs(UnmanagedType.Interface)] out ICorDebugFunction ppFunction);
-
- void GetFunctionToken([Out] out uint pToken);
-
- void GetStackRange([Out] out ulong pStart, [Out] out ulong pEnd);
-
- void GetCaller([Out, MarshalAs(UnmanagedType.Interface)] out ICorDebugFrame ppFrame);
-
- void GetCallee([Out, MarshalAs(UnmanagedType.Interface)] out ICorDebugFrame ppFrame);
-
- void CreateStepper([Out, MarshalAs(UnmanagedType.Interface)] out ICorDebugStepper ppStepper);
- }
-
- [ComImport, ComConversionLoss, Guid("CC7BCB07-8A68-11D2-983C-0000F808342D"), InterfaceType(1)]
- public interface ICorDebugFrameEnum : ICorDebugEnum
- {
-
- new void Skip([In] uint celt);
-
- new void Reset();
-
- new void Clone([Out, MarshalAs(UnmanagedType.Interface)] out ICorDebugEnum ppEnum);
-
- new void GetCount([Out] out uint pcelt);
- [PreserveSig, MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
- int Next([In] uint celt, [Out, MarshalAs(UnmanagedType.LPArray)] ICorDebugFrame[] frames, [Out] out uint pceltFetched);
- }
-
-
- [ComImport, InterfaceType(1), Guid("03E26314-4F76-11D3-88C6-006097945418")]
- public interface ICorDebugNativeFrame : ICorDebugFrame
- {
-
- new void GetChain([Out, MarshalAs(UnmanagedType.Interface)] out ICorDebugChain ppChain);
-
- new void GetCode([Out, MarshalAs(UnmanagedType.Interface)] out ICorDebugCode ppCode);
-
- new void GetFunction([Out, MarshalAs(UnmanagedType.Interface)] out ICorDebugFunction ppFunction);
-
- new void GetFunctionToken([Out] out uint pToken);
-
- new void GetStackRange([Out] out ulong pStart, [Out] out ulong pEnd);
-
- new void GetCaller([Out, MarshalAs(UnmanagedType.Interface)] out ICorDebugFrame ppFrame);
-
- new void GetCallee([Out, MarshalAs(UnmanagedType.Interface)] out ICorDebugFrame ppFrame);
-
- new void CreateStepper([Out, MarshalAs(UnmanagedType.Interface)] out ICorDebugStepper ppStepper);
-
-
-
- void GetIP([Out] out uint pnOffset);
-
- void SetIP([In] uint nOffset);
-
- void GetRegisterSet([Out, MarshalAs(UnmanagedType.Interface)] out ICorDebugRegisterSet ppRegisters);
-
- void GetLocalRegisterValue([In] CorDebugRegister reg, [In] uint cbSigBlob, [In, ComAliasName("Microsoft.Debugging.CorDebug.NativeApi.ULONG_PTR")] uint pvSigBlob, [Out, MarshalAs(UnmanagedType.Interface)] out ICorDebugValue ppValue);
-
- void GetLocalDoubleRegisterValue([In] CorDebugRegister highWordReg, [In] CorDebugRegister lowWordReg, [In] uint cbSigBlob, [In, ComAliasName("Microsoft.Debugging.CorDebug.NativeApi.ULONG_PTR")] uint pvSigBlob, [Out, MarshalAs(UnmanagedType.Interface)] out ICorDebugValue ppValue);
-
- void GetLocalMemoryValue([In] ulong address, [In] uint cbSigBlob, [In, ComAliasName("Microsoft.Debugging.CorDebug.NativeApi.ULONG_PTR")] uint pvSigBlob, [Out, MarshalAs(UnmanagedType.Interface)] out ICorDebugValue ppValue);
-
- void GetLocalRegisterMemoryValue([In] CorDebugRegister highWordReg, [In] ulong lowWordAddress, [In] uint cbSigBlob, [In, ComAliasName("Microsoft.Debugging.CorDebug.NativeApi.ULONG_PTR")] uint pvSigBlob, [Out, MarshalAs(UnmanagedType.Interface)] out ICorDebugValue ppValue);
-
- void GetLocalMemoryRegisterValue([In] ulong highWordAddress, [In] CorDebugRegister lowWordRegister, [In] uint cbSigBlob, [In, ComAliasName("Microsoft.Debugging.CorDebug.NativeApi.ULONG_PTR")] uint pvSigBlob, [Out, MarshalAs(UnmanagedType.Interface)] out ICorDebugValue ppValue);
- [PreserveSig, MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
- int CanSetIP([In] uint nOffset);
- }
-
-
- public enum CorDebugMappingResult
- {
- // Fields
- MAPPING_APPROXIMATE = 0x20,
- MAPPING_EPILOG = 2,
- MAPPING_EXACT = 0x10,
- MAPPING_NO_INFO = 4,
- MAPPING_PROLOG = 1,
- MAPPING_UNMAPPED_ADDRESS = 8
- }
-
-
- [ComImport, InterfaceType(1), Guid("03E26311-4F76-11D3-88C6-006097945418")]
- public interface ICorDebugILFrame : ICorDebugFrame
- {
-
- new void GetChain([Out, MarshalAs(UnmanagedType.Interface)] out ICorDebugChain ppChain);
-
- new void GetCode([Out, MarshalAs(UnmanagedType.Interface)] out ICorDebugCode ppCode);
-
- new void GetFunction([Out, MarshalAs(UnmanagedType.Interface)] out ICorDebugFunction ppFunction);
-
- new void GetFunctionToken([Out] out uint pToken);
-
- new void GetStackRange([Out] out ulong pStart, [Out] out ulong pEnd);
-
- new void GetCaller([Out, MarshalAs(UnmanagedType.Interface)] out ICorDebugFrame ppFrame);
-
- new void GetCallee([Out, MarshalAs(UnmanagedType.Interface)] out ICorDebugFrame ppFrame);
-
-
- new void CreateStepper([Out, MarshalAs(UnmanagedType.Interface)] out ICorDebugStepper ppStepper);
-
-
- void GetIP([Out] out uint pnOffset, [Out] out CorDebugMappingResult pMappingResult);
-
- void SetIP([In] uint nOffset);
-
- void EnumerateLocalVariables([Out, MarshalAs(UnmanagedType.Interface)] out ICorDebugValueEnum ppValueEnum);
-
- void GetLocalVariable([In] uint dwIndex, [Out, MarshalAs(UnmanagedType.Interface)] out ICorDebugValue ppValue);
-
- void EnumerateArguments([Out, MarshalAs(UnmanagedType.Interface)] out ICorDebugValueEnum ppValueEnum);
-
- void GetArgument([In] uint dwIndex, [Out, MarshalAs(UnmanagedType.Interface)] out ICorDebugValue ppValue);
-
- void GetStackDepth([Out] out uint pDepth);
-
- void GetStackValue([In] uint dwIndex, [Out, MarshalAs(UnmanagedType.Interface)] out ICorDebugValue ppValue);
- [PreserveSig, MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
- int CanSetIP([In] uint nOffset);
- }
-
- [ComImport, InterfaceType(1), Guid("5D88A994-6C30-479B-890F-BCEF88B129A5")]
- public interface ICorDebugILFrame2
- {
-
- void RemapFunction([In] uint newILOffset);
-
- void EnumerateTypeParameters([Out, MarshalAs(UnmanagedType.Interface)] out ICorDebugTypeEnum ppTyParEnum);
- }
-
- public enum CorDebugInternalFrameType
- {
- STUBFRAME_NONE,
- STUBFRAME_M2U,
- STUBFRAME_U2M,
- STUBFRAME_APPDOMAIN_TRANSITION,
- STUBFRAME_LIGHTWEIGHT_FUNCTION,
- STUBFRAME_FUNC_EVAL,
- STUBFRAME_INTERNALCALL,
- }
-
- [ComImport, InterfaceType(1), Guid("B92CC7F7-9D2D-45C4-BC2B-621FCC9DFBF4")]
- public interface ICorDebugInternalFrame : ICorDebugFrame
- {
-
- new void GetChain([Out, MarshalAs(UnmanagedType.Interface)] out ICorDebugChain ppChain);
-
- new void GetCode([Out, MarshalAs(UnmanagedType.Interface)] out ICorDebugCode ppCode);
-
- new void GetFunction([Out, MarshalAs(UnmanagedType.Interface)] out ICorDebugFunction ppFunction);
-
- new void GetFunctionToken([Out] out uint pToken);
-
- new void GetStackRange([Out] out ulong pStart, [Out] out ulong pEnd);
-
- new void GetCaller([Out, MarshalAs(UnmanagedType.Interface)] out ICorDebugFrame ppFrame);
-
- new void GetCallee([Out, MarshalAs(UnmanagedType.Interface)] out ICorDebugFrame ppFrame);
-
- new void CreateStepper([Out, MarshalAs(UnmanagedType.Interface)] out ICorDebugStepper ppStepper);
-
- void GetFrameType([Out] out CorDebugInternalFrameType pType);
- }
-
- #endregion // Frames
-
- #region Callbacks
-
- // Unmanaged callback is only used for Interop-debugging to dispatch native debug events.
- [ComImport, Guid("5263E909-8CB5-11D3-BD2F-0000F80849BD"), InterfaceType(1)]
- public interface ICorDebugUnmanagedCallback
- {
- void DebugEvent([In] IntPtr pDebugEvent, [In] int fOutOfBand);
- }
-
- [ComImport, Guid("3D6F5F60-7538-11D3-8D5B-00104B35E7EF"), InterfaceType(1)]
- public interface ICorDebugManagedCallback
- {
-
- void Breakpoint([In, MarshalAs(UnmanagedType.Interface)] ICorDebugAppDomain pAppDomain, [In, MarshalAs(UnmanagedType.Interface)] ICorDebugThread pThread, [In, MarshalAs(UnmanagedType.Interface)] ICorDebugBreakpoint pBreakpoint);
-
-
- void StepComplete([In, MarshalAs(UnmanagedType.Interface)] ICorDebugAppDomain pAppDomain, [In, MarshalAs(UnmanagedType.Interface)] ICorDebugThread pThread, [In, MarshalAs(UnmanagedType.Interface)] ICorDebugStepper pStepper, [In] CorDebugStepReason reason);
-
-
- void Break([In, MarshalAs(UnmanagedType.Interface)] ICorDebugAppDomain pAppDomain, [In, MarshalAs(UnmanagedType.Interface)] ICorDebugThread thread);
-
-
- void Exception([In, MarshalAs(UnmanagedType.Interface)] ICorDebugAppDomain pAppDomain, [In, MarshalAs(UnmanagedType.Interface)] ICorDebugThread pThread, [In] int unhandled);
-
-
- void EvalComplete([In, MarshalAs(UnmanagedType.Interface)] ICorDebugAppDomain pAppDomain, [In, MarshalAs(UnmanagedType.Interface)] ICorDebugThread pThread, [In, MarshalAs(UnmanagedType.Interface)] ICorDebugEval pEval);
-
-
- void EvalException([In, MarshalAs(UnmanagedType.Interface)] ICorDebugAppDomain pAppDomain, [In, MarshalAs(UnmanagedType.Interface)] ICorDebugThread pThread, [In, MarshalAs(UnmanagedType.Interface)] ICorDebugEval pEval);
-
-
- void CreateProcess([In, MarshalAs(UnmanagedType.Interface)] ICorDebugProcess pProcess);
-
-
- void ExitProcess([In, MarshalAs(UnmanagedType.Interface)] ICorDebugProcess pProcess);
-
-
- void CreateThread([In, MarshalAs(UnmanagedType.Interface)] ICorDebugAppDomain pAppDomain, [In, MarshalAs(UnmanagedType.Interface)] ICorDebugThread thread);
-
-
- void ExitThread([In, MarshalAs(UnmanagedType.Interface)] ICorDebugAppDomain pAppDomain, [In, MarshalAs(UnmanagedType.Interface)] ICorDebugThread thread);
-
-
- void LoadModule([In, MarshalAs(UnmanagedType.Interface)] ICorDebugAppDomain pAppDomain, [In, MarshalAs(UnmanagedType.Interface)] ICorDebugModule pModule);
-
-
- void UnloadModule([In, MarshalAs(UnmanagedType.Interface)] ICorDebugAppDomain pAppDomain, [In, MarshalAs(UnmanagedType.Interface)] ICorDebugModule pModule);
-
-
- void LoadClass([In, MarshalAs(UnmanagedType.Interface)] ICorDebugAppDomain pAppDomain, [In, MarshalAs(UnmanagedType.Interface)] ICorDebugClass c);
-
-
- void UnloadClass([In, MarshalAs(UnmanagedType.Interface)] ICorDebugAppDomain pAppDomain, [In, MarshalAs(UnmanagedType.Interface)] ICorDebugClass c);
-
-
- void DebuggerError([In, MarshalAs(UnmanagedType.Interface)] ICorDebugProcess pProcess, [In, MarshalAs(UnmanagedType.Error)] int errorHR, [In] uint errorCode);
-
-
- void LogMessage([In, MarshalAs(UnmanagedType.Interface)] ICorDebugAppDomain pAppDomain, [In, MarshalAs(UnmanagedType.Interface)] ICorDebugThread pThread, [In] int lLevel, [In, MarshalAs(UnmanagedType.LPWStr)] string pLogSwitchName, [In, MarshalAs(UnmanagedType.LPWStr)] string pMessage);
-
-
- void LogSwitch([In, MarshalAs(UnmanagedType.Interface)] ICorDebugAppDomain pAppDomain, [In, MarshalAs(UnmanagedType.Interface)] ICorDebugThread pThread, [In] int lLevel, [In] uint ulReason, [In, MarshalAs(UnmanagedType.LPWStr)] string pLogSwitchName, [In, MarshalAs(UnmanagedType.LPWStr)] string pParentName);
-
-
- void CreateAppDomain([In, MarshalAs(UnmanagedType.Interface)] ICorDebugProcess pProcess, [In, MarshalAs(UnmanagedType.Interface)] ICorDebugAppDomain pAppDomain);
-
-
- void ExitAppDomain([In, MarshalAs(UnmanagedType.Interface)] ICorDebugProcess pProcess, [In, MarshalAs(UnmanagedType.Interface)] ICorDebugAppDomain pAppDomain);
-
-
- void LoadAssembly([In, MarshalAs(UnmanagedType.Interface)] ICorDebugAppDomain pAppDomain, [In, MarshalAs(UnmanagedType.Interface)] ICorDebugAssembly pAssembly);
-
-
- void UnloadAssembly([In, MarshalAs(UnmanagedType.Interface)] ICorDebugAppDomain pAppDomain, [In, MarshalAs(UnmanagedType.Interface)] ICorDebugAssembly pAssembly);
-
-
- void ControlCTrap([In, MarshalAs(UnmanagedType.Interface)] ICorDebugProcess pProcess);
-
-
- void NameChange([In, MarshalAs(UnmanagedType.Interface)] ICorDebugAppDomain pAppDomain, [In, MarshalAs(UnmanagedType.Interface)] ICorDebugThread pThread);
-
-
- void UpdateModuleSymbols([In, MarshalAs(UnmanagedType.Interface)] ICorDebugAppDomain pAppDomain, [In, MarshalAs(UnmanagedType.Interface)] ICorDebugModule pModule, [In, MarshalAs(UnmanagedType.Interface)] IStream pSymbolStream);
-
-
- void EditAndContinueRemap([In, MarshalAs(UnmanagedType.Interface)] ICorDebugAppDomain pAppDomain, [In, MarshalAs(UnmanagedType.Interface)] ICorDebugThread pThread, [In, MarshalAs(UnmanagedType.Interface)] ICorDebugFunction pFunction, [In] int fAccurate);
-
-
- void BreakpointSetError([In, MarshalAs(UnmanagedType.Interface)] ICorDebugAppDomain pAppDomain, [In, MarshalAs(UnmanagedType.Interface)] ICorDebugThread pThread, [In, MarshalAs(UnmanagedType.Interface)] ICorDebugBreakpoint pBreakpoint, [In] uint dwError);
- }
-
- [ComImport, Guid("250E5EEA-DB5C-4C76-B6F3-8C46F12E3203"), InterfaceType(1)]
- public interface ICorDebugManagedCallback2
- {
-
- void FunctionRemapOpportunity([In, MarshalAs(UnmanagedType.Interface)] ICorDebugAppDomain pAppDomain, [In, MarshalAs(UnmanagedType.Interface)] ICorDebugThread pThread, [In, MarshalAs(UnmanagedType.Interface)] ICorDebugFunction pOldFunction, [In, MarshalAs(UnmanagedType.Interface)] ICorDebugFunction pNewFunction, [In] uint oldILOffset);
-
-
- void CreateConnection([In, MarshalAs(UnmanagedType.Interface)] ICorDebugProcess pProcess, [In] uint dwConnectionId, [In] ref ushort pConnName);
-
-
- void ChangeConnection([In, MarshalAs(UnmanagedType.Interface)] ICorDebugProcess pProcess, [In] uint dwConnectionId);
-
-
- void DestroyConnection([In, MarshalAs(UnmanagedType.Interface)] ICorDebugProcess pProcess, [In] uint dwConnectionId);
-
-
- void Exception([In, MarshalAs(UnmanagedType.Interface)] ICorDebugAppDomain pAppDomain, [In, MarshalAs(UnmanagedType.Interface)] ICorDebugThread pThread, [In, MarshalAs(UnmanagedType.Interface)] ICorDebugFrame pFrame, [In] uint nOffset, [In] CorDebugExceptionCallbackType dwEventType, [In] uint dwFlags);
-
-
- void ExceptionUnwind([In, MarshalAs(UnmanagedType.Interface)] ICorDebugAppDomain pAppDomain, [In, MarshalAs(UnmanagedType.Interface)] ICorDebugThread pThread, [In] CorDebugExceptionUnwindCallbackType dwEventType, [In] uint dwFlags);
-
-
- void FunctionRemapComplete([In, MarshalAs(UnmanagedType.Interface)] ICorDebugAppDomain pAppDomain, [In, MarshalAs(UnmanagedType.Interface)] ICorDebugThread pThread, [In, MarshalAs(UnmanagedType.Interface)] ICorDebugFunction pFunction);
-
-
- void MDANotification([In, MarshalAs(UnmanagedType.Interface)] ICorDebugController pController, [In, MarshalAs(UnmanagedType.Interface)] ICorDebugThread pThread, [In, MarshalAs(UnmanagedType.Interface)] ICorDebugMDA pMDA);
- }
-#endregion // Callbacks
-
- #region Module
- [ComImport, ComConversionLoss, InterfaceType(1), Guid("DBA2D8C1-E5C5-4069-8C13-10A7C6ABF43D")]
- public interface ICorDebugModule
- {
-
- void GetProcess([Out, MarshalAs(UnmanagedType.Interface)] out ICorDebugProcess ppProcess);
-
- void GetBaseAddress([Out] out ulong pAddress);
-
- void GetAssembly([Out, MarshalAs(UnmanagedType.Interface)] out ICorDebugAssembly ppAssembly);
-
- void GetName([In] uint cchName, [Out] out uint pcchName, [MarshalAs(UnmanagedType.LPArray)] char[] szName);
-
- void EnableJITDebugging([In] int bTrackJITInfo, [In] int bAllowJitOpts);
-
- void EnableClassLoadCallbacks([In] int bClassLoadCallbacks);
-
- void GetFunctionFromToken([In] uint methodDef, [Out, MarshalAs(UnmanagedType.Interface)] out ICorDebugFunction ppFunction);
-
- void GetFunctionFromRVA([In] ulong rva, [Out, MarshalAs(UnmanagedType.Interface)] out ICorDebugFunction ppFunction);
-
- void GetClassFromToken([In] uint typeDef, [Out, MarshalAs(UnmanagedType.Interface)] out ICorDebugClass ppClass);
-
- void CreateBreakpoint([Out, MarshalAs(UnmanagedType.Interface)] out ICorDebugModuleBreakpoint ppBreakpoint);
-
- void GetEditAndContinueSnapshot([Out, MarshalAs(UnmanagedType.Interface)] out ICorDebugEditAndContinueSnapshot ppEditAndContinueSnapshot);
-
-
-
- void GetMetaDataInterface([In, ComAliasName("REFIID")] ref Guid riid, [Out, MarshalAs(UnmanagedType.Interface)] out IMetadataImport ppObj);
-
-
- void GetToken([Out] out uint pToken);
-
- void IsDynamic([Out] out int pDynamic);
-
- void GetGlobalVariableValue([In] uint fieldDef, [Out, MarshalAs(UnmanagedType.Interface)] out ICorDebugValue ppValue);
-
- void GetSize([Out] out uint pcBytes);
-
- void IsInMemory([Out] out int pInMemory);
- }
-
- [ComImport, InterfaceType(1), Guid("7FCC5FB5-49C0-41DE-9938-3B88B5B9ADD7")]
- public interface ICorDebugModule2
- {
-
- void SetJMCStatus([In] int bIsJustMyCode, [In] uint cTokens, [In] ref uint pTokens);
-
- void ApplyChanges([In] uint cbMetadata, [In, MarshalAs(UnmanagedType.LPArray)] byte[] pbMetadata, [In] uint cbIL, [In, MarshalAs(UnmanagedType.LPArray)] byte[] pbIL);
- [PreserveSig, MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
- int SetJITCompilerFlags([In] uint dwFlags);
-
- void GetJITCompilerFlags([Out] out uint pdwFlags);
-
- void ResolveAssembly([In] uint tkAssemblyRef, [Out, MarshalAs(UnmanagedType.Interface)] out ICorDebugAssembly ppAssembly);
- }
-
- [ComImport, Guid("CC7BCAEA-8A68-11D2-983C-0000F808342D"), InterfaceType(1)]
- public interface ICorDebugModuleBreakpoint : ICorDebugBreakpoint
- {
-
- new void Activate([In] int bActive);
-
- new void IsActive([Out] out int pbActive);
-
-
- void GetModule([Out, MarshalAs(UnmanagedType.Interface)] out ICorDebugModule ppModule);
- }
-
- [ComImport, InterfaceType(1), ComConversionLoss, Guid("CC7BCB09-8A68-11D2-983C-0000F808342D")]
- public interface ICorDebugModuleEnum : ICorDebugEnum
- {
-
- new void Skip([In] uint celt);
-
- new void Reset();
-
- new void Clone([Out, MarshalAs(UnmanagedType.Interface)] out ICorDebugEnum ppEnum);
-
- new void GetCount([Out] out uint pcelt);
- [PreserveSig, MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
- int Next([In] uint celt, [Out, MarshalAs(UnmanagedType.LPArray)] ICorDebugModule[] modules, [Out] out uint pceltFetched);
- }
-
-
- #endregion Module
-
-
-
-
- #region MDA
- [CLSCompliant(true)]
- [Flags]
- public enum CorDebugMDAFlags
- {
- // Fields
- None = 0,
- MDA_FLAG_SLIP = 2
- }
-
- [ComImport, Guid("CC726F2F-1DB7-459B-B0EC-05F01D841B42"), InterfaceType(1)]
- public interface ICorDebugMDA
- {
-
- void GetName([In] uint cchName, [Out] out uint pcchName, [MarshalAs(UnmanagedType.LPArray)] char[] szName);
-
-
- void GetDescription([In] uint cchName, [Out] out uint pcchName, [MarshalAs(UnmanagedType.LPArray)] char[] szName);
-
-
- void GetXML([In] uint cchName, [Out] out uint pcchName, [MarshalAs(UnmanagedType.LPArray)] char[] szName);
-
-
- void GetFlags([Out] out CorDebugMDAFlags pFlags);
-
-
- void GetOSThreadId([Out] out uint pOsTid);
- }
- #endregion // MDA
-
- [ComImport, Guid("CC7BCB0B-8A68-11D2-983C-0000F808342D"), ComConversionLoss, InterfaceType(1)]
- public interface ICorDebugRegisterSet
- {
-
- void GetRegistersAvailable([Out] out ulong pAvailable);
-
-
- void GetRegisters([In] ulong mask, [In] uint regCount, [Out, MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 2)] ulong[] regBuffer);
-
-
- void SetRegisters([In] ulong mask, [In] uint regCount, [In, MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 2)] ulong[] regBuffer);
-
-
- void GetThreadContext([In] uint contextSize, [In, ComAliasName("BYTE*")] IntPtr context);
-
-
- void SetThreadContext([In] uint contextSize, [In, ComAliasName("BYTE*")] IntPtr context);
- }
-
- #region Threads
- [ComImport, Guid("938C6D66-7FB6-4F69-B389-425B8987329B"), InterfaceType(1)]
- public interface ICorDebugThread
- {
-
- void GetProcess([Out, MarshalAs(UnmanagedType.Interface)] out ICorDebugProcess ppProcess);
-
- void GetID([Out] out uint pdwThreadId);
-
- void GetHandle([Out] out IntPtr phThreadHandle);
-
- void GetAppDomain([Out, MarshalAs(UnmanagedType.Interface)] out ICorDebugAppDomain ppAppDomain);
-
- void SetDebugState([In] CorDebugThreadState state);
-
- void GetDebugState([Out] out CorDebugThreadState pState);
-
- void GetUserState([Out] out CorDebugUserState pState);
-
- void GetCurrentException([Out, MarshalAs(UnmanagedType.Interface)] out ICorDebugValue ppExceptionObject);
-
- void ClearCurrentException();
-
- void CreateStepper([Out, MarshalAs(UnmanagedType.Interface)] out ICorDebugStepper ppStepper);
-
- void EnumerateChains([Out, MarshalAs(UnmanagedType.Interface)] out ICorDebugChainEnum ppChains);
-
- void GetActiveChain([Out, MarshalAs(UnmanagedType.Interface)] out ICorDebugChain ppChain);
-
- void GetActiveFrame([Out, MarshalAs(UnmanagedType.Interface)] out ICorDebugFrame ppFrame);
-
- void GetRegisterSet([Out, MarshalAs(UnmanagedType.Interface)] out ICorDebugRegisterSet ppRegisters);
-
- void CreateEval([Out, MarshalAs(UnmanagedType.Interface)] out ICorDebugEval ppEval);
-
- void GetObject([Out, MarshalAs(UnmanagedType.Interface)] out ICorDebugValue ppObject);
- }
-
- [StructLayout(LayoutKind.Sequential, Pack = 4)]
- public struct COR_ACTIVE_FUNCTION
- {
- public ICorDebugAppDomain pAppDomain;
- public ICorDebugModule pModule;
- public ICorDebugFunction2 pFunction;
- public uint ilOffset;
- public uint Flags;
- }
-
-
- [ComImport, Guid("2BD956D9-7B07-4BEF-8A98-12AA862417C5"), ComConversionLoss, InterfaceType(1)]
- public interface ICorDebugThread2
- {
-
- void GetActiveFunctions([In] uint cFunctions, [Out] out uint pcFunctions, [Out, MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 1)] COR_ACTIVE_FUNCTION[] pFunctions);
-
- void GetConnectionID([Out] out uint pdwConnectionId);
-
- void GetTaskID([Out] out ulong pTaskId);
-
- void GetVolatileOSThreadID([Out] out uint pdwTid);
-
- void InterceptCurrentException([In, MarshalAs(UnmanagedType.Interface)] ICorDebugFrame pFrame);
- }
-
-
- [ComImport, InterfaceType(1), ComConversionLoss, Guid("CC7BCB06-8A68-11D2-983C-0000F808342D")]
- public interface ICorDebugThreadEnum : ICorDebugEnum
- {
-
- new void Skip([In] uint celt);
-
- new void Reset();
-
- new void Clone([Out, MarshalAs(UnmanagedType.Interface)] out ICorDebugEnum ppEnum);
-
- new void GetCount([Out] out uint pcelt);
- [PreserveSig, MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
- int Next([In] uint celt, [Out, MarshalAs(UnmanagedType.LPArray)] ICorDebugThread[] threads, [Out] out uint pceltFetched);
- }
-
- #endregion Threads
-
-}
-
-
diff --git a/main/src/addins/MonoDevelop.Debugger.Win32/CorApi/ICorPublishWrappers.cs b/main/src/addins/MonoDevelop.Debugger.Win32/CorApi/ICorPublishWrappers.cs deleted file mode 100644 index e61539b591..0000000000 --- a/main/src/addins/MonoDevelop.Debugger.Win32/CorApi/ICorPublishWrappers.cs +++ /dev/null @@ -1,123 +0,0 @@ -//---------------------------------------------------------------------
-// This file is part of the CLR Managed Debugger (mdbg) Sample.
-//
-// Copyright (C) Microsoft Corporation. All rights reserved.
-//
-// Imports ICorPublish interface from CorPublish.idl into managed code
-//---------------------------------------------------------------------
-
-using System;
-using System.Text;
-using System.Runtime.CompilerServices;
-using System.Runtime.InteropServices;
-
-using IStream=System.Runtime.InteropServices.ComTypes.IStream;
-using Microsoft.Win32.SafeHandles;
-
-namespace Microsoft.Samples.Debugging.CorPublish.NativeApi
-{
- public enum __MIDL___MIDL_itf_corpub_0000_0001
- {
- // Fields
- COR_PUB_MANAGEDONLY = 1
- }
-
- public enum COR_PUB_ENUMPROCESS
- {
- // Fields
- COR_PUB_MANAGEDONLY = 1
- }
-
- [ComImport, Guid("9613A0E7-5A68-11D3-8F84-00A0C9B4D50C"), CoClass(typeof(CorpubPublishClass))]
- public interface CorpubPublish : ICorPublish
- {
- }
-
- [ComImport, TypeLibType(2), Guid("047a9a40-657e-11d3-8d5b-00104b35e7ef"), ClassInterface(ClassInterfaceType.None)]
- public class CorpubPublishClass : ICorPublish, CorpubPublish
- {
- [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
- public virtual extern void EnumProcesses(
- [In, ComAliasName("CorpubProcessLib.COR_PUB_ENUMPROCESS")] COR_PUB_ENUMPROCESS Type,
- [Out, MarshalAs(UnmanagedType.Interface)] out ICorPublishProcessEnum ppIEnum);
-
- [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
- public virtual extern void GetProcess([In] uint pid, [Out, MarshalAs(UnmanagedType.Interface)] out ICorPublishProcess ppProcess);
- }
-
- [ComImport, Guid("9613A0E7-5A68-11D3-8F84-00A0C9B4D50C"), InterfaceType(1)]
- public interface ICorPublish
- {
-
- void EnumProcesses([In, ComAliasName("CorpubProcessLib.COR_PUB_ENUMPROCESS")] COR_PUB_ENUMPROCESS Type, [Out, MarshalAs(UnmanagedType.Interface)] out ICorPublishProcessEnum ppIEnum);
-
- void GetProcess([In] uint pid, [Out, MarshalAs(UnmanagedType.Interface)] out ICorPublishProcess ppProcess);
- }
-
- [ComImport, Guid("D6315C8F-5A6A-11D3-8F84-00A0C9B4D50C"), InterfaceType(1)]
- public interface ICorPublishAppDomain
- {
-
- void GetID([Out] out uint puId);
-
- void GetName([In] uint cchName, [Out] out uint pcchName, [Out, MarshalAs(UnmanagedType.LPWStr)] StringBuilder szName);
- }
-
- [ComImport, InterfaceType(1), Guid("9F0C98F5-5A6A-11D3-8F84-00A0C9B4D50C")]
- public interface ICorPublishAppDomainEnum : ICorPublishEnum
- {
-
- new void Skip([In] uint celt);
-
- new void Reset();
-
- new void Clone([Out, MarshalAs(UnmanagedType.Interface)] out ICorPublishEnum ppEnum);
-
- new void GetCount([Out] out uint pcelt);
- [PreserveSig, MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
- int Next([In] uint celt, [Out, MarshalAs(UnmanagedType.Interface)] out ICorPublishAppDomain objects, [Out] out uint pceltFetched);
- }
-
- [ComImport, InterfaceType(1), Guid("C0B22967-5A69-11D3-8F84-00A0C9B4D50C")]
- public interface ICorPublishEnum
- {
-
- void Skip([In] uint celt);
-
- void Reset();
-
- void Clone([Out, MarshalAs(UnmanagedType.Interface)] out ICorPublishEnum ppEnum);
-
- void GetCount([Out] out uint pcelt);
- }
-
- [ComImport, InterfaceType(1), Guid("18D87AF1-5A6A-11D3-8F84-00A0C9B4D50C")]
- public interface ICorPublishProcess
- {
-
- void IsManaged([Out] out int pbManaged);
-
- void EnumAppDomains([Out, MarshalAs(UnmanagedType.Interface)] out ICorPublishAppDomainEnum ppEnum);
-
- void GetProcessID([Out] out uint pid);
-
- void GetDisplayName([In] uint cchName, [Out] out uint pcchName, [Out, MarshalAs(UnmanagedType.LPWStr)] StringBuilder szName);
- }
-
- [ComImport, InterfaceType(1), Guid("A37FBD41-5A69-11D3-8F84-00A0C9B4D50C")]
- public interface ICorPublishProcessEnum : ICorPublishEnum
- {
-
- new void Skip([In] uint celt);
-
- new void Reset();
-
- new void Clone([Out, MarshalAs(UnmanagedType.Interface)] out ICorPublishEnum ppEnum);
-
- new void GetCount([Out] out uint pcelt);
- [PreserveSig, MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
- int Next([In] uint celt, [Out, MarshalAs(UnmanagedType.Interface)] out ICorPublishProcess objects, [Out] out uint pceltFetched);
- }
-}
-
-
diff --git a/main/src/addins/MonoDevelop.Debugger.Win32/CorApi/IMetadataImport.cs b/main/src/addins/MonoDevelop.Debugger.Win32/CorApi/IMetadataImport.cs deleted file mode 100644 index 463d899ee9..0000000000 --- a/main/src/addins/MonoDevelop.Debugger.Win32/CorApi/IMetadataImport.cs +++ /dev/null @@ -1,1422 +0,0 @@ -//---------------------------------------------------------------------
-// This file is part of the CLR Managed Debugger (mdbg) Sample.
-//
-// Copyright (C) Microsoft Corporation. All rights reserved.
-//---------------------------------------------------------------------
-using System;
-using System.Reflection;
-using System.Text;
-using System.Runtime.InteropServices;
-using System.Globalization;
-using System.Diagnostics;
-
-// NOTE: For MDBG_FAKE_COM we compile this file by itself into a .dll, disassemble to IL, and then strip
-// the assembly header out and include the il along with the others in the interop assembly
-namespace Microsoft.Samples.Debugging.CorMetadata.NativeApi
-{
-
- // GUID Copied from Cor.h
- [Guid("7DAC8207-D3AE-4c75-9B67-92801A497D44"),
- InterfaceType(ComInterfaceType.InterfaceIsIUnknown)
- ] // IID_IMetadataImport from cor.h
-
- // This should be a private interface, but
- // we cannot do that becuase we are then getting an exception
- // "The specified type must be visible from COM." @ CorMetadataImport::GetRawInterface
- [CLSCompliant(false)]
- public interface IMetadataImport
- {
- //STDMETHOD_(void, CloseEnum)(HCORENUM hEnum) PURE;
- [PreserveSig] void CloseEnum(IntPtr hEnum);
-
- //STDMETHOD(CountEnum)(HCORENUM hEnum, ULONG *pulCount) PURE;
- void CountEnum(IntPtr hEnum, [ComAliasName("ULONG*")] out int pulCount);
-
- //STDMETHOD(ResetEnum)(HCORENUM hEnum, ULONG ulPos) PURE;
- void ResetEnum(IntPtr hEnum, int ulPos);
-
- //STDMETHOD(EnumTypeDefs)(HCORENUM *phEnum, mdTypeDef rTypeDefs[],ULONG cMax, ULONG *pcTypeDefs) PURE;
- //void EnumTypeDefs(out IntPtr phEnum,int[] rTypeDefs,uint cMax, out uint pcTypeDefs);
- void EnumTypeDefs(
- ref IntPtr phEnum,
- [ComAliasName("mdTypeDef*")] out int rTypeDefs,
- uint cMax /*must be 1*/,
- [ComAliasName("ULONG*")] out uint pcTypeDefs);
-
- //STDMETHOD(EnumInterfaceImpls)(HCORENUM *phEnum, mdTypeDef td, mdInterfaceImpl rImpls[], ULONG cMax, ULONG* pcImpls) PURE;
- void EnumInterfaceImpls(
- ref IntPtr phEnum,
- int td,
- [ComAliasName("mdInterfaceImpl*")] out int rImpls,
- uint cMax /*must be 1*/,
- [ComAliasName("ULONG*")] out uint pcImpls);
-#if !MDBG_FAKE_COM
- //STDMETHOD(EnumTypeRefs)(HCORENUM *phEnum, mdTypeRef rTypeRefs[], ULONG cMax, ULONG* pcTypeRefs) PURE;
- void EnumTypeRefs_();
-#endif
- // STDMETHOD(FindTypeDefByName)( // S_OK or error.
- // LPCWSTR szTypeDef, // [IN] Name of the Type.
- // mdToken tkEnclosingClass, // [IN] TypeDef/TypeRef for Enclosing class.
- // mdTypeDef *ptd) PURE; // [OUT] Put the TypeDef token here.
- void FindTypeDefByName(
- [In, MarshalAs(UnmanagedType.LPWStr)] string szTypeDef,
- [In] int tkEnclosingClass,
- [ComAliasName("mdTypeDef*")] [Out] out int token
- );
-
- // STDMETHOD(GetScopeProps)( // S_OK or error.
- // LPWSTR szName, // [OUT] Put the name here.
- // ULONG cchName, // [IN] Size of name buffer in wide chars.
- // ULONG *pchName, // [OUT] Put size of name (wide chars) here.
- // GUID *pmvid) PURE; // [OUT, OPTIONAL] Put MVID here.
- void GetScopeProps(
- [Out,MarshalAs(UnmanagedType.LPWStr)] StringBuilder szName,
- [In] int cchName,
- [ComAliasName("ULONG*")] out int pchName,
- out Guid mvid
- );
-#if !MDBG_FAKE_COM
- // STDMETHOD(GetModuleFromScope)( // S_OK.
- // mdModule *pmd) PURE; // [OUT] Put mdModule token here.
- void GetModuleFromScope_();
-#endif
- // STDMETHOD(GetTypeDefProps)( // S_OK or error.
- // mdTypeDef td, // [IN] TypeDef token for inquiry.
- // LPWSTR szTypeDef, // [OUT] Put name here.
- // ULONG cchTypeDef, // [IN] size of name buffer in wide chars.
- // ULONG *pchTypeDef, // [OUT] put size of name (wide chars) here.
- // DWORD *pdwTypeDefFlags, // [OUT] Put flags here.
- // mdToken *ptkExtends) PURE; // [OUT] Put base class TypeDef/TypeRef here.
- void GetTypeDefProps([In] int td,
- [Out, MarshalAs( UnmanagedType.LPWStr)] StringBuilder szTypeDef,
- [In] int cchTypeDef,
- [ComAliasName("ULONG*")] [Out] out int pchTypeDef,
- [Out, MarshalAs(UnmanagedType.U4)] out System.Reflection.TypeAttributes pdwTypeDefFlags,
- [ComAliasName("mdToken*")] [Out] out int ptkExtends
- );
-#if !MDBG_FAKE_COM
- // STDMETHOD(GetInterfaceImplProps)( // S_OK or error.
- // mdInterfaceImpl iiImpl, // [IN] InterfaceImpl token.
- // mdTypeDef *pClass, // [OUT] Put implementing class token here.
- // mdToken *ptkIface) PURE; // [OUT] Put implemented interface token here.
- void GetInterfaceImplProps (
- [In] int iiImpl,
- [Out] out int pClass,
- [Out] out int ptkIface);
-#endif
- // STDMETHOD(GetTypeRefProps)( // S_OK or error.
- // mdTypeRef tr, // [IN] TypeRef token.
- // mdToken *ptkResolutionScope, // [OUT] Resolution scope, ModuleRef or AssemblyRef.
- // LPWSTR szName, // [OUT] Name of the TypeRef.
- // ULONG cchName, // [IN] Size of buffer.
- // ULONG *pchName) PURE; // [OUT] Size of Name.
- void GetTypeRefProps(
- int tr,
- [ComAliasName("mdToken*")] [Out] out int ptkResolutionScope,
- [Out, MarshalAs(UnmanagedType.LPWStr)] StringBuilder szName,
- [In] int cchName,
- [ComAliasName("ULONG*")] out int pchName
- );
-#if !MDBG_FAKE_COM
- // STDMETHOD(ResolveTypeRef)(mdTypeRef tr, REFIID riid, IUnknown **ppIScope, mdTypeDef *ptd) PURE;
- void ResolveTypeRef_();
-
- // STDMETHOD(EnumMembers)( // S_OK, S_FALSE, or error.
- // HCORENUM *phEnum, // [IN|OUT] Pointer to the enum.
- // mdTypeDef cl, // [IN] TypeDef to scope the enumeration.
- // mdToken rMembers[], // [OUT] Put MemberDefs here.
- // ULONG cMax, // [IN] Max MemberDefs to put.
- // ULONG *pcTokens) PURE; // [OUT] Put # put here.
- void EnumMembers_();
-
- // STDMETHOD(EnumMembersWithName)( // S_OK, S_FALSE, or error.
- // HCORENUM *phEnum, // [IN|OUT] Pointer to the enum.
- // mdTypeDef cl, // [IN] TypeDef to scope the enumeration.
- // LPCWSTR szName, // [IN] Limit results to those with this name.
- // mdToken rMembers[], // [OUT] Put MemberDefs here.
- // ULONG cMax, // [IN] Max MemberDefs to put.
- // ULONG *pcTokens) PURE; // [OUT] Put # put here.
- void EnumMembersWithName_();
-#endif
- // STDMETHOD(EnumMethods)( // S_OK, S_FALSE, or error.
- // HCORENUM *phEnum, // [IN|OUT] Pointer to the enum.
- // mdTypeDef cl, // [IN] TypeDef to scope the enumeration.
- // mdMethodDef rMethods[], // [OUT] Put MethodDefs here.
- // ULONG cMax, // [IN] Max MethodDefs to put.
- // ULONG *pcTokens) PURE; // [OUT] Put # put here.
- void EnumMethods(ref IntPtr phEnum,
- int cl,
- [ComAliasName("mdMethodDef*")] out int mdMethodDef,
- int cMax, /*must be 1*/
- [ComAliasName("ULONG*")] out int pcTokens
- );
-#if !MDBG_FAKE_COM
- // STDMETHOD(EnumMethodsWithName)( // S_OK, S_FALSE, or error.
- // HCORENUM *phEnum, // [IN|OUT] Pointer to the enum.
- // mdTypeDef cl, // [IN] TypeDef to scope the enumeration.
- // LPCWSTR szName, // [IN] Limit results to those with this name.
- // mdMethodDef rMethods[], // [OU] Put MethodDefs here.
- // ULONG cMax, // [IN] Max MethodDefs to put.
- // ULONG *pcTokens) PURE; // [OUT] Put # put here.
- void EnumMethodsWithName_();
-#endif
- // STDMETHOD(EnumFields)( // S_OK, S_FALSE, or error.
- // HCORENUM *phEnum, // [IN|OUT] Pointer to the enum.
- // mdTypeDef cl, // [IN] TypeDef to scope the enumeration.
- // mdFieldDef rFields[], // [OUT] Put FieldDefs here.
- // ULONG cMax, // [IN] Max FieldDefs to put.
- // ULONG *pcTokens) PURE; // [OUT] Put # put here.
- //void EnumFields_();
- /*[PreserveSig]*/
- void EnumFields(ref IntPtr phEnum,
- int cl,
- [ComAliasName("mdFieldDef*")] out int mdFieldDef,
- int cMax /*must be 1*/,
- [ComAliasName("ULONG*")] out uint pcTokens);
-
-#if !MDBG_FAKE_COM
- // STDMETHOD(EnumFieldsWithName)( // S_OK, S_FALSE, or error.
- // HCORENUM *phEnum, // [IN|OUT] Pointer to the enum.
- // mdTypeDef cl, // [IN] TypeDef to scope the enumeration.
- // LPCWSTR szName, // [IN] Limit results to those with this name.
- // mdFieldDef rFields[], // [OUT] Put MemberDefs here.
- // ULONG cMax, // [IN] Max MemberDefs to put.
- // ULONG *pcTokens) PURE; // [OUT] Put # put here.
- void EnumFieldsWithName_();
-#endif
- // STDMETHOD(EnumParams)( // S_OK, S_FALSE, or error.
- // HCORENUM *phEnum, // [IN|OUT] Pointer to the enum.
- // mdMethodDef mb, // [IN] MethodDef to scope the enumeration.
- // mdParamDef rParams[], // [OUT] Put ParamDefs here.
- // ULONG cMax, // [IN] Max ParamDefs to put.
- // ULONG *pcTokens) PURE; // [OUT] Put # put here.
- void EnumParams(ref IntPtr phEnum,
- int mdMethodDef,
- [ComAliasName("mdParamDef*")] out int mdParamDef,
- int cMax /*must be 1*/,
- [ComAliasName("ULONG*")] out uint pcTokens);
-#if !MDBG_FAKE_COM
- // STDMETHOD(EnumMemberRefs)( // S_OK, S_FALSE, or error.
- // HCORENUM *phEnum, // [IN|OUT] Pointer to the enum.
- // mdToken tkParent, // [IN] Parent token to scope the enumeration.
- // mdMemberRef rMemberRefs[], // [OUT] Put MemberRefs here.
- // ULONG cMax, // [IN] Max MemberRefs to put.
- // ULONG *pcTokens) PURE; // [OUT] Put # put here.
- void EnumMemberRefs_();
-
- // STDMETHOD(EnumMethodImpls)( // S_OK, S_FALSE, or error
- // HCORENUM *phEnum, // [IN|OUT] Pointer to the enum.
- // mdTypeDef td, // [IN] TypeDef to scope the enumeration.
- // mdToken rMethodBody[], // [OUT] Put Method Body tokens here.
- // mdToken rMethodDecl[], // [OUT] Put Method Declaration tokens here.
- // ULONG cMax, // [IN] Max tokens to put.
- // ULONG *pcTokens) PURE; // [OUT] Put # put here.
- void EnumMethodImpls_();
-
- // STDMETHOD(EnumPermissionSets)( // S_OK, S_FALSE, or error.
- // HCORENUM *phEnum, // [IN|OUT] Pointer to the enum.
- // mdToken tk, // [IN] if !NIL, token to scope the enumeration.
- // DWORD dwActions, // [IN] if !0, return only these actions.
- // mdPermission rPermission[], // [OUT] Put Permissions here.
- // ULONG cMax, // [IN] Max Permissions to put.
- // ULONG *pcTokens) PURE; // [OUT] Put # put here.
- void EnumPermissionSets_();
-
- // STDMETHOD(FindMember)(
- // mdTypeDef td, // [IN] given typedef
- // LPCWSTR szName, // [IN] member name
- // PCCOR_SIGNATURE pvSigBlob, // [IN] point to a blob value of CLR signature
- // ULONG cbSigBlob, // [IN] count of bytes in the signature blob
- // mdToken *pmb) PURE; // [OUT] matching memberdef
- void FindMember_();
-
- // STDMETHOD(FindMethod)(
- // mdTypeDef td, // [IN] given typedef
- // LPCWSTR szName, // [IN] member name
- // PCCOR_SIGNATURE pvSigBlob, // [IN] point to a blob value of CLR signature
- // ULONG cbSigBlob, // [IN] count of bytes in the signature blob
- // mdMethodDef *pmb) PURE; // [OUT] matching memberdef
- void FindMethod_();
-
- // STDMETHOD(FindField)(
- // mdTypeDef td, // [IN] given typedef
- // LPCWSTR szName, // [IN] member name
- // PCCOR_SIGNATURE pvSigBlob, // [IN] point to a blob value of CLR signature
- // ULONG cbSigBlob, // [IN] count of bytes in the signature blob
- // mdFieldDef *pmb) PURE; // [OUT] matching memberdef
- void FindField_();
-
- // STDMETHOD(FindMemberRef)(
- // mdTypeRef td, // [IN] given typeRef
- // LPCWSTR szName, // [IN] member name
- // PCCOR_SIGNATURE pvSigBlob, // [IN] point to a blob value of CLR signature
- // ULONG cbSigBlob, // [IN] count of bytes in the signature blob
- // mdMemberRef *pmr) PURE; // [OUT] matching memberref
- void FindMemberRef_();
-#endif
- // STDMETHOD (GetMethodProps)(
- // mdMethodDef mb, // The method for which to get props.
- // mdTypeDef *pClass, // Put method's class here.
- // LPWSTR szMethod, // Put method's name here.
- // ULONG cchMethod, // Size of szMethod buffer in wide chars.
- // ULONG *pchMethod, // Put actual size here
- // DWORD *pdwAttr, // Put flags here.
- // PCCOR_SIGNATURE *ppvSigBlob, // [OUT] point to the blob value of meta data
- // ULONG *pcbSigBlob, // [OUT] actual size of signature blob
- // ULONG *pulCodeRVA, // [OUT] codeRVA
- // DWORD *pdwImplFlags) PURE; // [OUT] Impl. Flags
- void GetMethodProps([In] uint md,
- [ComAliasName("mdTypeDef*")] [Out] out int pClass,
- [Out, MarshalAs( UnmanagedType.LPWStr)] StringBuilder szMethod,
- [In] int cchMethod,
- [ComAliasName("ULONG*")] [Out] out int pchMethod,
- [ComAliasName("DWORD*")] [Out] out uint pdwAttr,
- [ComAliasName("PCCOR_SIGNATURE*")] [Out] out IntPtr ppvSigBlob,
- [ComAliasName("ULONG*")] [Out] out uint pcbSigBlob,
- [ComAliasName("ULONG*")] [Out] out uint pulCodeRVA,
- [ComAliasName("DWORD*")] [Out] out uint pdwImplFlags
- );
-
- // STDMETHOD(GetMemberRefProps)( // S_OK or error.
- // mdMemberRef mr, // [IN] given memberref
- // mdToken *ptk, // [OUT] Put classref or classdef here.
- // LPWSTR szMember, // [OUT] buffer to fill for member's name
- // ULONG cchMember, // [IN] the count of char of szMember
- // ULONG *pchMember, // [OUT] actual count of char in member name
- // PCCOR_SIGNATURE *ppvSigBlob, // [OUT] point to meta data blob value
- // ULONG *pbSig) PURE; // [OUT] actual size of signature blob
- void GetMemberRefProps([In] uint mr,
- [ComAliasName("mdMemberRef*")] [Out] out int ptk,
- [Out,MarshalAs(UnmanagedType.LPWStr)] StringBuilder szMember,
- [In] int cchMember,
- [ComAliasName("ULONG*")] [Out] out uint pchMember,
- [ComAliasName("PCCOR_SIGNATURE*")] [Out] out IntPtr ppvSigBlob,
- [ComAliasName("ULONG*")] [Out] out int pbSig
- );
-
- // STDMETHOD(EnumProperties)( // S_OK, S_FALSE, or error.
- // HCORENUM *phEnum, // [IN|OUT] Pointer to the enum.
- // mdTypeDef td, // [IN] TypeDef to scope the enumeration.
- // mdProperty rProperties[], // [OUT] Put Properties here.
- // ULONG cMax, // [IN] Max properties to put.
- // ULONG *pcProperties) PURE; // [OUT] Put # put here.
- void EnumProperties(ref IntPtr phEnum,
- int td,
- [ComAliasName("mdProperty*")] out int mdProperty,
- int cMax /*must be 1*/,
- [ComAliasName("ULONG*")] out uint pcProperties);
-#if !MDBG_FAKE_COM
- // STDMETHOD(EnumEvents)( // S_OK, S_FALSE, or error.
- // HCORENUM *phEnum, // [IN|OUT] Pointer to the enum.
- // mdTypeDef td, // [IN] TypeDef to scope the enumeration.
- // mdEvent rEvents[], // [OUT] Put events here.
- // ULONG cMax, // [IN] Max events to put.
- // ULONG *pcEvents) PURE; // [OUT] Put # put here.
- void EnumEvents_();
-
- // STDMETHOD(GetEventProps)( // S_OK, S_FALSE, or error.
- // mdEvent ev, // [IN] event token
- // mdTypeDef *pClass, // [OUT] typedef containing the event declarion.
- // LPCWSTR szEvent, // [OUT] Event name
- // ULONG cchEvent, // [IN] the count of wchar of szEvent
- // ULONG *pchEvent, // [OUT] actual count of wchar for event's name
- // DWORD *pdwEventFlags, // [OUT] Event flags.
- // mdToken *ptkEventType, // [OUT] EventType class
- // mdMethodDef *pmdAddOn, // [OUT] AddOn method of the event
- // mdMethodDef *pmdRemoveOn, // [OUT] RemoveOn method of the event
- // mdMethodDef *pmdFire, // [OUT] Fire method of the event
- // mdMethodDef rmdOtherMethod[], // [OUT] other method of the event
- // ULONG cMax, // [IN] size of rmdOtherMethod
- // ULONG *pcOtherMethod) PURE; // [OUT] total number of other method of this event
- void GetEventProps_();
-
- // STDMETHOD(EnumMethodSemantics)( // S_OK, S_FALSE, or error.
- // HCORENUM *phEnum, // [IN|OUT] Pointer to the enum.
- // mdMethodDef mb, // [IN] MethodDef to scope the enumeration.
- // mdToken rEventProp[], // [OUT] Put Event/Property here.
- // ULONG cMax, // [IN] Max properties to put.
- // ULONG *pcEventProp) PURE; // [OUT] Put # put here.
- void EnumMethodSemantics_();
-
- // STDMETHOD(GetMethodSemantics)( // S_OK, S_FALSE, or error.
- // mdMethodDef mb, // [IN] method token
- // mdToken tkEventProp, // [IN] event/property token.
- // DWORD *pdwSemanticsFlags) PURE; // [OUT] the role flags for the method/propevent pair
- void GetMethodSemantics_();
-
- // STDMETHOD(GetClassLayout) (
- // mdTypeDef td, // [IN] give typedef
- // DWORD *pdwPackSize, // [OUT] 1, 2, 4, 8, or 16
- // COR_FIELD_OFFSET rFieldOffset[], // [OUT] field offset array
- // ULONG cMax, // [IN] size of the array
- // ULONG *pcFieldOffset, // [OUT] needed array size
- // ULONG *pulClassSize) PURE; // [OUT] the size of the class
- void GetClassLayout_();
-
- // STDMETHOD(GetFieldMarshal) (
- // mdToken tk, // [IN] given a field's memberdef
- // PCCOR_SIGNATURE *ppvNativeType, // [OUT] native type of this field
- // ULONG *pcbNativeType) PURE; // [OUT] the count of bytes of *ppvNativeType
- void GetFieldMarshal_();
-
- // STDMETHOD(GetRVA)( // S_OK or error.
- // mdToken tk, // Member for which to set offset
- // ULONG *pulCodeRVA, // The offset
- // DWORD *pdwImplFlags) PURE; // the implementation flags
- void GetRVA_();
-
- // STDMETHOD(GetPermissionSetProps) (
- // mdPermission pm, // [IN] the permission token.
- // DWORD *pdwAction, // [OUT] CorDeclSecurity.
- // void const **ppvPermission, // [OUT] permission blob.
- // ULONG *pcbPermission) PURE; // [OUT] count of bytes of pvPermission.
- void GetPermissionSetProps_();
-
- // STDMETHOD(GetSigFromToken)( // S_OK or error.
- // mdSignature mdSig, // [IN] Signature token.
- // PCCOR_SIGNATURE *ppvSig, // [OUT] return pointer to token.
- // ULONG *pcbSig) PURE; // [OUT] return size of signature.
- void GetSigFromToken_();
-
- // STDMETHOD(GetModuleRefProps)( // S_OK or error.
- // mdModuleRef mur, // [IN] moduleref token.
- // LPWSTR szName, // [OUT] buffer to fill with the moduleref name.
- // ULONG cchName, // [IN] size of szName in wide characters.
- // ULONG *pchName) PURE; // [OUT] actual count of characters in the name.
- void GetModuleRefProps_();
-
- // STDMETHOD(EnumModuleRefs)( // S_OK or error.
- // HCORENUM *phEnum, // [IN|OUT] pointer to the enum.
- // mdModuleRef rModuleRefs[], // [OUT] put modulerefs here.
- // ULONG cmax, // [IN] max memberrefs to put.
- // ULONG *pcModuleRefs) PURE; // [OUT] put # put here.
- void EnumModuleRefs_();
-
- // STDMETHOD(GetTypeSpecFromToken)( // S_OK or error.
- // mdTypeSpec typespec, // [IN] TypeSpec token.
- // PCCOR_SIGNATURE *ppvSig, // [OUT] return pointer to TypeSpec signature
- // ULONG *pcbSig) PURE; // [OUT] return size of signature.
- void GetTypeSpecFromToken_();
-
- // STDMETHOD(GetNameFromToken)( // Not Recommended! May be removed!
- // mdToken tk, // [IN] Token to get name from. Must have a name.
- // MDUTF8CSTR *pszUtf8NamePtr) PURE; // [OUT] Return pointer to UTF8 name in heap.
- void GetNameFromToken_();
-
-
- // STDMETHOD(EnumUnresolvedMethods)( // S_OK, S_FALSE, or error.
- // HCORENUM *phEnum, // [IN|OUT] Pointer to the enum.
- // mdToken rMethods[], // [OUT] Put MemberDefs here.
- // ULONG cMax, // [IN] Max MemberDefs to put.
- // ULONG *pcTokens) PURE; // [OUT] Put # put here.
- void EnumUnresolvedMethods_();
-#endif
- // STDMETHOD(GetUserString)( // S_OK or error.
- // mdString stk, // [IN] String token.
- // LPWSTR szString, // [OUT] Copy of string.
- // ULONG cchString, // [IN] Max chars of room in szString.
- // ULONG *pchString) PURE; // [OUT] How many chars in actual string.
- void GetUserString([In] int stk,
- [Out,MarshalAs(UnmanagedType.LPWStr)] StringBuilder szString,
- [In] int cchString,
- [ComAliasName("ULONG*")] out int pchString
- );
-#if !MDBG_FAKE_COM
- // STDMETHOD(GetPinvokeMap)( // S_OK or error.
- // mdToken tk, // [IN] FieldDef or MethodDef.
- // DWORD *pdwMappingFlags, // [OUT] Flags used for mapping.
- // LPWSTR szImportName, // [OUT] Import name.
- // ULONG cchImportName, // [IN] Size of the name buffer.
- // ULONG *pchImportName, // [OUT] Actual number of characters stored.
- // mdModuleRef *pmrImportDLL) PURE; // [OUT] ModuleRef token for the target DLL.
- void GetPinvokeMap_();
-
- // STDMETHOD(EnumSignatures)( // S_OK or error.
- // HCORENUM *phEnum, // [IN|OUT] pointer to the enum.
- // mdSignature rSignatures[], // [OUT] put signatures here.
- // ULONG cmax, // [IN] max signatures to put.
- // ULONG *pcSignatures) PURE; // [OUT] put # put here.
- void EnumSignatures_();
-
- // STDMETHOD(EnumTypeSpecs)( // S_OK or error.
- // HCORENUM *phEnum, // [IN|OUT] pointer to the enum.
- // mdTypeSpec rTypeSpecs[], // [OUT] put TypeSpecs here.
- // ULONG cmax, // [IN] max TypeSpecs to put.
- // ULONG *pcTypeSpecs) PURE; // [OUT] put # put here.
- void EnumTypeSpecs_();
-
- // STDMETHOD(EnumUserStrings)( // S_OK or error.
- // HCORENUM *phEnum, // [IN/OUT] pointer to the enum.
- // mdString rStrings[], // [OUT] put Strings here.
- // ULONG cmax, // [IN] max Strings to put.
- // ULONG *pcStrings) PURE; // [OUT] put # put here.
- void EnumUserStrings_();
-
- // STDMETHOD(GetParamForMethodIndex)( // S_OK or error.
- // mdMethodDef md, // [IN] Method token.
- // ULONG ulParamSeq, // [IN] Parameter sequence.
- // mdParamDef *ppd) PURE; // [IN] Put Param token here.
- void GetParamForMethodIndex_();
-#endif
- // STDMETHOD(EnumCustomAttributes)( // S_OK or error.
- // HCORENUM *phEnum, // [IN, OUT] COR enumerator.
- // mdToken tk, // [IN] Token to scope the enumeration, 0 for all.
- // mdToken tkType, // [IN] Type of interest, 0 for all.
- // mdCustomAttribute rCustomAttributes[], // [OUT] Put custom attribute tokens here.
- // ULONG cMax, // [IN] Size of rCustomAttributes.
- // ULONG *pcCustomAttributes) PURE; // [OUT, OPTIONAL] Put count of token values here.
- void EnumCustomAttributes(ref IntPtr phEnum,
- int tk,
- int tkType,
- [ComAliasName("mdCustomAttribute*")]out int mdCustomAttribute,
- uint cMax /*must be 1*/,
- [ComAliasName("ULONG*")]out uint pcTokens
- );
-#if !MDBG_FAKE_COM
- // STDMETHOD(GetCustomAttributeProps)( // S_OK or error.
- // mdCustomAttribute cv, // [IN] CustomAttribute token.
- // mdToken *ptkObj, // [OUT, OPTIONAL] Put object token here.
- // mdToken *ptkType, // [OUT, OPTIONAL] Put AttrType token here.
- // void const **ppBlob, // [OUT, OPTIONAL] Put pointer to data here.
- // ULONG *pcbSize) PURE; // [OUT, OPTIONAL] Put size of date here.
- void GetCustomAttributeProps_();
-
- // STDMETHOD(FindTypeRef)(
- // mdToken tkResolutionScope, // [IN] ModuleRef, AssemblyRef or TypeRef.
- // LPCWSTR szName, // [IN] TypeRef Name.
- // mdTypeRef *ptr) PURE; // [OUT] matching TypeRef.
- void FindTypeRef_();
-
- // STDMETHOD(GetMemberProps)(
- // mdToken mb, // The member for which to get props.
- // mdTypeDef *pClass, // Put member's class here.
- // LPWSTR szMember, // Put member's name here.
- // ULONG cchMember, // Size of szMember buffer in wide chars.
- // ULONG *pchMember, // Put actual size here
- // DWORD *pdwAttr, // Put flags here.
- // PCCOR_SIGNATURE *ppvSigBlob, // [OUT] point to the blob value of meta data
- // ULONG *pcbSigBlob, // [OUT] actual size of signature blob
- // ULONG *pulCodeRVA, // [OUT] codeRVA
- // DWORD *pdwImplFlags, // [OUT] Impl. Flags
- // DWORD *pdwCPlusTypeFlag, // [OUT] flag for value type. selected ELEMENT_TYPE_*
- // void const **ppValue, // [OUT] constant value
- // ULONG *pcchValue) PURE; // [OUT] size of constant string in chars, 0 for non-strings.
- void GetMemberProps_();
-#endif
- // STDMETHOD(GetFieldProps)(
- // mdFieldDef mb, // The field for which to get props.
- // mdTypeDef *pClass, // Put field's class here.
- // LPWSTR szField, // Put field's name here.
- // ULONG cchField, // Size of szField buffer in wide chars.
- // ULONG *pchField, // Put actual size here
- // DWORD *pdwAttr, // Put flags here.
- // PCCOR_SIGNATURE *ppvSigBlob, // [OUT] point to the blob value of meta data
- // ULONG *pcbSigBlob, // [OUT] actual size of signature blob
- // DWORD *pdwCPlusTypeFlag, // [OUT] flag for value type. selected ELEMENT_TYPE_*
- // void const **ppValue, // [OUT] constant value
- // ULONG *pcchValue) PURE; // [OUT] size of constant string in chars, 0 for non-strings.
- void GetFieldProps(int mb,
- [ComAliasName("mdTypeDef*")] out int mdTypeDef,
- [Out, MarshalAs(UnmanagedType.LPWStr)] StringBuilder szField,
- int cchField,
- [ComAliasName("ULONG*")] out int pchField,
- [ComAliasName("DWORD*")] out int pdwAttr,
- [ComAliasName("PCCOR_SIGNATURE*")] out IntPtr ppvSigBlob,
- [ComAliasName("ULONG*")] out int pcbSigBlob,
- [ComAliasName("DWORD*")] out int pdwCPlusTypeFlab,
- [ComAliasName("UVCP_CONSTANT*")] out IntPtr ppValue,
- [ComAliasName("ULONG*")] out int pcchValue
- );
-
- // STDMETHOD(GetPropertyProps)( // S_OK, S_FALSE, or error.
- // mdProperty prop, // [IN] property token
- // mdTypeDef *pClass, // [OUT] typedef containing the property declarion.
- // LPCWSTR szProperty, // [OUT] Property name
- // ULONG cchProperty, // [IN] the count of wchar of szProperty
- // ULONG *pchProperty, // [OUT] actual count of wchar for property name
- // DWORD *pdwPropFlags, // [OUT] property flags.
- // PCCOR_SIGNATURE *ppvSig, // [OUT] property type. pointing to meta data internal blob
- // ULONG *pbSig, // [OUT] count of bytes in *ppvSig
- // DWORD *pdwCPlusTypeFlag, // [OUT] flag for value type. selected ELEMENT_TYPE_*
- // void const **ppDefaultValue, // [OUT] constant value
- // ULONG *pcchDefaultValue, // [OUT] size of constant string in chars, 0 for non-strings.
- // mdMethodDef *pmdSetter, // [OUT] setter method of the property
- // mdMethodDef *pmdGetter, // [OUT] getter method of the property
- // mdMethodDef rmdOtherMethod[], // [OUT] other method of the property
- // ULONG cMax, // [IN] size of rmdOtherMethod
- // ULONG *pcOtherMethod) PURE; // [OUT] total number of other method of this property
- void GetPropertyProps(int prop,
- [ComAliasName ("mdTypeDef*")] out int mdTypeDef,
- [Out, MarshalAs (UnmanagedType.LPWStr)] StringBuilder szProperty,
- int cchProperty,
- [ComAliasName ("ULONG*")] out int pchProperty,
- [ComAliasName ("DWORD*")] out int pdwPropFlags,
- [ComAliasName ("PCCOR_SIGNATURE*")] out IntPtr ppvSig,
- [ComAliasName ("ULONG*")] out int pbSig,
- [ComAliasName ("DWORD*")] out int pdwCPlusTypeFlag,
- [ComAliasName ("UVCP_CONSTANT*")] out IntPtr ppDefaultValue,
- [ComAliasName ("ULONG*")] out int pcchDefaultValue,
- [ComAliasName ("mdMethodDef*")] out int pmdSetter,
- [ComAliasName ("mdMethodDef*")] out int pmdGetter,
- [ComAliasName ("mdMethodDef*")] out int rmdOtherMethod,
- [ComAliasName ("ULONG*")] int cMax, /* must be 1 */
- [ComAliasName ("ULONG*")] out int pcOtherMethod
- );
-
- // STDMETHOD(GetParamProps)( // S_OK or error.
- // mdParamDef tk, // [IN]The Parameter.
- // mdMethodDef *pmd, // [OUT] Parent Method token.
- // ULONG *pulSequence, // [OUT] Parameter sequence.
- // LPWSTR szName, // [OUT] Put name here.
- // ULONG cchName, // [OUT] Size of name buffer.
- // ULONG *pchName, // [OUT] Put actual size of name here.
- // DWORD *pdwAttr, // [OUT] Put flags here.
- // DWORD *pdwCPlusTypeFlag, // [OUT] Flag for value type. selected ELEMENT_TYPE_*.
- // void const **ppValue, // [OUT] Constant value.
- // ULONG *pcchValue) PURE; // [OUT] size of constant string in chars, 0 for non-strings.
- void GetParamProps(int tk,
- [ComAliasName("mdMethodDef*")] out int pmd,
- [ComAliasName("ULONG*")] out uint pulSequence,
- [Out, MarshalAs(UnmanagedType.LPWStr)] StringBuilder szName,
- uint cchName,
- [ComAliasName("ULONG*")] out uint pchName,
- [ComAliasName("DWORD*")] out uint pdwAttr,
- [ComAliasName("DWORD*")] out uint pdwCPlusTypeFlag,
- [ComAliasName("UVCP_CONSTANT*")] out IntPtr ppValue,
- [ComAliasName("ULONG*")] out uint pcchValue
- );
-
- // STDMETHOD(GetCustomAttributeByName)( // S_OK or error.
- // mdToken tkObj, // [IN] Object with Custom Attribute.
- // LPCWSTR szName, // [IN] Name of desired Custom Attribute.
- // const void **ppData, // [OUT] Put pointer to data here.
- // ULONG *pcbData) PURE; // [OUT] Put size of data here.
- [PreserveSig]
- int GetCustomAttributeByName(
- int tkObj,
- [MarshalAs(UnmanagedType.LPWStr)]string szName,
- out IntPtr ppData,
- out uint pcbData);
-
- // STDMETHOD_(BOOL, IsValidToken)( // True or False.
- // mdToken tk) PURE; // [IN] Given token.
- [PreserveSig] bool IsValidToken([In, MarshalAs(UnmanagedType.U4)] uint tk);
-
- // STDMETHOD(GetNestedClassProps)( // S_OK or error.
- // mdTypeDef tdNestedClass, // [IN] NestedClass token.
- // mdTypeDef *ptdEnclosingClass) PURE; // [OUT] EnclosingClass token.
- void GetNestedClassProps(int tdNestedClass, [ComAliasName("mdTypeDef*")] out int tdEnclosingClass);
-#if !MDBG_FAKE_COM
- // STDMETHOD(GetNativeCallConvFromSig)( // S_OK or error.
- // void const *pvSig, // [IN] Pointer to signature.
- // ULONG cbSig, // [IN] Count of signature bytes.
- // ULONG *pCallConv) PURE; // [OUT] Put calling conv here (see CorPinvokemap).
- void GetNativeCallConvFromSig_();
-
- // STDMETHOD(IsGlobal)( // S_OK or error.
- // mdToken pd, // [IN] Type, Field, or Method token.
- // int *pbGlobal) PURE; // [OUT] Put 1 if global, 0 otherwise.
- void IsGlobal_();
-#endif
- } // IMetadataImport
-
-
-
- // IMetaDataImport2
- [Guid("FCE5EFA0-8BBA-4f8e-A036-8F2022B08466"),
- InterfaceType(ComInterfaceType.InterfaceIsIUnknown)
- ]
- [CLSCompliant(false)]
- public interface IMetadataImport2 : IMetadataImport
- {
-
- // Need imports from IMetaDataImport to adjust IM2 vtable slots.
-
- //STDMETHOD_(void, CloseEnum)(HCORENUM hEnum) PURE;
- [PreserveSig] new void CloseEnum(IntPtr hEnum);
-
- //STDMETHOD(CountEnum)(HCORENUM hEnum, ULONG *pulCount) PURE;
- new void CountEnum(IntPtr hEnum, [ComAliasName("ULONG*")] out int pulCount);
-
- //STDMETHOD(ResetEnum)(HCORENUM hEnum, ULONG ulPos) PURE;
- new void ResetEnum(IntPtr hEnum, int ulPos);
-
- //STDMETHOD(EnumTypeDefs)(HCORENUM *phEnum, mdTypeDef rTypeDefs[],ULONG cMax, ULONG *pcTypeDefs) PURE;
- //void EnumTypeDefs(out IntPtr phEnum,int[] rTypeDefs,uint cMax, out uint pcTypeDefs);
- new void EnumTypeDefs(
- ref IntPtr phEnum,
- [ComAliasName("mdTypeDef*")] out int rTypeDefs,
- uint cMax /*must be 1*/,
- [ComAliasName("ULONG*")] out uint pcTypeDefs);
-
- //STDMETHOD(EnumInterfaceImpls)(HCORENUM *phEnum, mdTypeDef td, mdInterfaceImpl rImpls[], ULONG cMax, ULONG* pcImpls) PURE;
- new void EnumInterfaceImpls(
- ref IntPtr phEnum,
- int td,
- [ComAliasName("mdInterfaceImpl*")] out int rImpls,
- uint cMax /*must be 1*/,
- [ComAliasName("ULONG*")] out uint pcImpls);
-
-#if !MDBG_FAKE_COM
- //STDMETHOD(EnumTypeRefs)(HCORENUM *phEnum, mdTypeRef rTypeRefs[], ULONG cMax, ULONG* pcTypeRefs) PURE;
- new void EnumTypeRefs_();
-#endif
- // STDMETHOD(FindTypeDefByName)( // S_OK or error.
- // LPCWSTR szTypeDef, // [IN] Name of the Type.
- // mdToken tkEnclosingClass, // [IN] TypeDef/TypeRef for Enclosing class.
- // mdTypeDef *ptd) PURE; // [OUT] Put the TypeDef token here.
- new void FindTypeDefByName(
- [In, MarshalAs(UnmanagedType.LPWStr)] string szTypeDef,
- [In] int tkEnclosingClass,
- [ComAliasName("mdTypeDef*")] [Out] out int token
- );
-
- // STDMETHOD(GetScopeProps)( // S_OK or error.
- // LPWSTR szName, // [OUT] Put the name here.
- // ULONG cchName, // [IN] Size of name buffer in wide chars.
- // ULONG *pchName, // [OUT] Put size of name (wide chars) here.
- // GUID *pmvid) PURE; // [OUT, OPTIONAL] Put MVID here.
- new void GetScopeProps(
- [Out,MarshalAs(UnmanagedType.LPWStr)] StringBuilder szName,
- [In] int cchName,
- [ComAliasName("ULONG*")] out int pchName,
- out Guid mvid
- );
-#if !MDBG_FAKE_COM
- // STDMETHOD(GetModuleFromScope)( // S_OK.
- // mdModule *pmd) PURE; // [OUT] Put mdModule token here.
- new void GetModuleFromScope_();
-#endif
- // STDMETHOD(GetTypeDefProps)( // S_OK or error.
- // mdTypeDef td, // [IN] TypeDef token for inquiry.
- // LPWSTR szTypeDef, // [OUT] Put name here.
- // ULONG cchTypeDef, // [IN] size of name buffer in wide chars.
- // ULONG *pchTypeDef, // [OUT] put size of name (wide chars) here.
- // DWORD *pdwTypeDefFlags, // [OUT] Put flags here.
- // mdToken *ptkExtends) PURE; // [OUT] Put base class TypeDef/TypeRef here.
- new void GetTypeDefProps([In] int td,
- [Out, MarshalAs( UnmanagedType.LPWStr)] StringBuilder szTypeDef,
- [In] int cchTypeDef,
- [ComAliasName("ULONG*")] [Out] out int pchTypeDef,
- [Out, MarshalAs(UnmanagedType.U4)] out System.Reflection.TypeAttributes pdwTypeDefFlags,
- [ComAliasName("mdToken*")] [Out] out int ptkExtends
- );
-#if !MDBG_FAKE_COM
- // STDMETHOD(GetInterfaceImplProps)( // S_OK or error.
- // mdInterfaceImpl iiImpl, // [IN] InterfaceImpl token.
- // mdTypeDef *pClass, // [OUT] Put implementing class token here.
- // mdToken *ptkIface) PURE; // [OUT] Put implemented interface token here.
- new void GetInterfaceImplProps (
- [In] int iiImpl,
- [Out] out int pClass,
- [Out] out int ptkIface);
-#endif
- // STDMETHOD(GetTypeRefProps)( // S_OK or error.
- // mdTypeRef tr, // [IN] TypeRef token.
- // mdToken *ptkResolutionScope, // [OUT] Resolution scope, ModuleRef or AssemblyRef.
- // LPWSTR szName, // [OUT] Name of the TypeRef.
- // ULONG cchName, // [IN] Size of buffer.
- // ULONG *pchName) PURE; // [OUT] Size of Name.
- new void GetTypeRefProps(
- int tr,
- [ComAliasName("mdToken*")] [Out] out int ptkResolutionScope,
- [Out, MarshalAs(UnmanagedType.LPWStr)] StringBuilder szName,
- [In] int cchName,
- [ComAliasName("ULONG*")] out int pchName
- );
-#if !MDBG_FAKE_COM
- // STDMETHOD(ResolveTypeRef)(mdTypeRef tr, REFIID riid, IUnknown **ppIScope, mdTypeDef *ptd) PURE;
- new void ResolveTypeRef_();
-
- // STDMETHOD(EnumMembers)( // S_OK, S_FALSE, or error.
- // HCORENUM *phEnum, // [IN|OUT] Pointer to the enum.
- // mdTypeDef cl, // [IN] TypeDef to scope the enumeration.
- // mdToken rMembers[], // [OUT] Put MemberDefs here.
- // ULONG cMax, // [IN] Max MemberDefs to put.
- // ULONG *pcTokens) PURE; // [OUT] Put # put here.
- new void EnumMembers_();
-
- // STDMETHOD(EnumMembersWithName)( // S_OK, S_FALSE, or error.
- // HCORENUM *phEnum, // [IN|OUT] Pointer to the enum.
- // mdTypeDef cl, // [IN] TypeDef to scope the enumeration.
- // LPCWSTR szName, // [IN] Limit results to those with this name.
- // mdToken rMembers[], // [OUT] Put MemberDefs here.
- // ULONG cMax, // [IN] Max MemberDefs to put.
- // ULONG *pcTokens) PURE; // [OUT] Put # put here.
- new void EnumMembersWithName_();
-#endif
- // STDMETHOD(EnumMethods)( // S_OK, S_FALSE, or error.
- // HCORENUM *phEnum, // [IN|OUT] Pointer to the enum.
- // mdTypeDef cl, // [IN] TypeDef to scope the enumeration.
- // mdMethodDef rMethods[], // [OUT] Put MethodDefs here.
- // ULONG cMax, // [IN] Max MethodDefs to put.
- // ULONG *pcTokens) PURE; // [OUT] Put # put here.
- new void EnumMethods(ref IntPtr phEnum,
- int cl,
- [ComAliasName("mdMethodDef*")] out int mdMethodDef,
- int cMax, /*must be 1*/
- [ComAliasName("ULONG*")] out int pcTokens
- );
-#if !MDBG_FAKE_COM
- // STDMETHOD(EnumMethodsWithName)( // S_OK, S_FALSE, or error.
- // HCORENUM *phEnum, // [IN|OUT] Pointer to the enum.
- // mdTypeDef cl, // [IN] TypeDef to scope the enumeration.
- // LPCWSTR szName, // [IN] Limit results to those with this name.
- // mdMethodDef rMethods[], // [OU] Put MethodDefs here.
- // ULONG cMax, // [IN] Max MethodDefs to put.
- // ULONG *pcTokens) PURE; // [OUT] Put # put here.
- new void EnumMethodsWithName_();
-#endif
- // STDMETHOD(EnumFields)( // S_OK, S_FALSE, or error.
- // HCORENUM *phEnum, // [IN|OUT] Pointer to the enum.
- // mdTypeDef cl, // [IN] TypeDef to scope the enumeration.
- // mdFieldDef rFields[], // [OUT] Put FieldDefs here.
- // ULONG cMax, // [IN] Max FieldDefs to put.
- // ULONG *pcTokens) PURE; // [OUT] Put # put here.
- /*[PreserveSig]*/
- new void EnumFields(ref IntPtr phEnum,
- int cl,
- [ComAliasName("mdFieldDef*")] out int mdFieldDef,
- int cMax /*must be 1*/,
- [ComAliasName("ULONG*")] out uint pcTokens);
-#if !MDBG_FAKE_COM
- // STDMETHOD(EnumFieldsWithName)( // S_OK, S_FALSE, or error.
- // HCORENUM *phEnum, // [IN|OUT] Pointer to the enum.
- // mdTypeDef cl, // [IN] TypeDef to scope the enumeration.
- // LPCWSTR szName, // [IN] Limit results to those with this name.
- // mdFieldDef rFields[], // [OUT] Put MemberDefs here.
- // ULONG cMax, // [IN] Max MemberDefs to put.
- // ULONG *pcTokens) PURE; // [OUT] Put # put here.
- new void EnumFieldsWithName_();
-#endif
- // STDMETHOD(EnumParams)( // S_OK, S_FALSE, or error.
- // HCORENUM *phEnum, // [IN|OUT] Pointer to the enum.
- // mdMethodDef mb, // [IN] MethodDef to scope the enumeration.
- // mdParamDef rParams[], // [OUT] Put ParamDefs here.
- // ULONG cMax, // [IN] Max ParamDefs to put.
- // ULONG *pcTokens) PURE; // [OUT] Put # put here.
- new void EnumParams(ref IntPtr phEnum,
- int mdMethodDef,
- [ComAliasName("mdParamDef*")] out int mdParamDef,
- int cMax /*must be 1*/,
- [ComAliasName("ULONG*")] out uint pcTokens);
-#if !MDBG_FAKE_COM
- // STDMETHOD(EnumMemberRefs)( // S_OK, S_FALSE, or error.
- // HCORENUM *phEnum, // [IN|OUT] Pointer to the enum.
- // mdToken tkParent, // [IN] Parent token to scope the enumeration.
- // mdMemberRef rMemberRefs[], // [OUT] Put MemberRefs here.
- // ULONG cMax, // [IN] Max MemberRefs to put.
- // ULONG *pcTokens) PURE; // [OUT] Put # put here.
- new void EnumMemberRefs_();
-
- // STDMETHOD(EnumMethodImpls)( // S_OK, S_FALSE, or error
- // HCORENUM *phEnum, // [IN|OUT] Pointer to the enum.
- // mdTypeDef td, // [IN] TypeDef to scope the enumeration.
- // mdToken rMethodBody[], // [OUT] Put Method Body tokens here.
- // mdToken rMethodDecl[], // [OUT] Put Method Declaration tokens here.
- // ULONG cMax, // [IN] Max tokens to put.
- // ULONG *pcTokens) PURE; // [OUT] Put # put here.
- new void EnumMethodImpls_();
-
- // STDMETHOD(EnumPermissionSets)( // S_OK, S_FALSE, or error.
- // HCORENUM *phEnum, // [IN|OUT] Pointer to the enum.
- // mdToken tk, // [IN] if !NIL, token to scope the enumeration.
- // DWORD dwActions, // [IN] if !0, return only these actions.
- // mdPermission rPermission[], // [OUT] Put Permissions here.
- // ULONG cMax, // [IN] Max Permissions to put.
- // ULONG *pcTokens) PURE; // [OUT] Put # put here.
- new void EnumPermissionSets_();
-
- // STDMETHOD(FindMember)(
- // mdTypeDef td, // [IN] given typedef
- // LPCWSTR szName, // [IN] member name
- // PCCOR_SIGNATURE pvSigBlob, // [IN] point to a blob value of CLR signature
- // ULONG cbSigBlob, // [IN] count of bytes in the signature blob
- // mdToken *pmb) PURE; // [OUT] matching memberdef
- new void FindMember_();
-
- // STDMETHOD(FindMethod)(
- // mdTypeDef td, // [IN] given typedef
- // LPCWSTR szName, // [IN] member name
- // PCCOR_SIGNATURE pvSigBlob, // [IN] point to a blob value of CLR signature
- // ULONG cbSigBlob, // [IN] count of bytes in the signature blob
- // mdMethodDef *pmb) PURE; // [OUT] matching memberdef
- new void FindMethod_();
-
- // STDMETHOD(FindField)(
- // mdTypeDef td, // [IN] given typedef
- // LPCWSTR szName, // [IN] member name
- // PCCOR_SIGNATURE pvSigBlob, // [IN] point to a blob value of CLR signature
- // ULONG cbSigBlob, // [IN] count of bytes in the signature blob
- // mdFieldDef *pmb) PURE; // [OUT] matching memberdef
- new void FindField_();
-
- // STDMETHOD(FindMemberRef)(
- // mdTypeRef td, // [IN] given typeRef
- // LPCWSTR szName, // [IN] member name
- // PCCOR_SIGNATURE pvSigBlob, // [IN] point to a blob value of CLR signature
- // ULONG cbSigBlob, // [IN] count of bytes in the signature blob
- // mdMemberRef *pmr) PURE; // [OUT] matching memberref
- new void FindMemberRef_();
-#endif
- // STDMETHOD (GetMethodProps)(
- // mdMethodDef mb, // The method for which to get props.
- // mdTypeDef *pClass, // Put method's class here.
- // LPWSTR szMethod, // Put method's name here.
- // ULONG cchMethod, // Size of szMethod buffer in wide chars.
- // ULONG *pchMethod, // Put actual size here
- // DWORD *pdwAttr, // Put flags here.
- // PCCOR_SIGNATURE *ppvSigBlob, // [OUT] point to the blob value of meta data
- // ULONG *pcbSigBlob, // [OUT] actual size of signature blob
- // ULONG *pulCodeRVA, // [OUT] codeRVA
- // DWORD *pdwImplFlags) PURE; // [OUT] Impl. Flags
- new void GetMethodProps([In] uint md,
- [ComAliasName("mdTypeDef*")] [Out] out int pClass,
- [Out, MarshalAs( UnmanagedType.LPWStr)] StringBuilder szMethod,
- [In] int cchMethod,
- [ComAliasName("ULONG*")] [Out] out int pchMethod,
- [ComAliasName("DWORD*")] [Out] out uint pdwAttr,
- [ComAliasName("PCCOR_SIGNATURE*")] [Out] out IntPtr ppvSigBlob,
- [ComAliasName("ULONG*")] [Out] out uint pcbSigBlob,
- [ComAliasName("ULONG*")] [Out] out uint pulCodeRVA,
- [ComAliasName("DWORD*")] [Out] out uint pdwImplFlags
- );
-
- // STDMETHOD(GetMemberRefProps)( // S_OK or error.
- // mdMemberRef mr, // [IN] given memberref
- // mdToken *ptk, // [OUT] Put classref or classdef here.
- // LPWSTR szMember, // [OUT] buffer to fill for member's name
- // ULONG cchMember, // [IN] the count of char of szMember
- // ULONG *pchMember, // [OUT] actual count of char in member name
- // PCCOR_SIGNATURE *ppvSigBlob, // [OUT] point to meta data blob value
- // ULONG *pbSig) PURE; // [OUT] actual size of signature blob
- new void GetMemberRefProps([In] uint mr,
- [ComAliasName("mdMemberRef*")] [Out] out int ptk,
- [Out,MarshalAs(UnmanagedType.LPWStr)] StringBuilder szMember,
- [In] int cchMember,
- [ComAliasName("ULONG*")] [Out] out uint pchMember,
- [ComAliasName("PCCOR_SIGNATURE*")] [Out] out IntPtr ppvSigBlob,
- [ComAliasName("ULONG*")] [Out] out int pbSig
- );
-
- // STDMETHOD(EnumProperties)( // S_OK, S_FALSE, or error.
- // HCORENUM *phEnum, // [IN|OUT] Pointer to the enum.
- // mdTypeDef td, // [IN] TypeDef to scope the enumeration.
- // mdProperty rProperties[], // [OUT] Put Properties here.
- // ULONG cMax, // [IN] Max properties to put.
- // ULONG *pcProperties) PURE; // [OUT] Put # put here.
- new void EnumProperties(ref IntPtr phEnum,
- int td,
- [ComAliasName("mdProperty*")] out int mdProperty,
- int cMax /*must be 1*/,
- [ComAliasName("ULONG*")] out uint pcProperties);
-#if !MDBG_FAKE_COM
- // STDMETHOD(EnumEvents)( // S_OK, S_FALSE, or error.
- // HCORENUM *phEnum, // [IN|OUT] Pointer to the enum.
- // mdTypeDef td, // [IN] TypeDef to scope the enumeration.
- // mdEvent rEvents[], // [OUT] Put events here.
- // ULONG cMax, // [IN] Max events to put.
- // ULONG *pcEvents) PURE; // [OUT] Put # put here.
- new void EnumEvents_();
-
- // STDMETHOD(GetEventProps)( // S_OK, S_FALSE, or error.
- // mdEvent ev, // [IN] event token
- // mdTypeDef *pClass, // [OUT] typedef containing the event declarion.
- // LPCWSTR szEvent, // [OUT] Event name
- // ULONG cchEvent, // [IN] the count of wchar of szEvent
- // ULONG *pchEvent, // [OUT] actual count of wchar for event's name
- // DWORD *pdwEventFlags, // [OUT] Event flags.
- // mdToken *ptkEventType, // [OUT] EventType class
- // mdMethodDef *pmdAddOn, // [OUT] AddOn method of the event
- // mdMethodDef *pmdRemoveOn, // [OUT] RemoveOn method of the event
- // mdMethodDef *pmdFire, // [OUT] Fire method of the event
- // mdMethodDef rmdOtherMethod[], // [OUT] other method of the event
- // ULONG cMax, // [IN] size of rmdOtherMethod
- // ULONG *pcOtherMethod) PURE; // [OUT] total number of other method of this event
- new void GetEventProps_();
-
- // STDMETHOD(EnumMethodSemantics)( // S_OK, S_FALSE, or error.
- // HCORENUM *phEnum, // [IN|OUT] Pointer to the enum.
- // mdMethodDef mb, // [IN] MethodDef to scope the enumeration.
- // mdToken rEventProp[], // [OUT] Put Event/Property here.
- // ULONG cMax, // [IN] Max properties to put.
- // ULONG *pcEventProp) PURE; // [OUT] Put # put here.
- new void EnumMethodSemantics_();
-
- // STDMETHOD(GetMethodSemantics)( // S_OK, S_FALSE, or error.
- // mdMethodDef mb, // [IN] method token
- // mdToken tkEventProp, // [IN] event/property token.
- // DWORD *pdwSemanticsFlags) PURE; // [OUT] the role flags for the method/propevent pair
- new void GetMethodSemantics_();
-
- // STDMETHOD(GetClassLayout) (
- // mdTypeDef td, // [IN] give typedef
- // DWORD *pdwPackSize, // [OUT] 1, 2, 4, 8, or 16
- // COR_FIELD_OFFSET rFieldOffset[], // [OUT] field offset array
- // ULONG cMax, // [IN] size of the array
- // ULONG *pcFieldOffset, // [OUT] needed array size
- // ULONG *pulClassSize) PURE; // [OUT] the size of the class
- new void GetClassLayout_();
-
- // STDMETHOD(GetFieldMarshal) (
- // mdToken tk, // [IN] given a field's memberdef
- // PCCOR_SIGNATURE *ppvNativeType, // [OUT] native type of this field
- // ULONG *pcbNativeType) PURE; // [OUT] the count of bytes of *ppvNativeType
- new void GetFieldMarshal_();
-
- // STDMETHOD(GetRVA)( // S_OK or error.
- // mdToken tk, // Member for which to set offset
- // ULONG *pulCodeRVA, // The offset
- // DWORD *pdwImplFlags) PURE; // the implementation flags
- new void GetRVA_();
-
- // STDMETHOD(GetPermissionSetProps) (
- // mdPermission pm, // [IN] the permission token.
- // DWORD *pdwAction, // [OUT] CorDeclSecurity.
- // void const **ppvPermission, // [OUT] permission blob.
- // ULONG *pcbPermission) PURE; // [OUT] count of bytes of pvPermission.
- new void GetPermissionSetProps_();
-
- // STDMETHOD(GetSigFromToken)( // S_OK or error.
- // mdSignature mdSig, // [IN] Signature token.
- // PCCOR_SIGNATURE *ppvSig, // [OUT] return pointer to token.
- // ULONG *pcbSig) PURE; // [OUT] return size of signature.
- new void GetSigFromToken_();
-
- // STDMETHOD(GetModuleRefProps)( // S_OK or error.
- // mdModuleRef mur, // [IN] moduleref token.
- // LPWSTR szName, // [OUT] buffer to fill with the moduleref name.
- // ULONG cchName, // [IN] size of szName in wide characters.
- // ULONG *pchName) PURE; // [OUT] actual count of characters in the name.
- new void GetModuleRefProps_();
-
- // STDMETHOD(EnumModuleRefs)( // S_OK or error.
- // HCORENUM *phEnum, // [IN|OUT] pointer to the enum.
- // mdModuleRef rModuleRefs[], // [OUT] put modulerefs here.
- // ULONG cmax, // [IN] max memberrefs to put.
- // ULONG *pcModuleRefs) PURE; // [OUT] put # put here.
- new void EnumModuleRefs_();
-
- // STDMETHOD(GetTypeSpecFromToken)( // S_OK or error.
- // mdTypeSpec typespec, // [IN] TypeSpec token.
- // PCCOR_SIGNATURE *ppvSig, // [OUT] return pointer to TypeSpec signature
- // ULONG *pcbSig) PURE; // [OUT] return size of signature.
- new void GetTypeSpecFromToken_();
-
- // STDMETHOD(GetNameFromToken)( // Not Recommended! May be removed!
- // mdToken tk, // [IN] Token to get name from. Must have a name.
- // MDUTF8CSTR *pszUtf8NamePtr) PURE; // [OUT] Return pointer to UTF8 name in heap.
- new void GetNameFromToken_();
-
-
- // STDMETHOD(EnumUnresolvedMethods)( // S_OK, S_FALSE, or error.
- // HCORENUM *phEnum, // [IN|OUT] Pointer to the enum.
- // mdToken rMethods[], // [OUT] Put MemberDefs here.
- // ULONG cMax, // [IN] Max MemberDefs to put.
- // ULONG *pcTokens) PURE; // [OUT] Put # put here.
- new void EnumUnresolvedMethods_();
-#endif
- // STDMETHOD(GetUserString)( // S_OK or error.
- // mdString stk, // [IN] String token.
- // LPWSTR szString, // [OUT] Copy of string.
- // ULONG cchString, // [IN] Max chars of room in szString.
- // ULONG *pchString) PURE; // [OUT] How many chars in actual string.
- new void GetUserString([In] int stk,
- [Out,MarshalAs(UnmanagedType.LPWStr)] StringBuilder szString,
- [In] int cchString,
- [ComAliasName("ULONG*")] out int pchString
- );
-#if !MDBG_FAKE_COM
- // STDMETHOD(GetPinvokeMap)( // S_OK or error.
- // mdToken tk, // [IN] FieldDef or MethodDef.
- // DWORD *pdwMappingFlags, // [OUT] Flags used for mapping.
- // LPWSTR szImportName, // [OUT] Import name.
- // ULONG cchImportName, // [IN] Size of the name buffer.
- // ULONG *pchImportName, // [OUT] Actual number of characters stored.
- // mdModuleRef *pmrImportDLL) PURE; // [OUT] ModuleRef token for the target DLL.
- new void GetPinvokeMap_();
-
- // STDMETHOD(EnumSignatures)( // S_OK or error.
- // HCORENUM *phEnum, // [IN|OUT] pointer to the enum.
- // mdSignature rSignatures[], // [OUT] put signatures here.
- // ULONG cmax, // [IN] max signatures to put.
- // ULONG *pcSignatures) PURE; // [OUT] put # put here.
- new void EnumSignatures_();
-
- // STDMETHOD(EnumTypeSpecs)( // S_OK or error.
- // HCORENUM *phEnum, // [IN|OUT] pointer to the enum.
- // mdTypeSpec rTypeSpecs[], // [OUT] put TypeSpecs here.
- // ULONG cmax, // [IN] max TypeSpecs to put.
- // ULONG *pcTypeSpecs) PURE; // [OUT] put # put here.
- new void EnumTypeSpecs_();
-
- // STDMETHOD(EnumUserStrings)( // S_OK or error.
- // HCORENUM *phEnum, // [IN/OUT] pointer to the enum.
- // mdString rStrings[], // [OUT] put Strings here.
- // ULONG cmax, // [IN] max Strings to put.
- // ULONG *pcStrings) PURE; // [OUT] put # put here.
- new void EnumUserStrings_();
-
- // STDMETHOD(GetParamForMethodIndex)( // S_OK or error.
- // mdMethodDef md, // [IN] Method token.
- // ULONG ulParamSeq, // [IN] Parameter sequence.
- // mdParamDef *ppd) PURE; // [IN] Put Param token here.
- new void GetParamForMethodIndex_();
-#endif
- // STDMETHOD(EnumCustomAttributes)( // S_OK or error.
- // HCORENUM *phEnum, // [IN, OUT] COR enumerator.
- // mdToken tk, // [IN] Token to scope the enumeration, 0 for all.
- // mdToken tkType, // [IN] Type of interest, 0 for all.
- // mdCustomAttribute rCustomAttributes[], // [OUT] Put custom attribute tokens here.
- // ULONG cMax, // [IN] Size of rCustomAttributes.
- // ULONG *pcCustomAttributes) PURE; // [OUT, OPTIONAL] Put count of token values here.
- new void EnumCustomAttributes(ref IntPtr phEnum,
- int tk,
- int tkType,
- [ComAliasName("mdCustomAttribute*")]out int mdCustomAttribute,
- uint cMax /*must be 1*/,
- [ComAliasName("ULONG*")]out uint pcTokens
- );
-#if !MDBG_FAKE_COM
- // STDMETHOD(GetCustomAttributeProps)( // S_OK or error.
- // mdCustomAttribute cv, // [IN] CustomAttribute token.
- // mdToken *ptkObj, // [OUT, OPTIONAL] Put object token here.
- // mdToken *ptkType, // [OUT, OPTIONAL] Put AttrType token here.
- // void const **ppBlob, // [OUT, OPTIONAL] Put pointer to data here.
- // ULONG *pcbSize) PURE; // [OUT, OPTIONAL] Put size of date here.
- new void GetCustomAttributeProps_();
-
- // STDMETHOD(FindTypeRef)(
- // mdToken tkResolutionScope, // [IN] ModuleRef, AssemblyRef or TypeRef.
- // LPCWSTR szName, // [IN] TypeRef Name.
- // mdTypeRef *ptr) PURE; // [OUT] matching TypeRef.
- new void FindTypeRef_();
-
- // STDMETHOD(GetMemberProps)(
- // mdToken mb, // The member for which to get props.
- // mdTypeDef *pClass, // Put member's class here.
- // LPWSTR szMember, // Put member's name here.
- // ULONG cchMember, // Size of szMember buffer in wide chars.
- // ULONG *pchMember, // Put actual size here
- // DWORD *pdwAttr, // Put flags here.
- // PCCOR_SIGNATURE *ppvSigBlob, // [OUT] point to the blob value of meta data
- // ULONG *pcbSigBlob, // [OUT] actual size of signature blob
- // ULONG *pulCodeRVA, // [OUT] codeRVA
- // DWORD *pdwImplFlags, // [OUT] Impl. Flags
- // DWORD *pdwCPlusTypeFlag, // [OUT] flag for value type. selected ELEMENT_TYPE_*
- // void const **ppValue, // [OUT] constant value
- // ULONG *pcchValue) PURE; // [OUT] size of constant string in chars, 0 for non-strings.
- new void GetMemberProps_();
-#endif
- // STDMETHOD(GetFieldProps)(
- // mdFieldDef mb, // The field for which to get props.
- // mdTypeDef *pClass, // Put field's class here.
- // LPWSTR szField, // Put field's name here.
- // ULONG cchField, // Size of szField buffer in wide chars.
- // ULONG *pchField, // Put actual size here
- // DWORD *pdwAttr, // Put flags here.
- // PCCOR_SIGNATURE *ppvSigBlob, // [OUT] point to the blob value of meta data
- // ULONG *pcbSigBlob, // [OUT] actual size of signature blob
- // DWORD *pdwCPlusTypeFlag, // [OUT] flag for value type. selected ELEMENT_TYPE_*
- // void const **ppValue, // [OUT] constant value
- // ULONG *pcchValue) PURE; // [OUT] size of constant string in chars, 0 for non-strings.
- new void GetFieldProps(int mb,
- [ComAliasName("mdTypeDef*")] out int mdTypeDef,
- [Out, MarshalAs(UnmanagedType.LPWStr)] StringBuilder szField,
- int cchField,
- [ComAliasName("ULONG*")] out int pchField,
- [ComAliasName("DWORD*")] out int pdwAttr,
- [ComAliasName("PCCOR_SIGNATURE*")] out IntPtr ppvSigBlob,
- [ComAliasName("ULONG*")] out int pcbSigBlob,
- [ComAliasName("DWORD*")] out int pdwCPlusTypeFlab,
- [ComAliasName("UVCP_CONSTANT*")] out IntPtr ppValue,
- [ComAliasName("ULONG*")] out int pcchValue
- );
-
- // STDMETHOD(GetPropertyProps)( // S_OK, S_FALSE, or error.
- // mdProperty prop, // [IN] property token
- // mdTypeDef *pClass, // [OUT] typedef containing the property declarion.
- // LPCWSTR szProperty, // [OUT] Property name
- // ULONG cchProperty, // [IN] the count of wchar of szProperty
- // ULONG *pchProperty, // [OUT] actual count of wchar for property name
- // DWORD *pdwPropFlags, // [OUT] property flags.
- // PCCOR_SIGNATURE *ppvSig, // [OUT] property type. pointing to meta data internal blob
- // ULONG *pbSig, // [OUT] count of bytes in *ppvSig
- // DWORD *pdwCPlusTypeFlag, // [OUT] flag for value type. selected ELEMENT_TYPE_*
- // void const **ppDefaultValue, // [OUT] constant value
- // ULONG *pcchDefaultValue, // [OUT] size of constant string in chars, 0 for non-strings.
- // mdMethodDef *pmdSetter, // [OUT] setter method of the property
- // mdMethodDef *pmdGetter, // [OUT] getter method of the property
- // mdMethodDef rmdOtherMethod[], // [OUT] other method of the property
- // ULONG cMax, // [IN] size of rmdOtherMethod
- // ULONG *pcOtherMethod) PURE; // [OUT] total number of other method of this property
- new void GetPropertyProps(int prop,
- [ComAliasName ("mdTypeDef*")] out int mdTypeDef,
- [Out, MarshalAs (UnmanagedType.LPWStr)] StringBuilder szProperty,
- int cchProperty,
- [ComAliasName ("ULONG*")] out int pchProperty,
- [ComAliasName ("DWORD*")] out int pdwPropFlags,
- [ComAliasName ("PCCOR_SIGNATURE*")] out IntPtr ppvSig,
- [ComAliasName ("ULONG*")] out int pbSig,
- [ComAliasName ("DWORD*")] out int pdwCPlusTypeFlag,
- [ComAliasName ("UVCP_CONSTANT*")] out IntPtr ppDefaultValue,
- [ComAliasName ("ULONG*")] out int pcchDefaultValue,
- [ComAliasName ("mdMethodDef*")] out int pmdSetter,
- [ComAliasName ("mdMethodDef*")] out int pmdGetter,
- [ComAliasName ("mdMethodDef*")] out int rmdOtherMethod,
- [ComAliasName ("ULONG*")] int cMax, /* must be 1 */
- [ComAliasName ("ULONG*")] out int pcOtherMethod
- );
-
- // STDMETHOD(GetParamProps)( // S_OK or error.
- // mdParamDef tk, // [IN]The Parameter.
- // mdMethodDef *pmd, // [OUT] Parent Method token.
- // ULONG *pulSequence, // [OUT] Parameter sequence.
- // LPWSTR szName, // [OUT] Put name here.
- // ULONG cchName, // [OUT] Size of name buffer.
- // ULONG *pchName, // [OUT] Put actual size of name here.
- // DWORD *pdwAttr, // [OUT] Put flags here.
- // DWORD *pdwCPlusTypeFlag, // [OUT] Flag for value type. selected ELEMENT_TYPE_*.
- // void const **ppValue, // [OUT] Constant value.
- // ULONG *pcchValue) PURE; // [OUT] size of constant string in chars, 0 for non-strings.
- new void GetParamProps(int tk,
- [ComAliasName("mdMethodDef*")] out int pmd,
- [ComAliasName("ULONG*")] out uint pulSequence,
- [Out, MarshalAs(UnmanagedType.LPWStr)] StringBuilder szName,
- uint cchName,
- [ComAliasName("ULONG*")] out uint pchName,
- [ComAliasName("DWORD*")] out uint pdwAttr,
- [ComAliasName("DWORD*")] out uint pdwCPlusTypeFlag,
- [ComAliasName("UVCP_CONSTANT*")] out IntPtr ppValue,
- [ComAliasName("ULONG*")] out uint pcchValue
- );
-
- // STDMETHOD(GetCustomAttributeByName)( // S_OK or error.
- // mdToken tkObj, // [IN] Object with Custom Attribute.
- // LPCWSTR szName, // [IN] Name of desired Custom Attribute.
- // const void **ppData, // [OUT] Put pointer to data here.
- // ULONG *pcbData) PURE; // [OUT] Put size of data here.
- [PreserveSig]
- new int GetCustomAttributeByName(
- int tkObj,
- [MarshalAs(UnmanagedType.LPWStr)]string szName,
- out IntPtr ppData,
- out uint pcbData);
-
- // STDMETHOD_(BOOL, IsValidToken)( // True or False.
- // mdToken tk) PURE; // [IN] Given token.
- [PreserveSig] new bool IsValidToken([In, MarshalAs(UnmanagedType.U4)] uint tk);
-
- // STDMETHOD(GetNestedClassProps)( // S_OK or error.
- // mdTypeDef tdNestedClass, // [IN] NestedClass token.
- // mdTypeDef *ptdEnclosingClass) PURE; // [OUT] EnclosingClass token.
- new void GetNestedClassProps(int tdNestedClass, [ComAliasName("mdTypeDef*")] out int tdEnclosingClass);
-#if !MDBG_FAKE_COM
- // STDMETHOD(GetNativeCallConvFromSig)( // S_OK or error.
- // void const *pvSig, // [IN] Pointer to signature.
- // ULONG cbSig, // [IN] Count of signature bytes.
- // ULONG *pCallConv) PURE; // [OUT] Put calling conv here (see CorPinvokemap).
- new void GetNativeCallConvFromSig_();
-
-
- // STDMETHOD(IsGlobal)( // S_OK or error.
- // mdToken pd, // [IN] Type, Field, or Method token.
- // int *pbGlobal) PURE; // [OUT] Put 1 if global, 0 otherwise.
- new void IsGlobal_();
-#endif
- //-----------------------------------------------------------------------------
- // Begin IMetaDataImport2
- //-----------------------------------------------------------------------------
-
- /*
- STDMETHOD(EnumGenericParams)(
- HCORENUM *phEnum, // [IN|OUT] Pointer to the enum.
- mdToken tk, // [IN] TypeDef or MethodDef whose generic parameters are requested
- mdGenericParam rGenericParams[], // [OUT] Put GenericParams here.
- ULONG cMax, // [IN] Max GenericParams to put.
- ULONG *pcGenericParams) PURE; // [OUT] Put # put here.
- */
- void EnumGenericParams(
- ref IntPtr hEnum,
- int tk,
- [ComAliasName("mdGenericParam*")] out int rGenericParams,
- uint cMax, // must be 1
- [ComAliasName("ULONG*")] out uint pcGenericParams
- );
-
- // STDMETHOD(GetGenericParamProps)( // S_OK or error.
- // mdGenericParam gp, // [IN] GenericParam
- // ULONG *pulParamSeq, // [OUT] Index of the type parameter
- // DWORD *pdwParamFlags, // [OUT] Flags, for future use (e.g. variance)
- // mdToken *ptOwner, // [OUT] Owner (TypeDef or MethodDef)
- // mdToken *ptkKind, // [OUT] For future use (e.g. non-type parameters)
- // LPWSTR wzname, // [OUT] Put name here
- // ULONG cchName, // [IN] Size of buffer
- // ULONG *pchName) PURE; // [OUT] Put size of name (wide chars) here.
- void GetGenericParamProps(int gp,
- [ComAliasName("ULONG*")] out uint pulParamSeq,
- [ComAliasName("DWORD*")] out int pdwParamFlags,
- [ComAliasName("mdToken*")] out int ptOwner,
- [ComAliasName("mdToken*")] out int ptkKind,
- [Out, MarshalAs(UnmanagedType.LPWStr)] StringBuilder wzName,
- ulong cchName,
- [ComAliasName("ULONG*")] out ulong pchName
- );
-
- // STDMETHOD(GetMethodSpecProps)(
- // mdMethodSpec mi, // [IN] The method instantiation
- // mdToken *tkParent, // [OUT] MethodDef or MemberRef
- // PCCOR_SIGNATURE *ppvSigBlob, // [OUT] point to the blob value of meta data
- // ULONG *pcbSigBlob) PURE; // [OUT] actual size of signature blob
-
- void GetMethodSpecProps([ComAliasName("mdMethodSpec")] int mi,
- [ComAliasName("mdToken*")] out int tkParent,
- [ComAliasName("PCCOR_SIGNATURE*")] out IntPtr ppvSigBlob,
- [ComAliasName("ULONG*")] out int pcbSigBlob
- );
-#if !MDBG_FAKE_COM
- // STDMETHOD(EnumGenericParamConstraints)(
- // HCORENUM *phEnum, // [IN|OUT] Pointer to the enum.
- // mdGenericParam tk, // [IN] GenericParam whose constraints are requested
- // mdGenericParamConstraint rGenericParamConstraints[], // [OUT] Put GenericParamConstraints here.
- // ULONG cMax, // [IN] Max GenericParamConstraints to put.
- // ULONG *pcGenericParamConstraints) PURE; // [OUT] Put # put here.
- void EnumGenericParamConstraints_();
-
- // STDMETHOD(GetGenericParamConstraintProps)( // S_OK or error.
- // mdGenericParamConstraint gpc, // [IN] GenericParamConstraint
- // mdGenericParam *ptGenericParam, // [OUT] GenericParam that is constrained
- // mdToken *ptkConstraintType) PURE; // [OUT] TypeDef/Ref/Spec constraint
- void GetGenericParamConstraintProps_();
-
- // STDMETHOD(GetPEKind)( // S_OK or error.
- // DWORD* pdwPEKind, // [OUT] The kind of PE (0 - not a PE)
- // DWORD* pdwMAchine) PURE; // [OUT] Machine as defined in NT header
- void GetPEKind_();
-
- // STDMETHOD(GetVersionString)( // S_OK or error.
- // LPWSTR pwzBuf, // [OUT[ Put version string here.
- // DWORD ccBufSize, // [IN] size of the buffer, in wide chars
- // DWORD *pccBufSize) PURE; // [OUT] Size of the version string, wide chars, including terminating nul.
- void GetVersionString_();
-
- // STDMETHOD(EnumMethodSpecs)(
- // HCORENUM *phEnum, // [IN|OUT] Pointer to the enum.
- // mdToken tk, // [IN] MethodDef or MemberRef whose MethodSpecs are requested
- // mdMethodSpec rMethodSpecs[], // [OUT] Put MethodSpecs here.
- // ULONG cMax, // [IN] Max tokens to put.
- // ULONG *pcMethodSpecs) PURE; // [OUT] Put actual count here.
- void EnumMethodSpecs_();
-#endif
- }
-
- // GUID Copied from Cor.h
- [Guid("EE62470B-E94B-424e-9B7C-2F00C9249F93"),
- InterfaceType(ComInterfaceType.InterfaceIsIUnknown)
- ] // IID_IMetadataAssemblyImport from cor.h
-
- // This should be a private interface, but
- // we cannot do that becuase we are then getting an exception
- // "The specified type must be visible from COM." @ CorMetadataImport::GetRawInterface
- [CLSCompliant(false)]
- public interface IMetadataAssemblyImport
- {
- // STDMETHOD(GetAssemblyProps)( // S_OK or error.
- // mdAssembly mda, // [IN] The Assembly for which to get the properties.
- // const void **ppbPublicKey, // [OUT] Pointer to the public key.
- // ULONG *pcbPublicKey, // [OUT] Count of bytes in the public key.
- // ULONG *pulHashAlgId, // [OUT] Hash Algorithm.
- // LPWSTR szName, // [OUT] Buffer to fill with assembly's simply name.
- // ULONG cchName, // [IN] Size of buffer in wide chars.
- // ULONG *pchName, // [OUT] Actual # of wide chars in name.
- // ASSEMBLYMETADATA *pMetaData, // [OUT] Assembly MetaData.
- // DWORD *pdwAssemblyFlags) PURE; // [OUT] Flags.
-
- // STDMETHOD(GetAssemblyRefProps)( // S_OK or error.
- // mdAssemblyRef mdar, // [IN] The AssemblyRef for which to get the properties.
- // const void **ppbPublicKeyOrToken, // [OUT] Pointer to the public key or token.
- // ULONG *pcbPublicKeyOrToken, // [OUT] Count of bytes in the public key or token.
- // LPWSTR szName, // [OUT] Buffer to fill with name.
- // ULONG cchName, // [IN] Size of buffer in wide chars.
- // ULONG *pchName, // [OUT] Actual # of wide chars in name.
- // ASSEMBLYMETADATA *pMetaData, // [OUT] Assembly MetaData.
- // const void **ppbHashValue, // [OUT] Hash blob.
- // ULONG *pcbHashValue, // [OUT] Count of bytes in the hash blob.
- // DWORD *pdwAssemblyRefFlags) PURE; // [OUT] Flags.
-
- // STDMETHOD(GetFileProps)( // S_OK or error.
- // mdFile mdf, // [IN] The File for which to get the properties.
- // LPWSTR szName, // [OUT] Buffer to fill with name.
- // ULONG cchName, // [IN] Size of buffer in wide chars.
- // ULONG *pchName, // [OUT] Actual # of wide chars in name.
- // const void **ppbHashValue, // [OUT] Pointer to the Hash Value Blob.
- // ULONG *pcbHashValue, // [OUT] Count of bytes in the Hash Value Blob.
- // DWORD *pdwFileFlags) PURE; // [OUT] Flags.
-
- // STDMETHOD(GetExportedTypeProps)( // S_OK or error.
- // mdExportedType mdct, // [IN] The ExportedType for which to get the properties.
- // LPWSTR szName, // [OUT] Buffer to fill with name.
- // ULONG cchName, // [IN] Size of buffer in wide chars.
- // ULONG *pchName, // [OUT] Actual # of wide chars in name.
- // mdToken *ptkImplementation, // [OUT] mdFile or mdAssemblyRef or mdExportedType.
- // mdTypeDef *ptkTypeDef, // [OUT] TypeDef token within the file.
- // DWORD *pdwExportedTypeFlags) PURE; // [OUT] Flags.
-
- // STDMETHOD(GetManifestResourceProps)( // S_OK or error.
- // mdManifestResource mdmr, // [IN] The ManifestResource for which to get the properties.
- // LPWSTR szName, // [OUT] Buffer to fill with name.
- // ULONG cchName, // [IN] Size of buffer in wide chars.
- // ULONG *pchName, // [OUT] Actual # of wide chars in name.
- // mdToken *ptkImplementation, // [OUT] mdFile or mdAssemblyRef that provides the ManifestResource.
- // DWORD *pdwOffset, // [OUT] Offset to the beginning of the resource within the file.
- // DWORD *pdwResourceFlags) PURE;// [OUT] Flags.
-
- // STDMETHOD(EnumAssemblyRefs)( // S_OK or error
- // HCORENUM *phEnum, // [IN|OUT] Pointer to the enum.
- // mdAssemblyRef rAssemblyRefs[], // [OUT] Put AssemblyRefs here.
- // ULONG cMax, // [IN] Max AssemblyRefs to put.
- // ULONG *pcTokens) PURE; // [OUT] Put # put here.
-
- // STDMETHOD(EnumFiles)( // S_OK or error
- // HCORENUM *phEnum, // [IN|OUT] Pointer to the enum.
- // mdFile rFiles[], // [OUT] Put Files here.
- // ULONG cMax, // [IN] Max Files to put.
- // ULONG *pcTokens) PURE; // [OUT] Put # put here.
-
- // STDMETHOD(EnumExportedTypes)( // S_OK or error
- // HCORENUM *phEnum, // [IN|OUT] Pointer to the enum.
- // mdExportedType rExportedTypes[], // [OUT] Put ExportedTypes here.
- // ULONG cMax, // [IN] Max ExportedTypes to put.
- // ULONG *pcTokens) PURE; // [OUT] Put # put here.
-
- // STDMETHOD(EnumManifestResources)( // S_OK or error
- // HCORENUM *phEnum, // [IN|OUT] Pointer to the enum.
- // mdManifestResource rManifestResources[], // [OUT] Put ManifestResources here.
- // ULONG cMax, // [IN] Max Resources to put.
- // ULONG *pcTokens) PURE; // [OUT] Put # put here.
-
- // STDMETHOD(GetAssemblyFromScope)( // S_OK or error
- // mdAssembly *ptkAssembly) PURE; // [OUT] Put token here.
-
- // STDMETHOD(FindExportedTypeByName)( // S_OK or error
- // LPCWSTR szName, // [IN] Name of the ExportedType.
- // mdToken mdtExportedType, // [IN] ExportedType for the enclosing class.
- // mdExportedType *ptkExportedType) PURE; // [OUT] Put the ExportedType token here.
-
- // STDMETHOD(FindManifestResourceByName)( // S_OK or error
- // LPCWSTR szName, // [IN] Name of the ManifestResource.
- // mdManifestResource *ptkManifestResource) PURE; // [OUT] Put the ManifestResource token here.
-
- // STDMETHOD_(void, CloseEnum)(
- // HCORENUM hEnum) PURE; // Enum to be closed.
-
- // STDMETHOD(FindAssembliesByName)( // S_OK or error
- // LPCWSTR szAppBase, // [IN] optional - can be NULL
- // LPCWSTR szPrivateBin, // [IN] optional - can be NULL
- // LPCWSTR szAssemblyName, // [IN] required - this is the assembly you are requesting
- // IUnknown *ppIUnk[], // [OUT] put IMetaDataAssemblyImport pointers here
- // ULONG cMax, // [IN] The max number to put
- // ULONG *pcAssemblies) PURE; // [OUT] The number of assemblies returned.
- // }; // IMetaDataAssemblyImport
- }
-}
diff --git a/main/src/addins/MonoDevelop.Debugger.Win32/CorApi/RawAssemblyAttributes.cs b/main/src/addins/MonoDevelop.Debugger.Win32/CorApi/RawAssemblyAttributes.cs deleted file mode 100644 index 2f02b53093..0000000000 --- a/main/src/addins/MonoDevelop.Debugger.Win32/CorApi/RawAssemblyAttributes.cs +++ /dev/null @@ -1,12 +0,0 @@ -//---------------------------------------------------------------------
-// This file is part of the CLR Managed Debugger (mdbg) Sample.
-//
-// Copyright (C) Microsoft Corporation. All rights reserved.
-//
-// Imports ICorDebug interface into managed code
-//---------------------------------------------------------------------
-
-
-// Assembly attributes for Raw native imports.
-using System;
-[assembly:CLSCompliant(false)]
diff --git a/main/src/addins/MonoDevelop.Debugger.Win32/CorApi/WindowsImports.cs b/main/src/addins/MonoDevelop.Debugger.Win32/CorApi/WindowsImports.cs deleted file mode 100644 index 756f85c13c..0000000000 --- a/main/src/addins/MonoDevelop.Debugger.Win32/CorApi/WindowsImports.cs +++ /dev/null @@ -1,117 +0,0 @@ -//---------------------------------------------------------------------
-// This file is part of the CLR Managed Debugger (mdbg) Sample.
-//
-// Copyright (C) Microsoft Corporation. All rights reserved.
-//
-// Imports the win32 structures needed by the ICorDebug interfaces.
-//---------------------------------------------------------------------
-
-using System;
-using System.Text;
-using System.Runtime.CompilerServices;
-using System.Runtime.InteropServices;
-
-using Microsoft.Samples.Debugging.CorMetadata.NativeApi;
-using Microsoft.Win32.SafeHandles;
-
-
-namespace Microsoft.Samples.Debugging.CorDebug.NativeApi
-{
- #region X86 Context
- [StructLayout(LayoutKind.Sequential)]
- public struct WIN32_CONTEXT
- {
- public uint ContextFlags;
- public uint Dr0;
- public uint Dr1;
- public uint Dr2;
- public uint Dr3;
- public uint Dr6;
- public uint Dr7;
- public WIN32_FLOATING_SAVE_AREA FloatSave;
- public uint SegGs;
- public uint SegFs;
- public uint SegEs;
- public uint SegDs;
- public uint Edi;
- public uint Esi;
- public uint Ebx;
- public uint Edx;
- public uint Ecx;
- public uint Eax;
- public uint Ebp;
- public uint Eip;
- public uint SegCs;
- public uint EFlags;
- public uint Esp;
- public uint SegSs;
- [MarshalAs(UnmanagedType.ByValArray, SizeConst = 0x200)]
- public byte[] ExtendedRegisters;
- }
-
- [StructLayout(LayoutKind.Sequential)]
- public struct WIN32_FLOATING_SAVE_AREA
- {
- public uint ControlWord;
- public uint StatusWord;
- public uint TagWord;
- public uint ErrorOffset;
- public uint ErrorSelector;
- public uint DataOffset;
- public uint DataSelector;
- [MarshalAs(UnmanagedType.ByValArray, SizeConst = 80)]
- public byte[] RegisterArea;
- public uint Cr0NpxState;
- }
-
- #endregion // X86 Context
-
-
- #region Structures for CreateProcess
- [StructLayout(LayoutKind.Sequential, Pack = 8), ComVisible(false)]
- public class PROCESS_INFORMATION
- {
- public IntPtr hProcess;
- public IntPtr hThread;
- public int dwProcessId;
- public int dwThreadId;
- public PROCESS_INFORMATION() { }
- }
-
- [StructLayout(LayoutKind.Sequential, Pack = 8), ComVisible(false)]
- public class SECURITY_ATTRIBUTES
- {
- public int nLength;
- public IntPtr lpSecurityDescriptor;
- public bool bInheritHandle;
- public SECURITY_ATTRIBUTES() { }
- }
-
- [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto, Pack = 8), ComVisible(false)]
- public class STARTUPINFO
- {
- public int cb;
- public string lpReserved;
- public string lpDesktop;
- public string lpTitle;
- public int dwX;
- public int dwY;
- public int dwXSize;
- public int dwYSize;
- public int dwXCountChars;
- public int dwYCountChars;
- public int dwFillAttribute;
- public int dwFlags;
- public short wShowWindow;
- public short cbReserved2;
- public IntPtr lpReserved2;
- public SafeFileHandle hStdInput;
- public SafeFileHandle hStdOutput;
- public SafeFileHandle hStdError;
- public STARTUPINFO() { }
- }
-
- #endregion // Structures for CreateProcess
-
-
-} // Microsoft.Samples.Debugging.CorDebug.NativeApi
\ No newline at end of file diff --git a/main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/.editorconfig b/main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/.editorconfig deleted file mode 100644 index f3a408cbb1..0000000000 --- a/main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/.editorconfig +++ /dev/null @@ -1,4 +0,0 @@ -[*.cs]
-indent_style = space
-indent_size = 4
-end_of_line = crlf
\ No newline at end of file diff --git a/main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/CorApi2.csproj b/main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/CorApi2.csproj deleted file mode 100644 index d0d0afc8f7..0000000000 --- a/main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/CorApi2.csproj +++ /dev/null @@ -1,144 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0"> - <Import Project="..\..\..\..\MonoDevelop.props" /> - <PropertyGroup> - <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> - <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> - <ProductVersion>8.0.30703</ProductVersion> - <SchemaVersion>2.0</SchemaVersion> - <ProjectGuid>{69136056-BFD3-4CEC-BB41-D9991C79593C}</ProjectGuid> - <OutputType>Library</OutputType> - <AppDesignerFolder>Properties</AppDesignerFolder> - <RootNamespace>CorApi2</RootNamespace> - <AssemblyName>CorApi2</AssemblyName> - <SccProjectName> - </SccProjectName> - <SccLocalPath> - </SccLocalPath> - <SccAuxPath> - </SccAuxPath> - <SccProvider> - </SccProvider> - <FileUpgradeFlags> - </FileUpgradeFlags> - <OldToolsVersion>3.5</OldToolsVersion> - <UpgradeBackupLocation> - </UpgradeBackupLocation> - <TargetFrameworkVersion>v4.5</TargetFrameworkVersion> - <SuppressDocs>True</SuppressDocs> - </PropertyGroup> - <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> - <DebugSymbols>true</DebugSymbols> - <DebugType>full</DebugType> - <Optimize>false</Optimize> - <OutputPath>bin\Debug\</OutputPath> - <DefineConstants>TRACE;DEBUG;MDBG_FEATURE_INTEROP,MDBGENG_FEATURE_TRACECALLS,MDBGENG_FEATURE_CAPTUREOUTPUT,CORAPI_EXPOSE_RAW_INTERFACES</DefineConstants> - <ErrorReport>prompt</ErrorReport> - <WarningLevel>4</WarningLevel> - <TreatWarningsAsErrors>true</TreatWarningsAsErrors> - <AllowUnsafeBlocks>true</AllowUnsafeBlocks> - <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet> - </PropertyGroup> - <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> - <DebugType>pdbonly</DebugType> - <Optimize>true</Optimize> - <OutputPath>bin\Release\</OutputPath> - <DefineConstants>TRACE;MDBG_FEATURE_INTEROP,MDBGENG_FEATURE_TRACECALLS,MDBGENG_FEATURE_CAPTUREOUTPUT,CORAPI_EXPOSE_RAW_INTERFACES</DefineConstants> - <ErrorReport>prompt</ErrorReport> - <WarningLevel>4</WarningLevel> - <TreatWarningsAsErrors>true</TreatWarningsAsErrors> - <AllowUnsafeBlocks>true</AllowUnsafeBlocks> - <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet> - <DebugSymbols>true</DebugSymbols> - </PropertyGroup> - <ItemGroup> - <Reference Include="System" /> - <Reference Include="System.Data" /> - <Reference Include="System.Xml" /> - </ItemGroup> - <ItemGroup> - <ProjectReference Include="..\CorApi\CorApi.csproj"> - <Project>{9FBCC262-10DC-4E84-A5C4-17230BBF8862}</Project> - <Name>CorApi</Name> - </ProjectReference> - </ItemGroup> - <ItemGroup> - <Compile Include="CorPublish.cs" /> - <Compile Include="debug\AppDomain.cs" /> - <Compile Include="debug\AppDomainEnumerator.cs" /> - <Compile Include="debug\Assembly.cs" /> - <Compile Include="debug\AssemblyEnumerator.cs" /> - <Compile Include="debug\Breakpoint.cs" /> - <Compile Include="debug\BreakpointEnumerator.cs" /> - <Compile Include="debug\ChainEnumerator.cs" /> - <Compile Include="debug\Class.cs" /> - <Compile Include="debug\Constants.cs" /> - <Compile Include="debug\Controller.cs" /> - <Compile Include="debug\CorAPIAssemblyAttributes.cs" /> - <Compile Include="debug\Debugger.cs" /> - <Compile Include="debug\ErrorInfoEnumerator.cs" /> - <Compile Include="debug\Eval.cs" /> - <Compile Include="debug\FunctionBreakpoint.cs" /> - <Compile Include="debug\HResults.cs" /> - <Compile Include="debug\HResultUtil.cs" /> - <Compile Include="debug\Module.cs" /> - <Compile Include="debug\ModuleBreakpoint.cs" /> - <Compile Include="debug\ModuleEnumerator.cs" /> - <Compile Include="debug\NativeMethods.cs" /> - <Compile Include="debug\ObjectEnumerator.cs" /> - <Compile Include="debug\PdbHResult.cs" /> - <Compile Include="debug\Process.cs" /> - <Compile Include="debug\ProcessEnumerator.cs" /> - <Compile Include="debug\ProcessSafeHandle.cs" /> - <Compile Include="debug\RegisterSet.cs" /> - <Compile Include="debug\Stepper.cs" /> - <Compile Include="debug\StepperEnumerator.cs" /> - <Compile Include="debug\Thread.cs" /> - <Compile Include="debug\ThreadEnumerator.cs" /> - <Compile Include="debug\Type.cs" /> - <Compile Include="debug\TypeEnumerator.cs" /> - <Compile Include="debug\Value.cs" /> - <Compile Include="debug\ValueBreakpoint.cs" /> - <Compile Include="debug\WrapperBase.cs" /> - <Compile Include="Metadata\CorMetadata.cs" /> - <Compile Include="Metadata\MetadataFieldInfo.cs" /> - <Compile Include="Metadata\MetadataParameterInfo.cs" /> - <Compile Include="Metadata\MetadataPropertyInfo.cs" /> - <Compile Include="Metadata\MetadataType.cs" /> - <Compile Include="Metadata\GenericParameter.cs" /> - <Compile Include="Metahost\Metahost.cs" /> - <Compile Include="SymStore\ISymBinder2.cs" /> - <Compile Include="SymStore\ISymConstant.cs" /> - <Compile Include="SymStore\ISymEncMethod.cs" /> - <Compile Include="SymStore\ISymENCUpdate.cs" /> - <Compile Include="SymStore\ISymReader2.cs" /> - <Compile Include="SymStore\ISymScope2.cs" /> - <Compile Include="SymStore\ISymSearchInfo.cs" /> - <Compile Include="SymStore\ISymWriter2.cs" /> - <Compile Include="SymStore\SymAccess.cs" /> - <Compile Include="SymStore\symbinder.cs" /> - <Compile Include="SymStore\SymConstant.cs" /> - <Compile Include="SymStore\SymDocument.cs" /> - <Compile Include="SymStore\SymDocumentWriter.cs" /> - <Compile Include="SymStore\symmethod.cs" /> - <Compile Include="SymStore\SymNamespace.cs" /> - <Compile Include="SymStore\SymReader.cs" /> - <Compile Include="SymStore\SymScope.cs" /> - <Compile Include="SymStore\SymSearchInfo.cs" /> - <Compile Include="SymStore\SymSearchPolicyAttributes.cs" /> - <Compile Include="SymStore\symvariable.cs" /> - <Compile Include="SymStore\SymWriter.cs" /> - <Compile Include="Extensions\MetadataExtensions.cs" /> - <Compile Include="Extensions\ProcessExtensions.cs" /> - <Compile Include="Extensions\DebuggerExtensions.cs" /> - </ItemGroup> - <Import Project="..\..\..\..\\external\debugger-libs\Mono.Debugging.settings" /> - <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> - <!-- To modify your build process, add your task inside one of the targets below and uncomment it. - Other similar extension points exist, see Microsoft.Common.targets. - <Target Name="BeforeBuild"> - </Target> - <Target Name="AfterBuild"> - </Target> - --> -</Project> diff --git a/main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/CorPublish.cs b/main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/CorPublish.cs deleted file mode 100644 index 1875a80091..0000000000 --- a/main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/CorPublish.cs +++ /dev/null @@ -1,238 +0,0 @@ -//---------------------------------------------------------------------
-// This file is part of the CLR Managed Debugger (mdbg) Sample.
-//
-// Copyright (C) Microsoft Corporation. All rights reserved.
-//---------------------------------------------------------------------
-using System;
-using System.Collections;
-using System.Text;
-
-using Microsoft.Samples.Debugging.CorPublish.NativeApi;
-
-namespace Microsoft.Samples.Debugging.CorPublish
-{
- public sealed class CorPublish
- {
- public CorPublish()
- {
- m_publish = new CorpubPublishClass();
- }
-
- public IEnumerable EnumProcesses()
- {
- ICorPublishProcessEnum pIEnum;
- m_publish.EnumProcesses(COR_PUB_ENUMPROCESS.COR_PUB_MANAGEDONLY,out pIEnum);
- return (pIEnum==null)?null:new CorPublishProcessEnumerator(pIEnum);
- }
-
- public CorPublishProcess GetProcess(int pid)
- {
- ICorPublishProcess proc;
- m_publish.GetProcess((uint)pid,out proc);
- return (proc==null)?null:new CorPublishProcess(proc);
- }
-
-
- private ICorPublish m_publish;
- }
-
- public sealed class CorPublishProcess
- {
- internal CorPublishProcess(ICorPublishProcess iprocess)
- {
- m_process = iprocess;
- }
-
- public IEnumerable EnumAppDomains()
- {
- ICorPublishAppDomainEnum pIEnum;
- m_process.EnumAppDomains(out pIEnum);
- return (pIEnum==null)?null:new CorPublishAppDomainEnumerator(pIEnum);
- }
-
- public string DisplayName
- {
- get
- {
- uint size;
- m_process.GetDisplayName(0, out size, null);
- StringBuilder szName = new StringBuilder((int)size);
- m_process.GetDisplayName((uint)szName.Capacity, out size, szName);
- return szName.ToString();
- }
- }
-
- public int ProcessId
- {
- get
- {
- uint pid;
- m_process.GetProcessID(out pid);
- return (int)pid;
- }
- }
-
- public bool IsManaged
- {
- get
- {
- int bManaged;
- m_process.IsManaged(out bManaged);
- return (bManaged!=0);
- }
- }
-
- private ICorPublishProcess m_process;
- }
-
- internal class CorPublishProcessEnumerator :
- IEnumerable, IEnumerator, ICloneable
- {
- internal CorPublishProcessEnumerator(ICorPublishProcessEnum e)
- {
- m_enum = e;
- }
-
- //
- // ICloneable interface
- //
- public Object Clone ()
- {
- ICorPublishEnum clone = null;
- m_enum.Clone (out clone);
- return new CorPublishProcessEnumerator((ICorPublishProcessEnum)clone);
- }
-
- //
- // IEnumerable interface
- //
- public IEnumerator GetEnumerator ()
- {
- return this;
- }
-
- //
- // IEnumerator interface
- //
- public bool MoveNext ()
- {
- ICorPublishProcess a;
- uint c = 0;
- int r = m_enum.Next ((uint) 1,out a, out c);
- if (r==0 && c==1) // S_OK && we got 1 new element
- m_proc = new CorPublishProcess(a);
- else
- m_proc = null;
- return m_proc != null;
- }
-
- public void Reset ()
- {
- m_enum.Reset();
- m_proc = null;
- }
-
- public Object Current
- {
- get
- {
- return m_proc;
- }
- }
-
- private ICorPublishProcessEnum m_enum;
- private CorPublishProcess m_proc;
- }
-
- public sealed class CorPublishAppDomain
- {
- internal CorPublishAppDomain(ICorPublishAppDomain appDomain)
- {
- m_appDomain = appDomain;
- }
-
- public int Id
- {
- get
- {
- uint id;
- m_appDomain.GetID(out id);
- return (int)id;
- }
- }
-
- public string Name
- {
- get
- {
- uint size;
- m_appDomain.GetName(0,out size, null);
- StringBuilder szName = new StringBuilder((int)size);
- m_appDomain.GetName((uint)szName.Capacity,out size, szName);
- return szName.ToString();
- }
- }
-
- private ICorPublishAppDomain m_appDomain;
- }
-
-
- internal class CorPublishAppDomainEnumerator :
- IEnumerable, IEnumerator, ICloneable
- {
- internal CorPublishAppDomainEnumerator(ICorPublishAppDomainEnum appDomainEnumerator)
- {
- m_enum = appDomainEnumerator;
- }
-
- //
- // ICloneable interface
- //
- public Object Clone ()
- {
- ICorPublishEnum clone = null;
- m_enum.Clone (out clone);
- return new CorPublishAppDomainEnumerator((ICorPublishAppDomainEnum)clone);
- }
-
- //
- // IEnumerable interface
- //
- public IEnumerator GetEnumerator ()
- {
- return this;
- }
-
- //
- // IEnumerator interface
- //
- public bool MoveNext ()
- {
- ICorPublishAppDomain a;
- uint c = 0;
- int r = m_enum.Next ((uint) 1, out a, out c);
- if (r==0 && c==1) // S_OK && we got 1 new element
- m_appDomain = new CorPublishAppDomain(a);
- else
- m_appDomain = null;
- return m_appDomain != null;
- }
-
- public void Reset ()
- {
- m_enum.Reset();
- m_appDomain = null;
- }
-
- public Object Current
- {
- get
- {
- return m_appDomain;
- }
- }
-
- private ICorPublishAppDomainEnum m_enum;
- private CorPublishAppDomain m_appDomain;
- }
-}
diff --git a/main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/Extensions/DebuggerExtensions.cs b/main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/Extensions/DebuggerExtensions.cs deleted file mode 100644 index e6411cc4c7..0000000000 --- a/main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/Extensions/DebuggerExtensions.cs +++ /dev/null @@ -1,177 +0,0 @@ -//
-// DebuggerExtensions.cs
-//
-// Author:
-// Therzok <teromario@yahoo.com>
-//
-// Copyright (c) 2013 Xamarin Inc.
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-using System;
-using System.Collections.Generic;
-using System.Runtime.InteropServices;
-using Microsoft.Samples.Debugging.CorDebug;
-using Microsoft.Samples.Debugging.CorDebug.NativeApi;
-using Microsoft.Win32.SafeHandles;
-
-namespace Microsoft.Samples.Debugging.Extensions
-{
- [CLSCompliant (false)]
- public static class DebuggerExtensions
- {
- // [Xamarin] Output redirection.
- public const int CREATE_REDIRECT_STD = 0x40000000;
- const string Kernel32LibraryName = "kernel32.dll";
-
- [
- DllImport (Kernel32LibraryName, CharSet = CharSet.Auto, SetLastError = true)
- ]
- public static extern bool CreatePipe (out SafeFileHandle hReadPipe, out SafeFileHandle hWritePipe, SECURITY_ATTRIBUTES lpPipeAttributes, int nSize);
-
- [
- DllImport (Kernel32LibraryName)
- ]
- public static extern bool DuplicateHandle (
- IntPtr hSourceProcessHandle,
- SafeFileHandle hSourceHandle,
- IntPtr hTargetProcessHandle,
- out SafeFileHandle lpTargetHandle,
- uint dwDesiredAccess,
- bool bInheritHandle,
- uint dwOptions
- );
-
- const uint DUPLICATE_CLOSE_SOURCE = 0x00000001;
- const uint DUPLICATE_SAME_ACCESS = 0x00000002;
-
- [
- DllImport (Kernel32LibraryName)
- ]
- public static extern SafeFileHandle GetStdHandle (uint nStdHandle);
-
- const uint STD_INPUT_HANDLE = unchecked ((uint)-10);
- const uint STD_OUTPUT_HANDLE = unchecked ((uint)-11);
- const uint STD_ERROR_HANDLE = unchecked ((uint)-12);
-
- [
- DllImport (Kernel32LibraryName)
- ]
- public static extern bool ReadFile (
- SafeFileHandle hFile,
- byte[] lpBuffer,
- int nNumberOfBytesToRead,
- out int lpNumberOfBytesRead,
- IntPtr lpOverlapped
- );
-
- [
- DllImport (Kernel32LibraryName, CharSet = CharSet.Auto, SetLastError = true)
- ]
- public static extern IntPtr GetCurrentProcess ();
-
- static void CreateHandles (STARTUPINFO si, out SafeFileHandle outReadPipe, out SafeFileHandle errorReadPipe)
- {
- si.dwFlags |= 0x00000100; /* STARTF_USESTDHANDLES*/
- var sa = new SECURITY_ATTRIBUTES ();
- sa.bInheritHandle = true;
- IntPtr curProc = GetCurrentProcess ();
-
- SafeFileHandle outWritePipe, outReadPipeTmp;
- if (!CreatePipe (out outReadPipeTmp, out outWritePipe, sa, 0))
- throw new Exception ("Pipe creation failed");
-
- // Create the child error pipe.
- SafeFileHandle errorWritePipe, errorReadPipeTmp;
- if (!CreatePipe (out errorReadPipeTmp, out errorWritePipe, sa, 0))
- throw new Exception ("Pipe creation failed");
-
- // Create new output read and error read handles. Set
- // the Properties to FALSE. Otherwise, the child inherits the
- // properties and, as a result, non-closeable handles to the pipes
- // are created.
- if (!DuplicateHandle (curProc, outReadPipeTmp, curProc, out outReadPipe, 0, false, DUPLICATE_SAME_ACCESS))
- throw new Exception ("Pipe creation failed");
- if (!DuplicateHandle (curProc, errorReadPipeTmp, curProc, out errorReadPipe, 0, false, DUPLICATE_SAME_ACCESS))
- throw new Exception ("Pipe creation failed");
-
- NativeMethods.CloseHandle (curProc);
-
- // Close inheritable copies of the handles you do not want to be
- // inherited.
- outReadPipeTmp.Close ();
- errorReadPipeTmp.Close ();
-
- si.hStdInput = GetStdHandle (STD_INPUT_HANDLE);
- si.hStdOutput = outWritePipe;
- si.hStdError = errorWritePipe;
- }
-
- internal static void SetupOutputRedirection (STARTUPINFO si, ref int flags, out SafeFileHandle outReadPipe, out SafeFileHandle errorReadPipe)
- {
- if ((flags & CREATE_REDIRECT_STD) != 0) {
- CreateHandles (si, out outReadPipe, out errorReadPipe);
- flags &= ~CREATE_REDIRECT_STD;
- }
- else {
- outReadPipe = null;
- errorReadPipe = null;
- si.hStdInput = new SafeFileHandle (IntPtr.Zero, false);
- si.hStdOutput = new SafeFileHandle (IntPtr.Zero, false);
- si.hStdError = new SafeFileHandle (IntPtr.Zero, false);
- }
- }
-
- internal static void TearDownOutputRedirection (SafeFileHandle outReadPipe, SafeFileHandle errorReadPipe, STARTUPINFO si, CorProcess ret)
- {
- if (outReadPipe != null) {
- // Close pipe handles (do not continue to modify the parent).
- // You need to make sure that no handles to the write end of the
- // output pipe are maintained in this process or else the pipe will
- // not close when the child process exits and the ReadFile will hang.
-
- si.hStdInput.Close ();
- si.hStdOutput.Close ();
- si.hStdError.Close ();
-
- ret.TrackStdOutput (outReadPipe, errorReadPipe);
- }
- }
-
- internal static IntPtr SetupEnvironment (IDictionary<string, string> environment)
- {
- IntPtr env = IntPtr.Zero;
- if (environment != null) {
- string senv = null;
- foreach (KeyValuePair<string, string> var in environment) {
- senv += var.Key + "=" + var.Value + "\0";
- }
- senv += "\0";
- env = Marshal.StringToHGlobalAnsi (senv);
- }
- return env;
- }
-
- internal static void TearDownEnvironment (IntPtr env)
- {
- if (env != IntPtr.Zero)
- Marshal.FreeHGlobal (env);
- }
- }
-}
-
diff --git a/main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/Extensions/MetadataExtensions.cs b/main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/Extensions/MetadataExtensions.cs deleted file mode 100644 index 7ad5ff110c..0000000000 --- a/main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/Extensions/MetadataExtensions.cs +++ /dev/null @@ -1,402 +0,0 @@ -//
-// MetadataExtensions.cs
-//
-// Author:
-// Lluis Sanchez <lluis@xamarin.com>
-// Therzok <teromario@yahoo.com>
-//
-// Copyright (c) 2013 Xamarin Inc.
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-using System;
-using System.Collections;
-using System.Collections.Generic;
-using System.IO;
-using System.Reflection;
-using System.Runtime.InteropServices;
-using CorApi2.Metadata.Microsoft.Samples.Debugging.CorMetadata;
-using Microsoft.Samples.Debugging.CorDebug.NativeApi;
-using Microsoft.Samples.Debugging.CorMetadata;
-using Microsoft.Samples.Debugging.CorMetadata.NativeApi;
-
-namespace Microsoft.Samples.Debugging.Extensions
-{
- // [Xamarin] Expression evaluator.
- public static class MetadataExtensions
- {
- internal static bool TypeFlagsMatch (bool isPublic, bool isStatic, BindingFlags flags)
- {
- if (isPublic && (flags & BindingFlags.Public) == 0)
- return false;
- if (!isPublic && (flags & BindingFlags.NonPublic) == 0)
- return false;
- if (isStatic && (flags & BindingFlags.Static) == 0)
- return false;
- if (!isStatic && (flags & BindingFlags.Instance) == 0)
- return false;
- return true;
- }
-
- internal static Type MakeDelegate (Type retType, List<Type> argTypes)
- {
- throw new NotImplementedException ();
- }
-
- public static Type MakeArray (Type t, List<int> sizes, List<int> loBounds)
- {
- var mt = t as MetadataType;
- if (mt != null) {
- if (sizes == null) {
- sizes = new List<int> ();
- sizes.Add (1);
- }
- mt.m_arraySizes = sizes;
- mt.m_arrayLoBounds = loBounds;
- return mt;
- }
- if (sizes == null || sizes.Count == 1)
- return t.MakeArrayType ();
- return t.MakeArrayType (sizes.Capacity);
- }
-
- static Type MakeByRefTypeIfNeeded (Type t)
- {
- if (t.IsByRef)
- return t;
- var makeByRefType = t.MakeByRefType ();
- return makeByRefType;
- }
-
- public static Type MakeByRef (Type t)
- {
- var mt = t as MetadataType;
- if (mt != null) {
- mt.m_isByRef = true;
- return mt;
- }
-
- return MakeByRefTypeIfNeeded (t);
- }
-
- public static Type MakePointer (Type t)
- {
- var mt = t as MetadataType;
- if (mt != null) {
- mt.m_isPtr = true;
- return mt;
- }
- return MakeByRefTypeIfNeeded (t);
- }
-
- public static Type MakeGeneric (Type t, List<Type> typeArgs)
- {
- var mt = (MetadataType)t;
- mt.m_typeArgs = typeArgs;
- return mt;
- }
- }
-
- // [Xamarin] Expression evaluator.
- [CLSCompliant (false)]
- public static class MetadataHelperFunctionsExtensions
- {
- public static readonly Dictionary<CorElementType, Type> CoreTypes = new Dictionary<CorElementType, Type> ();
- static MetadataHelperFunctionsExtensions ()
- {
- CoreTypes.Add (CorElementType.ELEMENT_TYPE_BOOLEAN, typeof (bool));
- CoreTypes.Add (CorElementType.ELEMENT_TYPE_CHAR, typeof (char));
- CoreTypes.Add (CorElementType.ELEMENT_TYPE_I1, typeof (sbyte));
- CoreTypes.Add (CorElementType.ELEMENT_TYPE_U1, typeof (byte));
- CoreTypes.Add (CorElementType.ELEMENT_TYPE_I2, typeof (short));
- CoreTypes.Add (CorElementType.ELEMENT_TYPE_U2, typeof (ushort));
- CoreTypes.Add (CorElementType.ELEMENT_TYPE_I4, typeof (int));
- CoreTypes.Add (CorElementType.ELEMENT_TYPE_U4, typeof (uint));
- CoreTypes.Add (CorElementType.ELEMENT_TYPE_I8, typeof (long));
- CoreTypes.Add (CorElementType.ELEMENT_TYPE_U8, typeof (ulong));
- CoreTypes.Add (CorElementType.ELEMENT_TYPE_R4, typeof (float));
- CoreTypes.Add (CorElementType.ELEMENT_TYPE_R8, typeof (double));
- CoreTypes.Add (CorElementType.ELEMENT_TYPE_STRING, typeof (string));
- CoreTypes.Add (CorElementType.ELEMENT_TYPE_I, typeof (IntPtr));
- CoreTypes.Add (CorElementType.ELEMENT_TYPE_U, typeof (UIntPtr));
- }
-
- internal static void ReadMethodSignature (IMetadataImport importer, Instantiation instantiation, ref IntPtr pData, out CorCallingConvention cconv, out Type retType, out List<Type> argTypes, out int sentinelIndex)
- {
- cconv = MetadataHelperFunctions.CorSigUncompressCallingConv (ref pData);
- uint numArgs = 0;
- // FIXME: Use number of <T>s.
- uint types = 0;
- sentinelIndex = -1;
- if ((cconv & CorCallingConvention.Generic) == CorCallingConvention.Generic)
- types = MetadataHelperFunctions.CorSigUncompressData (ref pData);
-
- if (cconv != CorCallingConvention.Field)
- numArgs = MetadataHelperFunctions.CorSigUncompressData (ref pData);
-
- retType = ReadType (importer, instantiation, ref pData);
- argTypes = new List<Type> ();
- for (int n = 0; n < numArgs; n++) {
- CorElementType elemType;
- unsafe {
- var pByte = (byte*) pData;
- var b = *pByte;
- elemType = (CorElementType) b;
-
- if (elemType == CorElementType.ELEMENT_TYPE_SENTINEL) {
- // the case when SENTINEL is presented in a separate position, so we have to increment the pointer
- sentinelIndex = n;
- pData = (IntPtr) (pByte + 1);
- }
- else if ((elemType & CorElementType.ELEMENT_TYPE_SENTINEL) == CorElementType.ELEMENT_TYPE_SENTINEL) {
- // SENTINEL is just a flag on element type, so we haven't to promote the pointer
- sentinelIndex = n;
- }
- }
- argTypes.Add (ReadType (importer, instantiation, ref pData));
- }
- }
-
- static Type ReadType (IMetadataImport importer, Instantiation instantiation, ref IntPtr pData)
- {
- CorElementType et;
- unsafe {
- var pBytes = (byte*)pData;
- et = (CorElementType) (*pBytes);
- pData = (IntPtr) (pBytes + 1);
- }
-
- if ((et & CorElementType.ELEMENT_TYPE_SENTINEL) == CorElementType.ELEMENT_TYPE_SENTINEL) {
- et ^= CorElementType.ELEMENT_TYPE_SENTINEL; // substract SENTINEL bits from element type to get clean ET
- }
-
- switch (et)
- {
- case CorElementType.ELEMENT_TYPE_VOID: return typeof (void);
- case CorElementType.ELEMENT_TYPE_BOOLEAN: return typeof (bool);
- case CorElementType.ELEMENT_TYPE_CHAR: return typeof (char);
- case CorElementType.ELEMENT_TYPE_I1: return typeof (sbyte);
- case CorElementType.ELEMENT_TYPE_U1: return typeof (byte);
- case CorElementType.ELEMENT_TYPE_I2: return typeof (short);
- case CorElementType.ELEMENT_TYPE_U2: return typeof (ushort);
- case CorElementType.ELEMENT_TYPE_I4: return typeof (int);
- case CorElementType.ELEMENT_TYPE_U4: return typeof (uint);
- case CorElementType.ELEMENT_TYPE_I8: return typeof (long);
- case CorElementType.ELEMENT_TYPE_U8: return typeof (ulong);
- case CorElementType.ELEMENT_TYPE_R4: return typeof (float);
- case CorElementType.ELEMENT_TYPE_R8: return typeof (double);
- case CorElementType.ELEMENT_TYPE_STRING: return typeof (string);
- case CorElementType.ELEMENT_TYPE_I: return typeof (IntPtr);
- case CorElementType.ELEMENT_TYPE_U: return typeof (UIntPtr);
- case CorElementType.ELEMENT_TYPE_OBJECT: return typeof (object);
- case CorElementType.ELEMENT_TYPE_TYPEDBYREF: return typeof(TypedReference);
-
- case CorElementType.ELEMENT_TYPE_VAR: {
- var index = MetadataHelperFunctions.CorSigUncompressData (ref pData);
- if (index < instantiation.TypeArgs.Count) {
- return instantiation.TypeArgs[(int) index];
- }
- return new TypeGenericParameter((int) index);
- }
- case CorElementType.ELEMENT_TYPE_MVAR: {
- // Generic args in methods not supported. Return a dummy type.
- var index = MetadataHelperFunctions.CorSigUncompressData (ref pData);
- return new MethodGenericParameter((int) index);
- }
-
- case CorElementType.ELEMENT_TYPE_GENERICINST: {
- Type t = ReadType (importer, instantiation, ref pData);
- var typeArgs = new List<Type> ();
- uint num = MetadataHelperFunctions.CorSigUncompressData (ref pData);
- for (int n=0; n<num; n++) {
- typeArgs.Add (ReadType (importer, instantiation, ref pData));
- }
- return MetadataExtensions.MakeGeneric (t, typeArgs);
- }
-
- case CorElementType.ELEMENT_TYPE_PTR: {
- Type t = ReadType (importer, instantiation, ref pData);
- return MetadataExtensions.MakePointer (t);
- }
-
- case CorElementType.ELEMENT_TYPE_BYREF: {
- Type t = ReadType (importer, instantiation, ref pData);
- return MetadataExtensions.MakeByRef(t);
- }
-
- case CorElementType.ELEMENT_TYPE_END:
- case CorElementType.ELEMENT_TYPE_VALUETYPE:
- case CorElementType.ELEMENT_TYPE_CLASS: {
- uint token = MetadataHelperFunctions.CorSigUncompressToken (ref pData);
- return new MetadataType (importer, (int) token);
- }
-
- case CorElementType.ELEMENT_TYPE_ARRAY: {
- Type t = ReadType (importer, instantiation, ref pData);
- int rank = (int)MetadataHelperFunctions.CorSigUncompressData (ref pData);
- if (rank == 0)
- return MetadataExtensions.MakeArray (t, null, null);
-
- uint numSizes = MetadataHelperFunctions.CorSigUncompressData (ref pData);
- var sizes = new List<int> (rank);
- for (int n = 0; n < numSizes && n < rank; n++)
- sizes.Add ((int)MetadataHelperFunctions.CorSigUncompressData (ref pData));
-
- uint numLoBounds = MetadataHelperFunctions.CorSigUncompressData (ref pData);
- var loBounds = new List<int> (rank);
- for (int n = 0; n < numLoBounds && n < rank; n++)
- loBounds.Add ((int)MetadataHelperFunctions.CorSigUncompressData (ref pData));
-
- return MetadataExtensions.MakeArray (t, sizes, loBounds);
- }
-
- case CorElementType.ELEMENT_TYPE_SZARRAY: {
- Type t = ReadType (importer, instantiation, ref pData);
- return MetadataExtensions.MakeArray (t, null, null);
- }
-
- case CorElementType.ELEMENT_TYPE_FNPTR: {
- CorCallingConvention cconv;
- Type retType;
- List<Type> argTypes;
- int sentinelIndex;
- ReadMethodSignature (importer, instantiation, ref pData, out cconv, out retType, out argTypes, out sentinelIndex);
- return MetadataExtensions.MakeDelegate (retType, argTypes);
- }
-
- case CorElementType.ELEMENT_TYPE_CMOD_REQD:
- case CorElementType.ELEMENT_TYPE_CMOD_OPT: {
- uint token = MetadataHelperFunctions.CorSigUncompressToken (ref pData);
- return new MetadataType (importer, (int) token);
- }
-
- case CorElementType.ELEMENT_TYPE_INTERNAL:
- return typeof(object); // hack to avoid the exceptions. CLR spec says that this type should never occurs, but it occurs sometimes, mystics
-
- case CorElementType.ELEMENT_TYPE_NATIVE_ARRAY_TEMPLATE_ZAPSIG:
- case CorElementType.ELEMENT_TYPE_NATIVE_VALUETYPE_ZAPSIG:
- return ReadType (importer, instantiation, ref pData);
-
- case CorElementType.ELEMENT_TYPE_CANON_ZAPSIG:
- return typeof(object); // this is representation of __Canon type, but it's inaccessible, using object instead
- }
- throw new NotSupportedException ("Unknown sig element type: " + et);
- }
-
- static readonly object[] emptyAttributes = new object[0];
-
- static internal object[] GetDebugAttributes (IMetadataImport importer, int token)
- {
- var attributes = new ArrayList ();
- object attr = GetCustomAttribute (importer, token, typeof (System.Diagnostics.DebuggerTypeProxyAttribute));
- if (attr != null)
- attributes.Add (attr);
- attr = GetCustomAttribute (importer, token, typeof (System.Diagnostics.DebuggerDisplayAttribute));
- if (attr != null)
- attributes.Add (attr);
- attr = GetCustomAttribute (importer, token, typeof (System.Diagnostics.DebuggerBrowsableAttribute));
- if (attr != null)
- attributes.Add (attr);
- attr = GetCustomAttribute (importer, token, typeof (System.Runtime.CompilerServices.CompilerGeneratedAttribute));
- if (attr != null)
- attributes.Add (attr);
- attr = GetCustomAttribute (importer, token, typeof (System.Diagnostics.DebuggerHiddenAttribute));
- if (attr != null)
- attributes.Add (attr);
- attr = GetCustomAttribute (importer, token, typeof (System.Diagnostics.DebuggerStepThroughAttribute));
- if (attr != null)
- attributes.Add (attr);
- attr = GetCustomAttribute (importer, token, typeof (System.Diagnostics.DebuggerNonUserCodeAttribute));
- if (attr != null)
- attributes.Add (attr);
- attr = GetCustomAttribute (importer, token, typeof (System.Diagnostics.DebuggerStepperBoundaryAttribute));
- if (attr != null)
- attributes.Add (attr);
-
- return attributes.Count == 0 ? emptyAttributes : attributes.ToArray ();
- }
-
- // [Xamarin] Expression evaluator.
- static internal object GetCustomAttribute (IMetadataImport importer, int token, Type type)
- {
- uint sigSize;
- IntPtr ppvSig;
- int hr = importer.GetCustomAttributeByName (token, type.FullName, out ppvSig, out sigSize);
- if (hr != 0)
- return null;
-
- var data = new byte[sigSize];
- Marshal.Copy (ppvSig, data, 0, (int)sigSize);
- var br = new BinaryReader (new MemoryStream (data));
-
- // Prolog
- if (br.ReadUInt16 () != 1)
- throw new InvalidOperationException ("Incorrect attribute prolog");
-
- ConstructorInfo ctor = type.GetConstructors ()[0];
- ParameterInfo[] pars = ctor.GetParameters ();
-
- var args = new object[pars.Length];
-
- // Fixed args
- for (int n=0; n<pars.Length; n++)
- args [n] = ReadValue (br, pars[n].ParameterType);
-
- object ob = Activator.CreateInstance (type, args);
-
- // Named args
- uint nargs = br.ReadUInt16 ();
- for (; nargs > 0; nargs--) {
- byte fieldOrProp = br.ReadByte ();
- byte atype = br.ReadByte ();
-
- // Boxed primitive
- if (atype == 0x51)
- atype = br.ReadByte ();
- var et = (CorElementType) atype;
- string pname = br.ReadString ();
- object val = ReadValue (br, CoreTypes [et]);
-
- if (fieldOrProp == 0x53) {
- FieldInfo fi = type.GetField (pname);
- fi.SetValue (ob, val);
- }
- else {
- PropertyInfo pi = type.GetProperty (pname);
- pi.SetValue (ob, val, null);
- }
- }
- return ob;
- }
-
- // [Xamarin] Expression evaluator.
- static object ReadValue (BinaryReader br, Type type)
- {
- if (type.IsEnum) {
- object ob = ReadValue (br, Enum.GetUnderlyingType (type));
- return Enum.ToObject (type, Convert.ToInt64 (ob));
- }
- if (type == typeof (string) || type == typeof(Type))
- return br.ReadString ();
- if (type == typeof (int))
- return br.ReadInt32 ();
- throw new InvalidOperationException ("Can't parse value of type: " + type);
- }
- }
-}
-
diff --git a/main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/Extensions/ProcessExtensions.cs b/main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/Extensions/ProcessExtensions.cs deleted file mode 100644 index 6bbd517df2..0000000000 --- a/main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/Extensions/ProcessExtensions.cs +++ /dev/null @@ -1,114 +0,0 @@ -//
-// ProcessExtensions.cs
-//
-// Author:
-// Lluis Sanchez <lluis@xamarin.com>
-// Therzok <teromario@yahoo.com>
-//
-// Copyright (c) 2013 Xamarin Inc.
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-using System;
-using System.Collections.Generic;
-using System.Threading;
-using Microsoft.Samples.Debugging.CorDebug;
-using Microsoft.Win32.SafeHandles;
-
-namespace Microsoft.Samples.Debugging.Extensions
-{
- // [Xamarin] Output redirection.
- public class CorTargetOutputEventArgs: EventArgs
- {
- public CorTargetOutputEventArgs (string text, bool isStdError)
- {
- Text = text;
- IsStdError = isStdError;
- }
-
- public string Text { get; set; }
-
- public bool IsStdError { get; set; }
- }
-
- public delegate void CorTargetOutputEventHandler (Object sender, CorTargetOutputEventArgs e);
-
- public static class CorProcessExtensions
- {
- internal static void TrackStdOutput (this CorProcess proc, SafeFileHandle outputPipe, SafeFileHandle errorPipe)
- {
- var outputReader = new Thread (delegate () {
- proc.ReadOutput (outputPipe, false);
- });
- outputReader.Name = "Debugger output reader";
- outputReader.IsBackground = true;
- outputReader.Start ();
-
- var errorReader = new Thread (delegate () {
- proc.ReadOutput (errorPipe, true);
- });
- errorReader.Name = "Debugger error reader";
- errorReader.IsBackground = true;
- errorReader.Start ();
- }
-
- // [Xamarin] Output redirection.
- static void ReadOutput (this CorProcess proc, SafeFileHandle pipe, bool isStdError)
- {
- var buffer = new byte[256];
- int nBytesRead;
-
- try {
- while (true) {
- if (!DebuggerExtensions.ReadFile (pipe, buffer, buffer.Length, out nBytesRead, IntPtr.Zero) || nBytesRead == 0)
- break; // pipe done - normal exit path.
-
- string s = System.Text.Encoding.Default.GetString (buffer, 0, nBytesRead);
- List<CorTargetOutputEventHandler> list;
- if (events.TryGetValue(proc, out list))
- foreach (var del in list)
- del(proc, new CorTargetOutputEventArgs(s, isStdError));
- }
- } catch {
- }
- }
-
- public static void RegisterStdOutput (this CorProcess proc, CorTargetOutputEventHandler handler)
- {
- proc.OnProcessExit += delegate {
- RemoveEventsFor (proc);
- };
-
- List<CorTargetOutputEventHandler> list;
- if (!events.TryGetValue (proc, out list))
- list = new List<CorTargetOutputEventHandler> ();
- list.Add (handler);
-
- events [proc] = list;
- }
-
- static void RemoveEventsFor (CorProcess proc)
- {
- events.Remove (proc);
- }
-
- // [Xamarin] Output redirection.
- static readonly Dictionary<CorProcess, List<CorTargetOutputEventHandler>> events = new Dictionary<CorProcess, List<CorTargetOutputEventHandler>> ();
- }
-}
-
diff --git a/main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/Metadata/CorMetadata.cs b/main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/Metadata/CorMetadata.cs deleted file mode 100644 index 0d216a84ec..0000000000 --- a/main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/Metadata/CorMetadata.cs +++ /dev/null @@ -1,861 +0,0 @@ -//---------------------------------------------------------------------
-// This file is part of the CLR Managed Debugger (mdbg) Sample.
-//
-// Copyright (C) Microsoft Corporation. All rights reserved.
-//---------------------------------------------------------------------
-using System;
-using System.Reflection;
-using System.Text;
-using System.Runtime.InteropServices;
-using System.Globalization;
-using System.Collections;
-using System.Diagnostics;
-
-using Microsoft.Samples.Debugging.CorDebug;
-using Microsoft.Samples.Debugging.CorMetadata.NativeApi;
-using Microsoft.Samples.Debugging.CorDebug.NativeApi;
-using Microsoft.Samples.Debugging.Extensions;
-using System.Collections.Generic;
-
-namespace Microsoft.Samples.Debugging.CorMetadata
-{
- public sealed class CorMetadataImport
- {
- public CorMetadataImport(CorModule managedModule)
- {
- m_importer = managedModule.GetMetaDataInterface <IMetadataImport>();
- Debug.Assert(m_importer != null);
- }
-
- public CorMetadataImport(object metadataImport)
- {
- m_importer = (IMetadataImport) metadataImport;
- Debug.Assert(m_importer != null);
- }
-
- // methods
- public MethodInfo GetMethodInfo(int methodToken)
- {
- return new MetadataMethodInfo(m_importer,methodToken, Instantiation.Empty);
- }
-
- public Type GetType(int typeToken)
- {
- return new MetadataType(m_importer,typeToken);
- }
-
-
- // Get number of generic parameters on a given type.
- // Eg, for 'Foo<t, u>', returns 2.
- // for 'Foo', returns 0.
- public int CountGenericParams(int typeToken)
- {
-
- // This may fail in pre V2.0 debuggees.
- //Guid IID_IMetadataImport2 = new Guid("FCE5EFA0-8BBA-4f8e-A036-8F2022B08466");
- if( ! (m_importer is IMetadataImport2) )
- return 0; // this means we're pre v2.0 debuggees.
-
-
- IMetadataImport2 importer2 = (m_importer as IMetadataImport2);
- Debug.Assert( importer2!=null );
-
- int dummy;
- uint dummy2;
- IntPtr hEnum = IntPtr.Zero;
- int count;
- importer2.EnumGenericParams(ref hEnum, typeToken, out dummy, 1, out dummy2);
- try
- {
- m_importer.CountEnum(hEnum, out count);
- }
- finally
- {
- if( hEnum != IntPtr.Zero )
- importer2.CloseEnum(hEnum);
- }
- return count;
- }
-
- // Returns filename of scope, if available.
- // Returns null if filename is not available.
- public string GetScopeFilename()
- {
- int size;
-
- try
- {
- Guid mvid;
- m_importer.GetScopeProps(null, 0, out size, out mvid);
- StringBuilder sb = new StringBuilder(size);
- m_importer.GetScopeProps(sb, sb.Capacity, out size, out mvid);
- sb.Length = size;
- return sb.ToString();
- }
- catch
- {
- return null;
- }
- }
-
- public string GetUserString(int token)
- {
- int size;
- m_importer.GetUserString(token,null,0,out size);
- StringBuilder sb = new StringBuilder(size);
- m_importer.GetUserString(token,sb,sb.Capacity,out size);
- sb.Length=size;
- return sb.ToString();
- }
-
- public const int TokenNotFound = -1;
- public const int TokenGlobalNamespace = 0;
-
- // returns a type token from name
- // when the function fails, we return token TokenNotFound value.
- public int GetTypeTokenFromName(string name)
- {
- int token = CorMetadataImport.TokenNotFound;
- if( name.Length==0 )
- // this is special global type (we'll return token 0)
- token = CorMetadataImport.TokenGlobalNamespace;
- else
- {
- try
- {
- m_importer.FindTypeDefByName(name,0,out token);
- }
- catch(COMException e)
- {
- token=CorMetadataImport.TokenNotFound;
- if((HResult)e.ErrorCode==HResult.CLDB_E_RECORD_NOTFOUND)
- {
- int i = name.LastIndexOfAny(TypeDelimeters);
- if(i>0)
- {
- int parentToken = GetTypeTokenFromName(name.Substring(0,i));
- if( parentToken!=CorMetadataImport.TokenNotFound )
- {
- try
- {
- m_importer.FindTypeDefByName(name.Substring(i+1),parentToken,out token);
- }
- catch(COMException e2)
- {
- token=CorMetadataImport.TokenNotFound;
- if((HResult)e2.ErrorCode!=HResult.CLDB_E_RECORD_NOTFOUND)
- throw;
- }
- }
- }
- }
- else
- throw;
- }
- }
- return token;
- }
-
- public string GetTypeNameFromRef(int token)
- {
- int resScope,size;
- m_importer.GetTypeRefProps(token,out resScope,null,0,out size);
- StringBuilder sb = new StringBuilder(size);
- m_importer.GetTypeRefProps(token,out resScope,sb,sb.Capacity,out size);
- return sb.ToString();
- }
-
- public string GetTypeNameFromDef(int token,out int extendsToken)
- {
- int size;
- TypeAttributes pdwTypeDefFlags;
- m_importer.GetTypeDefProps(token,null,0,out size,
- out pdwTypeDefFlags,out extendsToken);
- StringBuilder sb = new StringBuilder(size);
- m_importer.GetTypeDefProps(token,sb,sb.Capacity,out size,
- out pdwTypeDefFlags,out extendsToken);
- return sb.ToString();
- }
-
-
- public string GetMemberRefName(int token)
- {
- if(!m_importer.IsValidToken((uint)token))
- throw new ArgumentException();
-
- uint size;
- int classToken;
- IntPtr ppvSigBlob;
- int pbSig;
-
- m_importer.GetMemberRefProps((uint)token,
- out classToken,
- null,
- 0,
- out size,
- out ppvSigBlob,
- out pbSig
- );
-
- StringBuilder member = new StringBuilder((int)size);
- m_importer.GetMemberRefProps((uint)token,
- out classToken,
- member,
- member.Capacity,
- out size,
- out ppvSigBlob,
- out pbSig
- );
-
- string className=null;
- switch(TokenUtils.TypeFromToken(classToken))
- {
- default:
- Debug.Assert(false);
- break;
- case CorTokenType.mdtTypeRef:
- className = GetTypeNameFromRef(classToken);
- break;
- case CorTokenType.mdtTypeDef:
- {
- int parentToken;
- className = GetTypeNameFromDef(classToken,out parentToken);
- break;
- }
- }
- return className + "." + member.ToString();
- }
-
-
- public IEnumerable DefinedTypes
- {
- get
- {
- return new TypeDefEnum(this);
- }
- }
-
- public object RawCOMObject
- {
- get
- {
- return m_importer;
- }
- }
-
-
- // properties
-
-
- //////////////////////////////////////////////////////////////////////////////////
- //
- // CorMetadataImport variables
- //
- //////////////////////////////////////////////////////////////////////////////////
-
- internal IMetadataImport m_importer;
- private static readonly char[] TypeDelimeters = new[] {'.', '+'};
- }
-
- //////////////////////////////////////////////////////////////////////////////////
- //
- // MetadataMethodInfo
- //
- //////////////////////////////////////////////////////////////////////////////////
-
- public sealed class MetadataMethodInfo : MethodInfo
- {
- internal MetadataMethodInfo(IMetadataImport importer, int methodToken, Instantiation instantiation)
- {
- if(!importer.IsValidToken((uint)methodToken))
- throw new ArgumentException();
-
- m_importer = importer;
- m_methodToken=methodToken;
-
- int size;
- uint pdwAttr;
- IntPtr ppvSigBlob;
- uint pulCodeRVA,pdwImplFlags;
- uint pcbSigBlob;
-
- m_importer.GetMethodProps((uint)methodToken,
- out m_classToken,
- null,
- 0,
- out size,
- out pdwAttr,
- out ppvSigBlob,
- out pcbSigBlob,
- out pulCodeRVA,
- out pdwImplFlags);
-
- StringBuilder szMethodName = new StringBuilder(size);
- m_importer.GetMethodProps((uint)methodToken,
- out m_classToken,
- szMethodName,
- szMethodName.Capacity,
- out size,
- out pdwAttr,
- out ppvSigBlob,
- out pcbSigBlob,
- out pulCodeRVA,
- out pdwImplFlags);
-
- // [Xamarin] Expression evaluator.
- CorCallingConvention callingConv;
- MetadataHelperFunctionsExtensions.ReadMethodSignature (importer, instantiation, ref ppvSigBlob, out callingConv, out m_retType, out m_argTypes, out m_sentinelIndex);
- m_name = szMethodName.ToString();
- m_methodAttributes = (MethodAttributes)pdwAttr;
- }
-
- // [Xamarin] Expression evaluator.
- public override Type ReturnType
- {
- get
- {
- return m_retType;
- }
- }
-
- public override ICustomAttributeProvider ReturnTypeCustomAttributes
- {
- get
- {
- throw new NotImplementedException();
- }
- }
-
- public override Type ReflectedType
- {
- get
- {
- throw new NotImplementedException();
- }
- }
-
- public override Type DeclaringType
- {
- get
- {
- if(TokenUtils.IsNullToken(m_classToken))
- return null; // this is method outside of class
-
- return new MetadataType(m_importer,m_classToken);
- }
- }
-
- public override string Name
- {
- get
- {
- return m_name;
- }
- }
-
- public override MethodAttributes Attributes
- {
- get
- {
- return m_methodAttributes;
- }
- }
-
- public override RuntimeMethodHandle MethodHandle
- {
- get
- {
- throw new NotImplementedException();
- }
- }
-
- public override MethodInfo GetBaseDefinition()
- {
- throw new NotImplementedException();
- }
-
- // [Xamarin] Expression evaluator.
- public override bool IsDefined (Type attributeType, bool inherit)
- {
- return GetCustomAttributes (attributeType, inherit).Length > 0;
- }
-
- // [Xamarin] Expression evaluator.
- public override object[] GetCustomAttributes (Type attributeType, bool inherit)
- {
- ArrayList list = new ArrayList ();
- foreach (object ob in GetCustomAttributes (inherit)) {
- if (attributeType.IsInstanceOfType (ob))
- list.Add (ob);
- }
- return list.ToArray ();
- }
-
- // [Xamarin] Expression evaluator.
- public override object[] GetCustomAttributes(bool inherit)
- {
- if (m_customAttributes == null)
- m_customAttributes = MetadataHelperFunctionsExtensions.GetDebugAttributes (m_importer, m_methodToken);
- return m_customAttributes;
- }
-
- public override object Invoke(object obj, BindingFlags invokeAttr, Binder binder, object[] parameters, CultureInfo culture)
- {
- throw new NotImplementedException();
- }
-
- public override System.Reflection.MethodImplAttributes GetMethodImplementationFlags()
- {
- throw new NotImplementedException();
- }
-
- // [Xamarin] Expression evaluator.
- public override System.Reflection.ParameterInfo[] GetParameters()
- {
- ArrayList al = new ArrayList();
- IntPtr hEnum = new IntPtr();
- int nArg = 0;
- try
- {
- while(true)
- {
- uint count;
- int paramToken;
- m_importer.EnumParams(ref hEnum,
- m_methodToken, out paramToken,1,out count);
- if(count!=1)
- break;
- // this fixes IndexOutOfRange exception. Sometimes EnumParams gives you a param with position that is out of m_argTypes.Count
- // return typeof(object) for unmatched parameter
- Type argType = nArg < m_argTypes.Count ? m_argTypes[nArg++] : typeof(object);
-
- var mp = new MetadataParameterInfo (m_importer, paramToken, this, argType);
- if (mp.Name != String.Empty)
- al.Add (mp);
- //al.Add(new MetadataParameterInfo(m_importer,paramToken,
- // this,DeclaringType));
- }
- }
- finally
- {
- m_importer.CloseEnum(hEnum);
- }
- return (ParameterInfo[]) al.ToArray(typeof(ParameterInfo));
- }
-
- public override int MetadataToken
- {
- get
- {
- return m_methodToken;
- }
- }
-
- public string[] GetGenericArgumentNames()
- {
- return MetadataHelperFunctions.GetGenericArgumentNames(m_importer,m_methodToken);
- }
-
- public int VarargStartIndex
- {
- get
- {
- return m_sentinelIndex;
- }
- }
-
- private IMetadataImport m_importer;
- private string m_name;
- private int m_classToken;
- private int m_methodToken;
- private MethodAttributes m_methodAttributes;
- // [Xamarin] Expression evaluator.
- private List<Type> m_argTypes;
- private Type m_retType;
- private object[] m_customAttributes;
- private int m_sentinelIndex;
- }
-
- public enum MetadataTokenType
- {
- Module = 0x00000000,
- TypeRef = 0x01000000,
- TypeDef = 0x02000000,
- FieldDef = 0x04000000,
- MethodDef = 0x06000000,
- ParamDef = 0x08000000,
- InterfaceImpl = 0x09000000,
- MemberRef = 0x0a000000,
- CustomAttribute = 0x0c000000,
- Permission = 0x0e000000,
- Signature = 0x11000000,
- Event = 0x14000000,
- Property = 0x17000000,
- ModuleRef = 0x1a000000,
- TypeSpec = 0x1b000000,
- Assembly = 0x20000000,
- AssemblyRef = 0x23000000,
- File = 0x26000000,
- ExportedType = 0x27000000,
- ManifestResource = 0x28000000,
- GenericPar = 0x2a000000,
- MethodSpec = 0x2b000000,
- String = 0x70000000,
- Name = 0x71000000,
- BaseType = 0x72000000,
- Invalid = 0x7FFFFFFF,
- }
-
- public enum CorCallingConvention
- {
- Default = 0x0,
-
- VarArg = 0x5,
- Field = 0x6,
- LocalSig = 0x7,
- Property = 0x8,
- Unmanaged = 0x9,
- GenericInst = 0xa, // generic method instantiation
- NativeVarArg = 0xb, // used ONLY for 64bit vararg PInvoke calls
-
- // The high bits of the calling convention convey additional info
- Mask = 0x0f, // Calling convention is bottom 4 bits
- HasThis = 0x20, // Top bit indicates a 'this' parameter
- ExplicitThis = 0x40, // This parameter is explicitly in the signature
- Generic = 0x10, // Generic method sig with explicit number of type arguments (precedes ordinary parameter count)
- };
-
-
-
-
- // Struct isn't complete yet; just here for the IsTokenOfType method
-
- public struct MetadataToken
- {
- public MetadataToken(int value)
- {
- this.value = value;
- }
-
- public int Value
- {
- get
- {
- return value;
- }
- }
-
- public MetadataTokenType Type
- {
- get
- {
- return (MetadataTokenType)(value & 0xFF000000);
- }
- }
-
- public int Index
- {
- get
- {
- return value & 0x00FFFFFF;
- }
- }
-
- public static implicit operator int(MetadataToken token) { return token.value; }
- public static bool operator==(MetadataToken v1, MetadataToken v2) { return (v1.value == v2.value);}
- public static bool operator!=(MetadataToken v1, MetadataToken v2) { return !(v1 == v2);}
-
- public static bool IsTokenOfType(int token, params MetadataTokenType[] types)
- {
- for (int i = 0; i < types.Length; i++)
- {
- if ((int)(token & 0xFF000000) == (int)types[i])
- return true;
- }
-
- return false;
- }
-
- public bool IsOfType(params MetadataTokenType[] types) { return IsTokenOfType(Value, types); }
-
- public override bool Equals(object other)
- {
- if (other is MetadataToken)
- {
- MetadataToken oToken = (MetadataToken)other;
- return (value == oToken.value);
- }
- return false;
- }
-
- public override int GetHashCode() { return value.GetHashCode();}
-
- private int value;
- }
-
- static class MetadataHelperFunctions
- {
- private static uint TokenFromRid(uint rid, uint tktype) {return (rid) | (tktype);}
-
- // The below have been translated manually from the inline C++ helpers in cor.h
-
- internal static uint CorSigUncompressBigData(
- ref IntPtr pData) // [IN,OUT] compressed data
- {
- unsafe
- {
- byte *pBytes = (byte*)pData;
- uint res;
-
- // 1 byte data is handled in CorSigUncompressData
- // Debug.Assert(*pBytes & 0x80);
-
- // Medium.
- if ((*pBytes & 0xC0) == 0x80) // 10?? ????
- {
- res = (uint)((*pBytes++ & 0x3f) << 8);
- res |= *pBytes++;
- }
- else // 110? ????
- {
- res = (uint)(*pBytes++ & 0x1f) << 24;
- res |= (uint)(*pBytes++) << 16;
- res |= (uint)(*pBytes++) << 8;
- res |= (uint)(*pBytes++);
- }
-
- pData = (IntPtr)pBytes;
- return res;
- }
- }
-
- internal static uint CorSigUncompressData(
- ref IntPtr pData) // [IN,OUT] compressed data
- {
- unsafe
- {
- byte *pBytes = (byte*)pData;
-
- // Handle smallest data inline.
- if ((*pBytes & 0x80) == 0x00) // 0??? ????
- {
- uint retval = (uint)(*pBytes++);
- pData = (IntPtr)pBytes;
- return retval;
- }
- return CorSigUncompressBigData(ref pData);
- }
- }
-
-// Function translated directly from cor.h but never tested; included here in case someone wants to use it in future
-/* internal static uint CorSigUncompressData( // return number of bytes of that compressed data occupied in pData
- IntPtr pData, // [IN] compressed data
- out uint pDataOut) // [OUT] the expanded *pData
- {
- unsafe
- {
- uint cb = 0xffffffff;
- byte *pBytes = (byte*)(pData);
- pDataOut = 0;
-
- // Smallest.
- if ((*pBytes & 0x80) == 0x00) // 0??? ????
- {
- pDataOut = *pBytes;
- cb = 1;
- }
- // Medium.
- else if ((*pBytes & 0xC0) == 0x80) // 10?? ????
- {
- pDataOut = (uint)(((*pBytes & 0x3f) << 8 | *(pBytes+1)));
- cb = 2;
- }
- else if ((*pBytes & 0xE0) == 0xC0) // 110? ????
- {
- pDataOut = (uint)(((*pBytes & 0x1f) << 24 | *(pBytes+1) << 16 | *(pBytes+2) << 8 | *(pBytes+3)));
- cb = 4;
- }
- return cb;
- }
- }*/
-
- static uint[] g_tkCorEncodeToken ={(uint)MetadataTokenType.TypeDef, (uint)MetadataTokenType.TypeRef, (uint)MetadataTokenType.TypeSpec, (uint)MetadataTokenType.BaseType};
-
- // uncompress a token
- internal static uint CorSigUncompressToken( // return the token.
- ref IntPtr pData) // [IN,OUT] compressed data
- {
- uint tk;
- uint tkType;
-
- tk = CorSigUncompressData(ref pData);
- tkType = g_tkCorEncodeToken[tk & 0x3];
- tk = TokenFromRid(tk >> 2, tkType);
- return tk;
- }
-
-
-// Function translated directly from cor.h but never tested; included here in case someone wants to use it in future
-/* internal static uint CorSigUncompressToken( // return number of bytes of that compressed data occupied in pData
- IntPtr pData, // [IN] compressed data
- out uint pToken) // [OUT] the expanded *pData
- {
- uint cb;
- uint tk;
- uint tkType;
-
- cb = CorSigUncompressData(pData, out tk);
- tkType = g_tkCorEncodeToken[tk & 0x3];
- tk = TokenFromRid(tk >> 2, tkType);
- pToken = tk;
- return cb;
- }*/
-
- internal static CorCallingConvention CorSigUncompressCallingConv(
- ref IntPtr pData) // [IN,OUT] compressed data
- {
- unsafe
- {
- byte *pBytes = (byte*) pData;
- CorCallingConvention retval = (CorCallingConvention)(*pBytes++);
- pData = (IntPtr)pBytes;
- return retval;
- }
- }
-
-// Function translated directly from cor.h but never tested; included here in case someone wants to use it in future
-/* private enum SignMasks : uint {
- ONEBYTE = 0xffffffc0, // Mask the same size as the missing bits.
- TWOBYTE = 0xffffe000, // Mask the same size as the missing bits.
- FOURBYTE = 0xf0000000, // Mask the same size as the missing bits.
- };
-
- // uncompress a signed integer
- internal static uint CorSigUncompressSignedInt( // return number of bytes of that compressed data occupied in pData
- IntPtr pData, // [IN] compressed data
- out int pInt) // [OUT] the expanded *pInt
- {
- uint cb;
- uint ulSigned;
- uint iData;
-
- cb = CorSigUncompressData(pData, out iData);
- pInt = 0;
- if (cb == 0xffffffff) return cb;
- ulSigned = iData & 0x1;
- iData = iData >> 1;
- if (ulSigned != 0)
- {
- if (cb == 1)
- {
- iData |= (uint)SignMasks.ONEBYTE;
- }
- else if (cb == 2)
- {
- iData |= (uint)SignMasks.TWOBYTE;
- }
- else
- {
- iData |= (uint)SignMasks.FOURBYTE;
- }
- }
- pInt = (int)iData;
- return cb;
- }*/
-
-
- // uncompress encoded element type
- internal static CorElementType CorSigUncompressElementType(//Element type
- ref IntPtr pData) // [IN,OUT] compressed data
- {
- unsafe
- {
- byte *pBytes = (byte*)pData;
-
- CorElementType retval = (CorElementType)(*pBytes++);
- pData = (IntPtr)pBytes;
- return retval;
- }
- }
-
-// Function translated directly from cor.h but never tested; included here in case someone wants to use it in future
-/* internal static uint CorSigUncompressElementType(// return number of bytes of that compressed data occupied in pData
- IntPtr pData, // [IN] compressed data
- out CorElementType pElementType) // [OUT] the expanded *pData
- {
- unsafe
- {
- byte *pBytes = (byte*)pData;
- pElementType = (CorElementType)(*pBytes & 0x7f);
- return 1;
- }
- }*/
-
- static internal string[] GetGenericArgumentNames(IMetadataImport importer,
- int typeOrMethodToken)
- {
- IMetadataImport2 importer2 = (importer as IMetadataImport2);
- if(importer2 == null)
- return new string[0]; // this means we're pre v2.0 debuggees.
-
- Debug.Assert( importer2!=null );
-
- string[] genargs = null;
-
- IntPtr hEnum = IntPtr.Zero;
- try{
- int i=0;
- do{
- uint nOut;
- int genTypeToken;
- importer2.EnumGenericParams(ref hEnum, typeOrMethodToken,
- out genTypeToken, 1, out nOut);
- if( genargs==null )
- {
- int count;
- importer.CountEnum(hEnum, out count);
- genargs = new string[count];
- }
- if( nOut==0 )
- break;
-
- Debug.Assert( nOut==1 );
- if( nOut==1 )
- {
- uint genIndex;
- int genFlags, ptkOwner, ptkKind;
- ulong genArgNameSize;
-
- importer2.GetGenericParamProps(genTypeToken,
- out genIndex,
- out genFlags,
- out ptkOwner,
- out ptkKind,
- null,
- 0,
- out genArgNameSize);
- StringBuilder genArgName = new StringBuilder((int)genArgNameSize);
- importer2.GetGenericParamProps(genTypeToken,
- out genIndex,
- out genFlags,
- out ptkOwner,
- out ptkKind,
- genArgName,
- (ulong)genArgName.Capacity,
- out genArgNameSize);
-
- genargs[i] = genArgName.ToString();
- }
- ++i;
- } while( i<genargs.Length );
- }
- finally
- {
- if( hEnum != IntPtr.Zero )
- importer2.CloseEnum(hEnum);
- }
- return genargs;
- }
- }
-
-} // namspace Microsoft.Debugger.MetadataWrapper
diff --git a/main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/Metadata/GenericParameter.cs b/main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/Metadata/GenericParameter.cs deleted file mode 100644 index 8c3640dcfe..0000000000 --- a/main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/Metadata/GenericParameter.cs +++ /dev/null @@ -1,209 +0,0 @@ -using System;
-using System.Globalization;
-using System.Reflection;
-
-namespace CorApi2.Metadata
-{
- namespace Microsoft.Samples.Debugging.CorMetadata
- {
- public class MethodGenericParameter : GenericParameter
- {
- public MethodGenericParameter (int index) : base (index)
- {
- }
- }
-
-
- public class TypeGenericParameter : GenericParameter
- {
- public TypeGenericParameter (int index) : base (index)
- {
- }
- }
-
- public abstract class GenericParameter : Type
- {
- public int Index { get; private set; }
-
- public GenericParameter (int index)
- {
- Index = index;
- }
-
- public override Type MakeByRefType ()
- {
- return this;
- }
-
- public override Type MakePointerType ()
- {
- return this;
- }
-
- public override Type MakeArrayType ()
- {
- return this;
- }
-
- public override Type MakeArrayType (int rank)
- {
- return this;
- }
-
- public override Type MakeGenericType (params Type[] typeArguments)
- {
- return this;
- }
-
- public override object[] GetCustomAttributes (bool inherit)
- {
- return new object[0];
- }
-
- public override bool IsDefined (Type attributeType, bool inherit)
- {
- return false;
- }
-
- public override ConstructorInfo[] GetConstructors (BindingFlags bindingAttr)
- {
- throw new NotImplementedException ();
- }
-
- public override Type GetInterface (string name, bool ignoreCase)
- {
- return null;
- }
-
- public override Type[] GetInterfaces ()
- {
- return EmptyTypes;
- }
-
- public override EventInfo GetEvent (string name, BindingFlags bindingAttr)
- {
- return null;
- }
-
- public override EventInfo[] GetEvents (BindingFlags bindingAttr)
- {
- return new EventInfo[0];
- }
-
- public override Type[] GetNestedTypes (BindingFlags bindingAttr)
- {
- return EmptyTypes;
- }
-
- public override Type GetNestedType (string name, BindingFlags bindingAttr)
- {
- return null;
- }
-
- public override Type GetElementType ()
- {
- return null;
- }
-
- protected override bool HasElementTypeImpl ()
- {
- return false;
- }
-
- protected override PropertyInfo GetPropertyImpl (string name, BindingFlags bindingAttr, Binder binder,
- Type returnType, Type[] types, ParameterModifier[] modifiers)
- {
- return null;
- }
-
- public override PropertyInfo[] GetProperties (BindingFlags bindingAttr)
- {
- return new PropertyInfo[0];
- }
-
- protected override MethodInfo GetMethodImpl (string name, BindingFlags bindingAttr, Binder binder,
- CallingConventions callConvention, Type[] types, ParameterModifier[] modifiers)
- {
- return null;
- }
-
- public override MethodInfo[] GetMethods (BindingFlags bindingAttr)
- {
- return new MethodInfo[0];
- }
-
- public override FieldInfo GetField (string name, BindingFlags bindingAttr)
- {
- return null;
- }
-
- public override FieldInfo[] GetFields (BindingFlags bindingAttr)
- {
- return new FieldInfo[0];
- }
-
- public override MemberInfo[] GetMembers (BindingFlags bindingAttr)
- {
- return new MemberInfo[0];
- }
-
- protected override TypeAttributes GetAttributeFlagsImpl ()
- {
- throw new NotImplementedException ();
- }
-
- protected override bool IsArrayImpl ()
- {
- return false;
- }
-
- protected override bool IsByRefImpl ()
- {
- return false;
- }
-
- protected override bool IsPointerImpl ()
- {
- return false;
- }
-
- protected override bool IsPrimitiveImpl ()
- {
- return false;
- }
-
- protected override bool IsCOMObjectImpl ()
- {
- return false;
- }
-
- public override object InvokeMember (string name, BindingFlags invokeAttr, Binder binder, object target,
- object[] args, ParameterModifier[] modifiers, CultureInfo culture, string[] namedParameters)
- {
- throw new NotImplementedException ();
- }
-
- public override Type UnderlyingSystemType { get { throw new NotImplementedException (); } }
-
- protected override ConstructorInfo GetConstructorImpl (BindingFlags bindingAttr, Binder binder, CallingConventions callConvention, Type[] types, ParameterModifier[] modifiers)
- {
- throw new NotImplementedException ();
- }
-
- public override string Name { get { return string.Format("`{0}", Index); }}
- public override Guid GUID { get {return Guid.Empty;}}
- public override Module Module { get {throw new NotImplementedException ();} }
- public override Assembly Assembly { get { throw new NotImplementedException (); } }
- public override string FullName { get { return Name; }}
- public override string Namespace { get {throw new NotImplementedException ();} }
-
- public override string AssemblyQualifiedName { get { throw new NotImplementedException (); }}
- public override Type BaseType { get {throw new NotImplementedException ();} }
-
- public override object[] GetCustomAttributes (Type attributeType, bool inherit)
- {
- return new object[0];
- }
- }
- }
-}
\ No newline at end of file diff --git a/main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/Metadata/MetadataFieldInfo.cs b/main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/Metadata/MetadataFieldInfo.cs deleted file mode 100644 index 64c7f01b0b..0000000000 --- a/main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/Metadata/MetadataFieldInfo.cs +++ /dev/null @@ -1,251 +0,0 @@ -//---------------------------------------------------------------------
-// This file is part of the CLR Managed Debugger (mdbg) Sample.
-//
-// Copyright (C) Microsoft Corporation. All rights reserved.
-//---------------------------------------------------------------------
-using System;
-using System.Reflection;
-using System.Collections;
-using System.Text;
-using System.Runtime.InteropServices;
-using System.Globalization;
-using System.Diagnostics;
-
-using Microsoft.Samples.Debugging.CorDebug;
-using Microsoft.Samples.Debugging.CorMetadata.NativeApi;
-using Microsoft.Samples.Debugging.CorDebug.NativeApi;
-using Microsoft.Samples.Debugging.Extensions;
-
-namespace Microsoft.Samples.Debugging.CorMetadata
-{
- public sealed class MetadataFieldInfo : FieldInfo
- {
- internal MetadataFieldInfo(IMetadataImport importer,int fieldToken, MetadataType declaringType)
- {
- m_importer = importer;
- m_fieldToken = fieldToken;
- m_declaringType = declaringType;
-
- // Initialize
- int mdTypeDef;
- int pchField,pcbSigBlob,pdwCPlusTypeFlab,pcchValue, pdwAttr;
- IntPtr ppvSigBlob;
- IntPtr ppvRawValue;
- m_importer.GetFieldProps(m_fieldToken,
- out mdTypeDef,
- null,
- 0,
- out pchField,
- out pdwAttr,
- out ppvSigBlob,
- out pcbSigBlob,
- out pdwCPlusTypeFlab,
- out ppvRawValue,
- out pcchValue
- );
-
- StringBuilder szField = new StringBuilder(pchField);
- m_importer.GetFieldProps(m_fieldToken,
- out mdTypeDef,
- szField,
- szField.Capacity,
- out pchField,
- out pdwAttr,
- out ppvSigBlob,
- out pcbSigBlob,
- out pdwCPlusTypeFlab,
- out ppvRawValue,
- out pcchValue
- );
- m_fieldAttributes = (FieldAttributes)pdwAttr;
- m_name = szField.ToString();
-
- // Get the values for static literal fields with primitive types
- FieldAttributes staticLiteralField = FieldAttributes.Static | FieldAttributes.HasDefault | FieldAttributes.Literal;
- if ((m_fieldAttributes & staticLiteralField) == staticLiteralField)
- {
- m_value = ParseDefaultValue(declaringType,ppvSigBlob,ppvRawValue);
- }
- // [Xamarin] Expression evaluator.
- MetadataHelperFunctionsExtensions.GetCustomAttribute (m_importer, m_fieldToken, typeof (DebuggerBrowsableAttribute));
- }
-
- private static object ParseDefaultValue(MetadataType declaringType, IntPtr ppvSigBlob, IntPtr ppvRawValue)
- {
- IntPtr ppvSigTemp = ppvSigBlob;
- CorCallingConvention callingConv = MetadataHelperFunctions.CorSigUncompressCallingConv(ref ppvSigTemp);
- Debug.Assert(callingConv == CorCallingConvention.Field);
-
- CorElementType elementType = MetadataHelperFunctions.CorSigUncompressElementType(ref ppvSigTemp);
- if (elementType == CorElementType.ELEMENT_TYPE_VALUETYPE)
- {
- uint token = MetadataHelperFunctions.CorSigUncompressToken(ref ppvSigTemp);
-
- if (token == declaringType.MetadataToken)
- {
- // Static literal field of the same type as the enclosing type
- // may be one of the value fields of an enum
- if (declaringType.ReallyIsEnum)
- {
- // If so, the value will be of the enum's underlying type,
- // so we change it from VALUETYPE to be that type so that
- // the following code will get the value
- elementType = declaringType.EnumUnderlyingType;
- }
- }
- }
-
- switch (elementType)
- {
- case CorElementType.ELEMENT_TYPE_CHAR:
- return (char)Marshal.ReadByte(ppvRawValue);
- case CorElementType.ELEMENT_TYPE_I1:
- return (sbyte)Marshal.ReadByte(ppvRawValue);
- case CorElementType.ELEMENT_TYPE_U1:
- return Marshal.ReadByte(ppvRawValue);
- case CorElementType.ELEMENT_TYPE_I2:
- return Marshal.ReadInt16(ppvRawValue);
- case CorElementType.ELEMENT_TYPE_U2:
- return (ushort)Marshal.ReadInt16(ppvRawValue);
- case CorElementType.ELEMENT_TYPE_I4:
- return Marshal.ReadInt32(ppvRawValue);
- case CorElementType.ELEMENT_TYPE_U4:
- return (uint)Marshal.ReadInt32(ppvRawValue);
- case CorElementType.ELEMENT_TYPE_I8:
- return Marshal.ReadInt64(ppvRawValue);
- case CorElementType.ELEMENT_TYPE_U8:
- return (ulong)Marshal.ReadInt64(ppvRawValue);
- case CorElementType.ELEMENT_TYPE_I:
- return Marshal.ReadIntPtr(ppvRawValue);
- case CorElementType.ELEMENT_TYPE_U:
- case CorElementType.ELEMENT_TYPE_R4:
- case CorElementType.ELEMENT_TYPE_R8:
- // Technically U and the floating-point ones are options in the CLI, but not in the CLS or C#, so these are NYI
- default:
- return null;
- }
- }
-
- public override Object GetValue(Object obj)
- {
- FieldAttributes staticLiteralField = FieldAttributes.Static | FieldAttributes.HasDefault | FieldAttributes.Literal;
- if ((m_fieldAttributes & staticLiteralField) != staticLiteralField)
- {
- throw new InvalidOperationException("Field is not a static literal field.");
- }
- if (m_value == null)
- {
- throw new NotImplementedException("GetValue not implemented for the given field type.");
- }
- else
- {
- return m_value;
- }
- }
-
- public override void SetValue(Object obj, Object value,BindingFlags invokeAttr,Binder binder,CultureInfo culture)
- {
- throw new NotImplementedException();
- }
-
- // [Xamarin] Expression evaluator.
- public override object[] GetCustomAttributes (bool inherit)
- {
- if (m_customAttributes == null)
- m_customAttributes = MetadataHelperFunctionsExtensions.GetDebugAttributes (m_importer, m_fieldToken);
- return m_customAttributes;
- }
-
- // [Xamarin] Expression evaluator.
- public override object[] GetCustomAttributes (Type attributeType, bool inherit)
- {
- ArrayList list = new ArrayList ();
- foreach (object ob in GetCustomAttributes (inherit)) {
- if (attributeType.IsInstanceOfType (ob))
- list.Add (ob);
- }
- return list.ToArray ();
- }
-
- // [Xamarin] Expression evaluator.
- public override bool IsDefined (Type attributeType, bool inherit)
- {
- return GetCustomAttributes (attributeType, inherit).Length > 0;
- }
-
-
- public override Type FieldType
- {
- get
- {
- throw new NotImplementedException();
- }
- }
-
- public override RuntimeFieldHandle FieldHandle
- {
- get
- {
- throw new NotImplementedException();
- }
- }
-
- public override FieldAttributes Attributes
- {
- get
- {
- return m_fieldAttributes;
- }
- }
-
- public override MemberTypes MemberType
- {
- get
- {
- throw new NotImplementedException();
- }
- }
-
- public override String Name
- {
- get
- {
- return m_name;
- }
- }
-
- public override Type DeclaringType
- {
- get
- {
- throw new NotImplementedException();
- }
- }
-
- public override Type ReflectedType
- {
- get
- {
- throw new NotImplementedException();
- }
- }
-
- public override int MetadataToken
- {
- get
- {
- return m_fieldToken;
- }
- }
-
- private IMetadataImport m_importer;
- private int m_fieldToken;
- private MetadataType m_declaringType;
-
- private string m_name;
- private FieldAttributes m_fieldAttributes;
- private Object m_value;
- // [Xamarin] Expression evaluator.
- private object[] m_customAttributes;
- }
-}
diff --git a/main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/Metadata/MetadataParameterInfo.cs b/main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/Metadata/MetadataParameterInfo.cs deleted file mode 100644 index 4eda1940af..0000000000 --- a/main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/Metadata/MetadataParameterInfo.cs +++ /dev/null @@ -1,81 +0,0 @@ -//---------------------------------------------------------------------
-// This file is part of the CLR Managed Debugger (mdbg) Sample.
-//
-// Copyright (C) Microsoft Corporation. All rights reserved.
-//---------------------------------------------------------------------
-using System;
-using System.Reflection;
-using System.Collections;
-using System.Text;
-using System.Runtime.InteropServices;
-using System.Runtime.Serialization;
-using System.Globalization;
-using System.Diagnostics;
-
-using Microsoft.Samples.Debugging.CorDebug;
-using Microsoft.Samples.Debugging.CorMetadata.NativeApi;
-
-namespace Microsoft.Samples.Debugging.CorMetadata
-{
- public sealed class MetadataParameterInfo : ParameterInfo
- {
- internal MetadataParameterInfo(IMetadataImport importer,int paramToken,
- MemberInfo memberImpl,Type typeImpl)
- {
- int parentToken;
- uint pulSequence,pdwAttr,pdwCPlusTypeFlag,pcchValue,size;
-
- IntPtr ppValue;
- importer.GetParamProps(paramToken,
- out parentToken,
- out pulSequence,
- null,
- 0,
- out size,
- out pdwAttr,
- out pdwCPlusTypeFlag,
- out ppValue,
- out pcchValue
- );
- StringBuilder szName = new StringBuilder((int)size);
- importer.GetParamProps(paramToken,
- out parentToken,
- out pulSequence,
- szName,
- (uint)szName.Capacity,
- out size,
- out pdwAttr,
- out pdwCPlusTypeFlag,
- out ppValue,
- out pcchValue
- );
- NameImpl = szName.ToString();
- ClassImpl = typeImpl;
- PositionImpl = (int)pulSequence;
- AttrsImpl = (ParameterAttributes)pdwAttr;
-
- MemberImpl=memberImpl;
- }
-
- private MetadataParameterInfo(SerializationInfo info, StreamingContext context)
- {
-
- }
-
- public override String Name
- {
- get
- {
- return NameImpl;
- }
- }
-
- public override int Position
- {
- get
- {
- return PositionImpl;
- }
- }
- }
-}
diff --git a/main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/Metadata/MetadataPropertyInfo.cs b/main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/Metadata/MetadataPropertyInfo.cs deleted file mode 100644 index b8e990c267..0000000000 --- a/main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/Metadata/MetadataPropertyInfo.cs +++ /dev/null @@ -1,203 +0,0 @@ -using System;
-using System.Collections;
-using System.Collections.Generic;
-using System.Text;
-using System.Reflection;
-
-using Microsoft.Samples.Debugging.CorDebug;
-using Microsoft.Samples.Debugging.CorMetadata.NativeApi;
-using Microsoft.Samples.Debugging.CorDebug.NativeApi;
-using Microsoft.Samples.Debugging.Extensions;
-
-namespace Microsoft.Samples.Debugging.CorMetadata
-{
- public class MetadataPropertyInfo: PropertyInfo
- {
- private IMetadataImport m_importer;
- private int m_propertyToken;
- private MetadataType m_declaringType;
- private object[] m_customAttributes;
-
- private string m_name;
- private PropertyAttributes m_propAttributes;
-
- int m_pmdSetter;
- int m_pmdGetter;
-
- MetadataMethodInfo m_setter;
- MetadataMethodInfo m_getter;
-
- internal MetadataPropertyInfo (IMetadataImport importer, int propertyToken, MetadataType declaringType)
- {
- m_importer = importer;
- m_propertyToken = propertyToken;
- m_declaringType = declaringType;
-
- int mdTypeDef;
- int pchProperty;
- int pdwPropFlags;
- IntPtr ppvSig;
- int pbSig;
- int pdwCPlusTypeFlag;
- IntPtr ppDefaultValue;
- int pcchDefaultValue;
- int rmdOtherMethod;
- int pcOtherMethod;
-
- m_importer.GetPropertyProps (
- m_propertyToken,
- out mdTypeDef,
- null,
- 0,
- out pchProperty,
- out pdwPropFlags,
- out ppvSig,
- out pbSig,
- out pdwCPlusTypeFlag,
- out ppDefaultValue,
- out pcchDefaultValue,
- out m_pmdSetter,
- out m_pmdGetter,
- out rmdOtherMethod,
- 0,
- out pcOtherMethod);
-
- StringBuilder szProperty = new StringBuilder (pchProperty);
- m_importer.GetPropertyProps (
- m_propertyToken,
- out mdTypeDef,
- szProperty,
- pchProperty,
- out pchProperty,
- out pdwPropFlags,
- out ppvSig,
- out pbSig,
- out pdwCPlusTypeFlag,
- out ppDefaultValue,
- out pcchDefaultValue,
- out m_pmdSetter,
- out m_pmdGetter,
- out rmdOtherMethod,
- 0,
- out pcOtherMethod);
-
- m_propAttributes = (PropertyAttributes) pdwPropFlags;
- m_name = szProperty.ToString ();
- MetadataHelperFunctionsExtensions.GetCustomAttribute (importer, propertyToken, typeof (System.Diagnostics.DebuggerBrowsableAttribute));
-
- if (!m_importer.IsValidToken ((uint)m_pmdGetter))
- m_pmdGetter = 0;
-
- if (!m_importer.IsValidToken ((uint)m_pmdSetter))
- m_pmdSetter = 0;
- }
-
- public override PropertyAttributes Attributes
- {
- get { return m_propAttributes; }
- }
-
- public override bool CanRead
- {
- get { return m_pmdGetter != 0; }
- }
-
- public override bool CanWrite
- {
- get { return m_pmdSetter != 0; }
- }
-
- public override MethodInfo[] GetAccessors (bool nonPublic)
- {
- throw new NotImplementedException ();
- }
-
- public override MethodInfo GetGetMethod (bool nonPublic)
- {
- if (m_pmdGetter == 0)
- return null;
-
- if (m_getter == null)
- m_getter = new MetadataMethodInfo (m_importer, m_pmdGetter, Instantiation.Empty);
-
- if (nonPublic || m_getter.IsPublic)
- return m_getter;
- return null;
- }
-
- public override ParameterInfo[] GetIndexParameters ( )
- {
- MethodInfo mi = GetGetMethod ();
- if (mi == null)
- return new ParameterInfo[0];
- return mi.GetParameters ();
- }
-
- public override MethodInfo GetSetMethod (bool nonPublic)
- {
- if (m_pmdSetter == 0)
- return null;
-
- if (m_setter == null)
- m_setter = new MetadataMethodInfo (m_importer, m_pmdSetter, Instantiation.Empty);
-
- if (nonPublic || m_setter.IsPublic)
- return m_setter;
- return null;
- }
-
- public override object GetValue (object obj, BindingFlags invokeAttr, Binder binder, object[] index, System.Globalization.CultureInfo culture)
- {
- throw new NotImplementedException ();
- }
-
- public override Type PropertyType
- {
- get { throw new NotImplementedException (); }
- }
-
- public override void SetValue (object obj, object value, BindingFlags invokeAttr, Binder binder, object[] index, System.Globalization.CultureInfo culture)
- {
- throw new NotImplementedException ();
- }
-
- public override Type DeclaringType
- {
- get {
- return m_declaringType;
- }
- }
-
- public override bool IsDefined (Type attributeType, bool inherit)
- {
- return GetCustomAttributes (attributeType, inherit).Length > 0;
- }
-
- public override object[] GetCustomAttributes (Type attributeType, bool inherit)
- {
- ArrayList list = new ArrayList ();
- foreach (object ob in GetCustomAttributes (inherit)) {
- if (attributeType.IsInstanceOfType (ob))
- list.Add (ob);
- }
- return list.ToArray ();
- }
-
- public override object[] GetCustomAttributes (bool inherit)
- {
- if (m_customAttributes == null)
- m_customAttributes = MetadataHelperFunctionsExtensions.GetDebugAttributes (m_importer, m_propertyToken);
- return m_customAttributes;
- }
-
- public override string Name
- {
- get { return m_name; }
- }
-
- public override Type ReflectedType
- {
- get { throw new NotImplementedException (); }
- }
- }
-}
diff --git a/main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/Metadata/MetadataType.cs b/main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/Metadata/MetadataType.cs deleted file mode 100644 index 8a88a8f48f..0000000000 --- a/main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/Metadata/MetadataType.cs +++ /dev/null @@ -1,836 +0,0 @@ -//---------------------------------------------------------------------
-// This file is part of the CLR Managed Debugger (mdbg) Sample.
-//
-// Copyright (C) Microsoft Corporation. All rights reserved.
-//---------------------------------------------------------------------
-using System;
-using System.Reflection;
-using System.Collections;
-using System.Collections.Generic;
-using System.Text;
-using System.Runtime.InteropServices;
-using System.Globalization;
-using System.Diagnostics;
-
-using Microsoft.Samples.Debugging.CorDebug;
-using Microsoft.Samples.Debugging.CorMetadata.NativeApi;
-using Microsoft.Samples.Debugging.CorDebug.NativeApi;
-using Microsoft.Samples.Debugging.Extensions;
-
-namespace Microsoft.Samples.Debugging.CorMetadata
-{
- public class Instantiation
- {
- public static readonly Instantiation Empty = new Instantiation (new List<Type> ());
-
- public static Instantiation Create (IList<Type> typeArgs)
- {
- return new Instantiation (typeArgs);
- }
-
- public IList<Type> TypeArgs { get; private set; }
-
- Instantiation (IList<Type> typeArgs)
- {
- TypeArgs = typeArgs;
- }
- }
-
- public sealed class MetadataType : Type
- {
- internal MetadataType(IMetadataImport importer,int classToken)
- {
- Debug.Assert(importer!=null);
- m_importer = importer;
- m_typeToken= classToken;
-
- if( classToken==0 )
- {
- // classToken of 0 represents a special type that contains
- // fields of global parameters.
- m_name="";
- }
- else
- {
- StringBuilder szTypedef = null;
- // get info about the type
- int size;
- int ptkExtends;
- TypeAttributes pdwTypeDefFlags;
- importer.GetTypeDefProps(classToken,
- null,
- 0,
- out size,
- out pdwTypeDefFlags,
- out ptkExtends
- );
- if (size == 0) {
- int ptkResScope = 0;
- importer.GetTypeRefProps (classToken,
- out ptkResScope,
- null,
- 0,
- out size
- );
- szTypedef = new StringBuilder (size);
- importer.GetTypeRefProps (classToken,
- out ptkResScope,
- szTypedef,
- size,
- out size
- );
- } else {
- szTypedef = new StringBuilder (size);
- importer.GetTypeDefProps (classToken,
- szTypedef,
- szTypedef.Capacity,
- out size,
- out pdwTypeDefFlags,
- out ptkExtends
- );
- }
- m_name = GetNestedClassPrefix(importer,classToken,pdwTypeDefFlags) + szTypedef.ToString();
-
- // Check whether the type is an enum
- string baseTypeName = GetTypeName(importer, ptkExtends);
-
- IntPtr ppvSig;
- if (baseTypeName == "System.Enum")
- {
- m_isEnum = true;
- m_enumUnderlyingType = GetEnumUnderlyingType(importer,classToken);
-
- // Check for flags enum by looking for FlagsAttribute
- uint sigSize = 0;
- ppvSig = IntPtr.Zero;
- int hr = importer.GetCustomAttributeByName(classToken,"System.FlagsAttribute",out ppvSig,out sigSize);
- if (hr < 0)
- {
- throw new COMException("Exception looking for flags attribute",hr);
- }
- m_isFlagsEnum = (hr == 0); // S_OK means the attribute is present.
- }
- }
- }
-
- // [Xamarin] Expression evaluator.
- public override Type DeclaringType
- {
- get
- {
- return m_declaringType;
- }
- }
-
- private static string GetTypeName(IMetadataImport importer, int tk)
- {
- // Get the base type name
- StringBuilder sbBaseName = new StringBuilder();
- MetadataToken token = new MetadataToken(tk);
- int size;
- TypeAttributes pdwTypeDefFlags;
- int ptkExtends;
-
- if (token.IsOfType(MetadataTokenType.TypeDef))
- {
- importer.GetTypeDefProps(token,
- null,
- 0,
- out size,
- out pdwTypeDefFlags,
- out ptkExtends
- );
- sbBaseName.Capacity = size;
- importer.GetTypeDefProps(token,
- sbBaseName,
- sbBaseName.Capacity,
- out size,
- out pdwTypeDefFlags,
- out ptkExtends
- );
- }
- else if (token.IsOfType(MetadataTokenType.TypeRef))
- {
- // Some types extend TypeRef 0x02000000 as a special-case
- // But that token does not exist so we can't get a name for it
- if (token.Index != 0)
- {
- int resolutionScope;
- importer.GetTypeRefProps(token,
- out resolutionScope,
- null,
- 0,
- out size
- );
- sbBaseName.Capacity = size;
- importer.GetTypeRefProps(token,
- out resolutionScope,
- sbBaseName,
- sbBaseName.Capacity,
- out size
- );
- }
- }
- // Note the base type can also be a TypeSpec token, but that only happens
- // for arrays, generics, that sort of thing. In this case, we'll leave the base
- // type name stringbuilder empty, and thus know it's not an enum.
-
- return sbBaseName.ToString();
- }
-
- private static CorElementType GetEnumUnderlyingType(IMetadataImport importer, int tk)
- {
- IntPtr hEnum = IntPtr.Zero;
- int mdFieldDef;
- uint numFieldDefs;
- int fieldAttributes;
- int nameSize;
- int cPlusTypeFlab;
- IntPtr ppValue;
- int pcchValue;
- IntPtr ppvSig;
- int size;
- int classToken;
-
- importer.EnumFields(ref hEnum, tk, out mdFieldDef, 1, out numFieldDefs);
- while (numFieldDefs != 0)
- {
- importer. GetFieldProps(mdFieldDef,out classToken,null,0,out nameSize,out fieldAttributes,out ppvSig,out size,out cPlusTypeFlab,out ppValue,out pcchValue);
- Debug.Assert(tk == classToken);
-
- // Enums should have one instance field that indicates the underlying type
- if ((((FieldAttributes)fieldAttributes) & FieldAttributes.Static) == 0)
- {
- Debug.Assert(size == 2); // Primitive type field sigs should be two bytes long
-
- IntPtr ppvSigTemp = ppvSig;
- CorCallingConvention callingConv = MetadataHelperFunctions.CorSigUncompressCallingConv(ref ppvSigTemp);
- Debug.Assert(callingConv == CorCallingConvention.Field);
-
- return MetadataHelperFunctions.CorSigUncompressElementType(ref ppvSigTemp);
- }
-
- importer.EnumFields(ref hEnum, tk, out mdFieldDef, 1, out numFieldDefs);
- }
-
- Debug.Fail("Should never get here.");
- throw new ArgumentException("Non-enum passed to GetEnumUnderlyingType.");
- }
-
- // properties
-
- public override int MetadataToken
- {
- get
- {
- return m_typeToken;
- }
- }
-
- // [Xamarin] Expression evaluator.
- public override string Name
- {
- get
- {
- int i = m_name.LastIndexOf ('+');
- if (i == -1)
- i = m_name.LastIndexOf ('.');
- if (i != -1)
- return m_name.Substring (i + 1);
- else
- return m_name;
- }
- }
-
- public override Type UnderlyingSystemType
- {
- get
- {
- return Type.GetType (FullName);
- }
- }
-
- public override Type BaseType
- {
- get
- {
- // NOTE: If you ever try to implement this, remember that the base type
- // can be represented in metadata by a TypeDef, TypeRef, or TypeSpec
- // token, depending on the nature and location of the base type.
- //
- // See ECMA Partition II for more details.
- if (m_typeToken == 0)
- throw new NotImplementedException ();
-
- var token = new MetadataToken(m_typeToken);
- int size;
- TypeAttributes pdwTypeDefFlags;
- int ptkExtends;
-
- m_importer.GetTypeDefProps (token,
- null,
- 0,
- out size,
- out pdwTypeDefFlags,
- out ptkExtends
- );
-
- if (ptkExtends == 0)
- return null;
-
- return new MetadataType (m_importer, ptkExtends);
- }
- }
-
- public override String AssemblyQualifiedName
- {
- get
- {
- throw new NotImplementedException();
- }
- }
-
- // [Xamarin] Expression evaluator.
- public override String Namespace
- {
- get
- {
- int i = m_name.LastIndexOf ('.');
- if (i != -1)
- return m_name.Substring (0, i);
- else
- return "";
- }
- }
-
- // [Xamarin] Expression evaluator.
- public override String FullName
- {
- get
- {
- StringBuilder sb = new StringBuilder (m_name);
- if (m_typeArgs != null) {
- sb.Append ("[");
- for (int n = 0; n < m_typeArgs.Count; n++) {
- if (n > 0)
- sb.Append (",");
- sb.Append (m_typeArgs[n].FullName);
- }
- sb.Append ("]");
- }
- if (IsPointer)
- sb.Append ("*");
- if (IsArray) {
- sb.Append ("[");
- for (int n = 1; n < m_arraySizes.Count; n++)
- sb.Append (",");
- sb.Append ("]");
- }
- return sb.ToString ();
- }
- }
-
- public override RuntimeTypeHandle TypeHandle
- {
- get
- {
- throw new NotImplementedException();
- }
- }
-
- public override Assembly Assembly
- {
- get
- {
- throw new NotImplementedException();
- }
- }
-
- public override Module Module
- {
- get
- {
- throw new NotImplementedException();
- }
- }
-
-
- public override Guid GUID
- {
- get
- {
- throw new NotImplementedException();
- }
- }
-
- // [Xamarin] Expression evaluator.
- public override Type[] GetGenericArguments ()
- {
- return m_typeArgs.ToArray ();
- }
-
- // methods
-
- // [Xamarin] Expression evaluator.
- public override bool IsDefined (Type attributeType, bool inherit)
- {
- return GetCustomAttributes (attributeType, inherit).Length > 0;
- }
-
- // [Xamarin] Expression evaluator.
- public override object[] GetCustomAttributes(Type attributeType, bool inherit)
- {
- ArrayList list = new ArrayList ();
- foreach (object ob in GetCustomAttributes (inherit)) {
- if (attributeType.IsInstanceOfType (ob))
- list.Add (ob);
- }
- return list.ToArray ();
- }
-
- // [Xamarin] Expression evaluator.
- public override object[] GetCustomAttributes(bool inherit)
- {
- if (m_customAttributes == null)
- m_customAttributes = MetadataHelperFunctionsExtensions.GetDebugAttributes (m_importer, m_typeToken);
- return m_customAttributes;
- }
-
- protected override bool HasElementTypeImpl()
- {
- throw new NotImplementedException();
- }
-
- public override Type GetElementType()
- {
- throw new NotImplementedException();
- }
-
- protected override bool IsCOMObjectImpl()
- {
- throw new NotImplementedException();
- }
-
- protected override bool IsPrimitiveImpl()
- {
- throw new NotImplementedException();
- }
-
- // [Xamarin] Expression evaluator.
- protected override bool IsPointerImpl()
- {
- return m_isPtr;
- }
-
- // [Xamarin] Expression evaluator.
- protected override bool IsByRefImpl()
- {
- return m_isByRef;
- }
-
- // [Xamarin] Expression evaluator.
- protected override bool IsArrayImpl()
- {
- return m_arraySizes != null;
- }
-
- protected override TypeAttributes GetAttributeFlagsImpl()
- {
- throw new NotImplementedException();
- }
-
- // [Xamarin] Expression evaluator.
- public override int GetArrayRank ()
- {
- if (m_arraySizes != null)
- return m_arraySizes.Count;
- else
- return 0;
- }
-
- public override MemberInfo[] GetMembers(BindingFlags bindingAttr)
- {
- throw new NotImplementedException();
- }
-
- public override Type[] GetNestedTypes(BindingFlags bindingAttr)
- {
- throw new NotImplementedException();
- }
-
- public override Type GetNestedType(String name, BindingFlags bindingAttr)
- {
- throw new NotImplementedException();
- }
-
- // [Xamarin] Expression evaluator.
- public override PropertyInfo[] GetProperties(BindingFlags bindingAttr)
- {
- var al = new ArrayList ();
- var hEnum = new IntPtr ();
-
- int methodToken;
- try {
- while (true) {
- uint size;
- m_importer.EnumProperties (ref hEnum, (int) m_typeToken, out methodToken, 1, out size);
- if (size == 0)
- break;
- var prop = new MetadataPropertyInfo (m_importer, methodToken, this);
- try {
- MethodInfo mi = prop.GetGetMethod (true) ?? prop.GetSetMethod (true);
- if (mi == null)
- continue;
- if (MetadataExtensions.TypeFlagsMatch (mi.IsPublic, mi.IsStatic, bindingAttr))
- al.Add (prop);
- }
- catch {
- // Ignore
- }
- }
- }
- finally {
- m_importer.CloseEnum (hEnum);
- }
-
- return (PropertyInfo[]) al.ToArray (typeof (PropertyInfo));
- }
-
- protected override PropertyInfo GetPropertyImpl(String name, BindingFlags bindingAttr,Binder binder,
- Type returnType, Type[] types, ParameterModifier[] modifiers)
- {
- // Temp matched only by name
- var properties = GetProperties(bindingAttr);
- foreach (var propertyInfo in properties) {
- if (propertyInfo.Name == name) {
- return propertyInfo;
- }
- }
- return null;
- }
-
- public override EventInfo[] GetEvents(BindingFlags bindingAttr)
- {
- throw new NotImplementedException();
- }
-
- public override EventInfo GetEvent(String name,BindingFlags bindingAttr)
- {
- throw new NotImplementedException();
- }
-
- public override Type GetInterface(String name, bool ignoreCase)
- {
- throw new NotImplementedException();
- }
-
- public override Type[] GetInterfaces()
- {
- var al = new ArrayList();
- var hEnum = new IntPtr();
-
- int impl;
- try
- {
- while(true)
- {
- uint size;
- m_importer.EnumInterfaceImpls (ref hEnum,(int)m_typeToken,out impl,1,out size);
- if(size==0)
- break;
- int classTk;
- int intfTk;
- m_importer.GetInterfaceImplProps (impl, out classTk, out intfTk);
- al.Add (new MetadataType (m_importer, intfTk));
- }
- }
- finally
- {
- m_importer.CloseEnum(hEnum);
- }
- return (Type[]) al.ToArray(typeof(Type));
- }
-
- public override FieldInfo GetField(String name, BindingFlags bindingAttr)
- {
- foreach (var field in GetFields (bindingAttr)) {
- if (field.Name == name)
- return field;
- }
- return null;
- }
-
- public override FieldInfo[] GetFields(BindingFlags bindingAttr)
- {
- var al = new ArrayList();
- var hEnum = new IntPtr();
-
- int fieldToken;
- try
- {
- while(true)
- {
- uint size;
- m_importer.EnumFields(ref hEnum,(int)m_typeToken,out fieldToken,1,out size);
- if(size==0)
- break;
- // [Xamarin] Expression evaluator.
- var field = new MetadataFieldInfo (m_importer, fieldToken, this);
- if (MetadataExtensions.TypeFlagsMatch (field.IsPublic, field.IsStatic, bindingAttr))
- al.Add (field);
- }
- }
- finally
- {
- m_importer.CloseEnum(hEnum);
- }
- return (FieldInfo[]) al.ToArray(typeof(FieldInfo));
- }
-
- public override MethodInfo[] GetMethods(BindingFlags bindingAttr)
- {
- ArrayList al = new ArrayList();
- IntPtr hEnum = new IntPtr();
-
- int methodToken;
- try
- {
- while(true)
- {
- int size;
- m_importer.EnumMethods(ref hEnum,(int)m_typeToken,out methodToken,1,out size);
- if(size==0)
- break;
- // [Xamarin] Expression evaluator.
- var met = new MetadataMethodInfo (m_importer, methodToken, Instantiation.Create (m_typeArgs));
- if (MetadataExtensions.TypeFlagsMatch (met.IsPublic, met.IsStatic, bindingAttr))
- al.Add (met);
- }
- }
- finally
- {
- m_importer.CloseEnum(hEnum);
- }
- return (MethodInfo[]) al.ToArray(typeof(MethodInfo));
- }
-
- protected override MethodInfo GetMethodImpl(String name,
- BindingFlags bindingAttr,
- Binder binder,
- CallingConventions callConvention,
- Type[] types,
- ParameterModifier[] modifiers)
- {
- throw new NotImplementedException();
- }
-
- public override ConstructorInfo[] GetConstructors(BindingFlags bindingAttr)
- {
- throw new NotImplementedException();
- }
-
- protected override ConstructorInfo GetConstructorImpl(BindingFlags bindingAttr,
- Binder binder,
- CallingConventions callConvention,
- Type[] types,
- ParameterModifier[] modifiers)
- {
- throw new NotImplementedException();
- }
-
- public override Object InvokeMember(String name,BindingFlags invokeAttr,Binder binder,Object target,
- Object[] args, ParameterModifier[] modifiers,CultureInfo culture,
- String[] namedParameters)
- {
- throw new NotImplementedException();
- }
-
- public string[] GetGenericArgumentNames()
- {
- return MetadataHelperFunctions.GetGenericArgumentNames(m_importer,m_typeToken);
- }
-
-
- public bool ReallyIsEnum
- {
- get
- {
- return m_isEnum;
- }
- }
-
- public bool ReallyIsFlagsEnum
- {
- get
- {
- return m_isFlagsEnum;
- }
- }
-
- public CorElementType EnumUnderlyingType
- {
- get
- {
- return m_enumUnderlyingType;
- }
- }
-
-
- [CLSCompliant(false)]
- public IList<KeyValuePair<string,ulong>> EnumValues
- {
- get
- {
- if (m_enumValues == null)
- {
- // Build a big list of field values
- FieldInfo[] fields = GetFields(BindingFlags.Public); // BindingFlags is actually ignored in the "fake" type,
- // but we only want the public fields anyway
- m_enumValues = new List<KeyValuePair<string,ulong>>();
- FieldAttributes staticLiteralField = FieldAttributes.HasDefault | FieldAttributes.Literal | FieldAttributes.Static;
- for (int i = 0; i < fields.Length; i++)
- {
- MetadataFieldInfo field = fields[i] as MetadataFieldInfo;
- if ((field.Attributes & staticLiteralField) == staticLiteralField)
- {
- m_enumValues.Add(new KeyValuePair<string,ulong>(field.Name, Convert.ToUInt64(field.GetValue(null), CultureInfo.InvariantCulture)));
- }
- }
-
- AscendingValueComparer<string,ulong> comparer = new AscendingValueComparer<string,ulong>();
- m_enumValues.Sort(comparer);
- }
-
- return m_enumValues;
- }
- }
-
- // returns "" for normal classes, returns prefix for nested classes
- private string GetNestedClassPrefix(IMetadataImport importer, int classToken, TypeAttributes attribs)
- {
- if( (attribs & TypeAttributes.VisibilityMask) > TypeAttributes.Public )
- {
- // it is a nested class
- int enclosingClass;
- importer.GetNestedClassProps(classToken, out enclosingClass);
- // [Xamarin] Expression evaluator.
- m_declaringType = new MetadataType (importer, enclosingClass);
- return m_declaringType.FullName + "+";
- //MetadataType mt = new MetadataType(importer,enclosingClass);
- //return mt.Name+".";
- }
- else
- return String.Empty;
- }
-
- // member variables
- private string m_name;
- private IMetadataImport m_importer;
- private int m_typeToken;
- private bool m_isEnum;
- private bool m_isFlagsEnum;
- private CorElementType m_enumUnderlyingType;
- private List<KeyValuePair<string,ulong>> m_enumValues;
- // [Xamarin] Expression evaluator.
- private object[] m_customAttributes;
- private Type m_declaringType;
- internal List<int> m_arraySizes;
- internal List<int> m_arrayLoBounds;
- internal bool m_isByRef, m_isPtr;
- internal List<Type> m_typeArgs;
- }
-
- // Sorts KeyValuePair<string,ulong>'s in increasing order by the value
- class AscendingValueComparer<K, V> : IComparer<KeyValuePair<K,V>> where V:IComparable
- {
- public int Compare(KeyValuePair<K,V> p1, KeyValuePair<K, V> p2)
- {
- return p1.Value.CompareTo(p2.Value);
- }
-
- public bool Equals(KeyValuePair<K, V> p1, KeyValuePair<K, V> p2)
- {
- return Compare(p1,p2) == 0;
- }
-
- public int GetHashCode(KeyValuePair<K, V> p)
- {
- return p.Value.GetHashCode();
- }
- }
-
-
- //////////////////////////////////////////////////////////////////////////////////
- //
- // TypeDefEnum
- //
- //////////////////////////////////////////////////////////////////////////////////
-
- class TypeDefEnum : IEnumerable, IEnumerator, IDisposable
- {
- public TypeDefEnum (CorMetadataImport corMeta)
- {
- m_corMeta = corMeta;
- }
-
- ~TypeDefEnum()
- {
- DestroyEnum();
- }
-
- public void Dispose()
- {
- DestroyEnum();
- GC.SuppressFinalize(this);
- }
-
- //
- // IEnumerable interface
- //
- public IEnumerator GetEnumerator ()
- {
- return this;
- }
-
- //
- // IEnumerator interface
- //
- public bool MoveNext ()
- {
- int token;
- uint c;
-
- m_corMeta.m_importer.EnumTypeDefs(ref m_enum,out token,1, out c);
- if (c==1) // 1 new element
- m_type = m_corMeta.GetType(token);
- else
- m_type = null;
- return m_type != null;
- }
-
- public void Reset ()
- {
- DestroyEnum();
- m_type = null;
- }
-
- public Object Current
- {
- get
- {
- return m_type;
- }
- }
-
- protected void DestroyEnum()
- {
- m_corMeta.m_importer.CloseEnum(m_enum);
- m_enum=new IntPtr();
- }
-
- private CorMetadataImport m_corMeta;
- private IntPtr m_enum;
- private Type m_type;
- }
-}
-
diff --git a/main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/Metahost/Metahost.cs b/main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/Metahost/Metahost.cs deleted file mode 100644 index cbec0d55ed..0000000000 --- a/main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/Metahost/Metahost.cs +++ /dev/null @@ -1,158 +0,0 @@ -using System; -using System.Diagnostics.CodeAnalysis; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Security; -using System.Text; -using Microsoft.Samples.Debugging.CorDebug; - -namespace Microsoft.Samples.Debugging.CorPublish.Metahost -{ - [ComImport] - [SecurityCritical] - [Guid ("00000100-0000-0000-C000-000000000046")] - [InterfaceType (ComInterfaceType.InterfaceIsIUnknown)] - public interface IEnumUnknown - { - [PreserveSig] - [MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - int Next ( - [In, MarshalAs (UnmanagedType.U4)] int elementArrayLength, - [Out, MarshalAs (UnmanagedType.LPArray, ArraySubType = UnmanagedType.IUnknown, SizeParamIndex = 0)] object[] elementArray, - [MarshalAs (UnmanagedType.U4)] out int fetchedElementCount); - - [PreserveSig] - [MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - int Skip ([In, MarshalAs (UnmanagedType.U4)] int count); - - [MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void Reset (); - - [MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void Clone ([MarshalAs (UnmanagedType.Interface)] out IEnumUnknown enumerator); - } - - [SecurityCritical] - [InterfaceType (ComInterfaceType.InterfaceIsIUnknown)] - [Guid ("D332DB9E-B9B3-4125-8207-A14884F53216")] - internal interface IClrMetaHost - { - [return: MarshalAs (UnmanagedType.Interface)] - [MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - object GetRuntime ( - [In, MarshalAs (UnmanagedType.LPWStr)] string version, - [In, MarshalAs (UnmanagedType.LPStruct)] Guid interfaceId); - - [MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void GetVersionFromFile ( - [In, MarshalAs (UnmanagedType.LPWStr)] string filePath, - [Out, MarshalAs (UnmanagedType.LPWStr)] StringBuilder buffer, - [In, Out, MarshalAs (UnmanagedType.U4)] ref uint bufferLength); - - [return: MarshalAs (UnmanagedType.Interface)] - [MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - IEnumUnknown EnumerateInstalledRuntimes (); - - [return: MarshalAs (UnmanagedType.Interface)] - //[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - IEnumUnknown EnumerateLoadedRuntimes ([In] ProcessSafeHandle processHandle); - - [PreserveSig, MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - int Reserved01 ([In] IntPtr reserved1); - } - - [System.Security.SecurityCritical] - [ComImport, InterfaceType (ComInterfaceType.InterfaceIsIUnknown), Guid ("BD39D1D2-BA2F-486A-89B0-B4B0CB466891")] - internal interface IClrRuntimeInfo - { - [PreserveSig] - int GetVersionString ( - [Out, MarshalAs (UnmanagedType.LPWStr, SizeParamIndex = 1)] StringBuilder buffer, - [In, Out, MarshalAs (UnmanagedType.U4)] ref int bufferLength); - - [MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - [PreserveSig] - int GetRuntimeDirectory ( - [Out, MarshalAs (UnmanagedType.LPWStr, SizeParamIndex = 1)] StringBuilder buffer, - [In, Out, MarshalAs (UnmanagedType.U4)] ref int bufferLength); - - [return: MarshalAs (UnmanagedType.Bool)] - [MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - bool IsLoaded ( - [In] IntPtr processHandle); - - [MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), LCIDConversion (3)] - [PreserveSig] - int LoadErrorString ( - [In, MarshalAs (UnmanagedType.U4)] int resourceId, - [Out, MarshalAs (UnmanagedType.LPWStr, SizeParamIndex = 2)] StringBuilder buffer, - [In, Out, MarshalAs (UnmanagedType.U4)] ref int bufferLength); - - //@TODO: SafeHandle? - [MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - IntPtr LoadLibrary ( - [In, MarshalAs (UnmanagedType.LPWStr)] string dllName); - - [MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - IntPtr GetProcAddress ( - [In, MarshalAs (UnmanagedType.LPStr)] string procName); - - [return: MarshalAs (UnmanagedType.Interface)] - [MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - object GetInterface ( - [In, MarshalAs (UnmanagedType.LPStruct)] Guid coClassId, - [In, MarshalAs (UnmanagedType.LPStruct)] Guid interfaceId); - - [return: MarshalAs (UnmanagedType.Bool)] - [MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - bool IsLoadable (); - - [MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void SetDefaultStartupFlags ( - [In, MarshalAs (UnmanagedType.U4)] StartupFlags startupFlags, - [In, MarshalAs (UnmanagedType.LPStr)] string hostConfigFile); - - [MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - [PreserveSig] - int GetDefaultStartupFlags ( - [Out, MarshalAs (UnmanagedType.U4)] out StartupFlags startupFlags, - [Out, MarshalAs (UnmanagedType.LPWStr, SizeParamIndex = 2)] StringBuilder hostConfigFile, - [In, Out, MarshalAs (UnmanagedType.U4)] ref int hostConfigFileLength); - - [MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void BindAsLegacyV2Runtime (); - - [MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void IsStarted ( - [Out, MarshalAs (UnmanagedType.Bool)] out bool started, - [Out, MarshalAs (UnmanagedType.U4)] out StartupFlags startupFlags); - } - - [Flags] - [System.Security.SecurityCritical] - public enum StartupFlags - { - None = 0, - AlwaysFlowImpersonation = 0x40000, - AppdomainResourceMonitoring = 0x400000, // Appdomain Resource Monitoring feature - ConcurrentGC = 1, - DisableCommitThreadStack = 0x20000, - - // Abbreviation fine here; it's not hungarian notation! - [SuppressMessage ("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly")] Etw = 0x100000, - - // Wants "GC" and "VM" rather than "Gc" and "Vm" but then complains that "GCVM" should be "Gcvm". - [SuppressMessage ("Microsoft.Naming", "CA1709:IdentifiersShouldBeCasedCorrectly")] HoardGCVM = 0x2000, - LegacyImpersonation = 0x10000, - LoaderOptimizationMask = 6, - LoaderOptimizationMultipleDomain = 4, - LoaderOptimizationMultipleDomainHost = 6, - LoaderOptimizationSingleDomain = 2, - LoaderSafeMode = 0x10, - LoaderSetPreference = 0x100, - ServerBuild = 0x200000, - ServerGC = 0x1000, - SingleVersionHostingInterface = 0x4000, - TrimGCCommit = 0x80000 - } -}
\ No newline at end of file diff --git a/main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/SymStore/ISymBinder2.cs b/main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/SymStore/ISymBinder2.cs deleted file mode 100644 index 3eb004f400..0000000000 --- a/main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/SymStore/ISymBinder2.cs +++ /dev/null @@ -1,34 +0,0 @@ -//---------------------------------------------------------------------
-// This file is part of the CLR Managed Debugger (mdbg) Sample.
-//
-// Copyright (C) Microsoft Corporation. All rights reserved.
-//---------------------------------------------------------------------
-
-
-// These interfaces serve as an extension to the BCL's SymbolStore interfaces.
-namespace Microsoft.Samples.Debugging.CorSymbolStore
-{
- using System.Diagnostics.SymbolStore;
-
- using System;
- using System.Text;
- using System.Runtime.InteropServices;
- using System.Runtime.InteropServices.ComTypes;
-
- [
- ComVisible(false)
- ]
- public interface ISymbolBinder2
- {
- ISymbolReader GetReaderForFile(Object importer, String filename, String searchPath);
-
- ISymbolReader GetReaderForFile(Object importer, String fileName,
- String searchPath, SymSearchPolicies searchPolicy);
-
- ISymbolReader GetReaderForFile(Object importer, String fileName,
- String searchPath, SymSearchPolicies searchPolicy,
- IntPtr callback);
-
- ISymbolReader GetReaderFromStream(Object importer, IStream stream);
- }
-}
diff --git a/main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/SymStore/ISymConstant.cs b/main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/SymStore/ISymConstant.cs deleted file mode 100644 index 8fc33a5b0b..0000000000 --- a/main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/SymStore/ISymConstant.cs +++ /dev/null @@ -1,31 +0,0 @@ -//---------------------------------------------------------------------
-// This file is part of the CLR Managed Debugger (mdbg) Sample.
-//
-// Copyright (C) Microsoft Corporation. All rights reserved.
-//---------------------------------------------------------------------
-
-
-// These interfaces serve as an extension to the BCL's SymbolStore interfaces.
-namespace Microsoft.Samples.Debugging.CorSymbolStore
-{
- using System.Diagnostics.SymbolStore;
-
-
- using System;
- using System.Text;
- using System.Runtime.InteropServices;
-
- // Interface does not need to be marked with the serializable attribute
- // Interface is returned by ISymbolScope2.GetConstants() so must be public
- [
- ComVisible(false)
- ]
- public interface ISymbolConstant
- {
- String GetName();
-
- Object GetValue();
-
- byte[] GetSignature();
- }
-}
diff --git a/main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/SymStore/ISymENCUpdate.cs b/main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/SymStore/ISymENCUpdate.cs deleted file mode 100644 index 3647deb883..0000000000 --- a/main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/SymStore/ISymENCUpdate.cs +++ /dev/null @@ -1,43 +0,0 @@ -//---------------------------------------------------------------------
-// This file is part of the CLR Managed Debugger (mdbg) Sample.
-//
-// Copyright (C) Microsoft Corporation. All rights reserved.
-//---------------------------------------------------------------------
-
-
-// These interfaces serve as an extension to the BCL's SymbolStore interfaces.
-namespace Microsoft.Samples.Debugging.CorSymbolStore
-{
- using System.Diagnostics.SymbolStore;
-
- // Interface does not need to be marked with the serializable attribute
- using System;
- using System.Text;
- using System.Runtime.InteropServices;
- using System.Runtime.InteropServices.ComTypes;
-
- /// <include file='doc\ISymENCUpdate.uex' path='docs/doc[@for="SymbolLineDelta"]/*' />
- [StructLayout(LayoutKind.Sequential)]
- public struct SymbolLineDelta
- {
- SymbolToken mdMethod;
- int delta;
- };
-
- /// <include file='doc\ISymScope.uex' path='docs/doc[@for="ISymbolScope"]/*' />
- [
- ComVisible(false)
- ]
- public interface ISymbolEncUpdate
- {
- /// <include file='doc\ISymENCUpdate.uex' path='docs/doc[@for="ISymbolEncUpdate.UpdateSymbolStore"]/*' />
-
- void UpdateSymbolStore(IStream stream, SymbolLineDelta[] symbolLineDeltas);
- /// <include file='doc\ISymENCUpdate.uex' path='docs/doc[@for="ISymbolEncUpdate.GetLocalVariableCount"]/*' />
-
- int GetLocalVariableCount(SymbolToken mdMethodToken);
- /// <include file='doc\ISymENCUpdate.uex' path='docs/doc[@for="ISymbolEncUpdate.GetLocalVariables"]/*' />
-
- ISymbolVariable[] GetLocalVariables(SymbolToken mdMethodToken);
- }
-}
diff --git a/main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/SymStore/ISymEncMethod.cs b/main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/SymStore/ISymEncMethod.cs deleted file mode 100644 index 9791127775..0000000000 --- a/main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/SymStore/ISymEncMethod.cs +++ /dev/null @@ -1,33 +0,0 @@ -//---------------------------------------------------------------------
-// This file is part of the CLR Managed Debugger (mdbg) Sample.
-//
-// Copyright (C) Microsoft Corporation. All rights reserved.
-//---------------------------------------------------------------------
-
-
-// These interfaces serve as an extension to the BCL's SymbolStore interfaces.
-namespace Microsoft.Samples.Debugging.CorSymbolStore
-{
- using System.Diagnostics.SymbolStore;
-
- using System.Runtime.InteropServices;
- using System;
-
- // This interface isn't directly returned or used by any of the classes,
- // but the implementation of the ISymbolMethod also implements ISymEncMethod
- // so you could explicitly cast it to that.
- [
- ComVisible(false)
- ]
- public interface ISymbolEnCMethod: ISymbolMethod
- {
- String GetFileNameFromOffset(int dwOffset);
-
- int GetLineFromOffset(int dwOffset,
- out int column,
- out int endLine,
- out int endColumn,
- out int startOffset);
- }
-}
-
diff --git a/main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/SymStore/ISymReader2.cs b/main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/SymStore/ISymReader2.cs deleted file mode 100644 index 99958606a0..0000000000 --- a/main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/SymStore/ISymReader2.cs +++ /dev/null @@ -1,91 +0,0 @@ -//---------------------------------------------------------------------
-// This file is part of the CLR Managed Debugger (mdbg) Sample.
-//
-// Copyright (C) Microsoft Corporation. All rights reserved.
-//---------------------------------------------------------------------
-
-
-// These interfaces serve as an extension to the BCL's SymbolStore interfaces.
-namespace Microsoft.Samples.Debugging.CorSymbolStore
-{
- using System.Diagnostics.SymbolStore;
-
- // Interface does not need to be marked with the serializable attribute
- using System;
- using System.Runtime.InteropServices;
- using System.Runtime.InteropServices.ComTypes;
-
- [
- ComVisible(false)
- ]
- public interface ISymbolReader2 : ISymbolReader
- {
- // Initialize the symbol reader with the metadata importer interface
- // that this reader will be associated with, along with the filename
- // of the module. This can only be called once, and must be called
- // before any other reader methods are called.
- //
- // Note: you need only specify one of the filename or the stream,
- // not both. The searchPath parameter is optional.
- //
- void Initialize(Object importer, String filename,
- String searchPath, IStream stream);
-
- // Update the existing symbol reader with a delta symbol store. This
- // is used in EnC scenarios as a way to update the symbol store to
- // match deltas to the original PE file.
- //
- // Only one of the filename or stream parameters need be specified.
- // If a filename is specified, the symbol store will be updated with
- // the symbols in that file. If a IStream is specified, the store will
- // be updated with the data from the IStream.
- //
- void UpdateSymbolStore(String fileName, IStream stream);
-
- // Update the existing symbol reader with a delta symbol
- // store. This is much like UpdateSymbolStore, but the given detla
- // acts as a complete replacement rather than an update.
- //
- // Only one of the filename or stream parameters need be specified.
- // If a filename is specified, the symbol store will be updated with
- // the symbols in that file. If a IStream is specified, the store will
- // be updated with the data from the IStream.
- //
- void ReplaceSymbolStore(String fileName, IStream stream);
-
- // Provides the on disk filename of the symbol store.
- //
- String GetSymbolStoreFileName();
-
- // Given a position in a document, return the ISymUnmanagedMethods that
- // contains that position.
- //
- ISymbolMethod[] GetMethodsFromDocumentPosition(
- ISymbolDocument document, int line, int column);
-
- // The document version starts at 1 and is incremented each time
- // the document is updated via UpdateSymbols.
- // bCurrent is true is this is the latest version of the document.
- //
- int GetDocumentVersion(ISymbolDocument document,
- out Boolean isCurrent);
-
- // The method version starts at 1 and is incremented each time
- // the method is recompiled. (This can happen changes to the method.)
- //
- int GetMethodVersion(ISymbolMethod method);
- }
-
- // This interface is implemented by the internal SymReader
- // so it could be converted to this and have it's methods called.
- [
- ComVisible(false)
- ]
- public interface ISymbolReaderSymbolSearchInfo
- {
- int GetSymbolSearchInfoCount();
-
- ISymbolSearchInfo[] GetSymbolSearchInfo();
- }
-
-}
diff --git a/main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/SymStore/ISymScope2.cs b/main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/SymStore/ISymScope2.cs deleted file mode 100644 index cbbe1cf0e6..0000000000 --- a/main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/SymStore/ISymScope2.cs +++ /dev/null @@ -1,34 +0,0 @@ -//---------------------------------------------------------------------
-// This file is part of the CLR Managed Debugger (mdbg) Sample.
-//
-// Copyright (C) Microsoft Corporation. All rights reserved.
-//---------------------------------------------------------------------
-
-
-// These interfaces serve as an extension to the BCL's SymbolStore interfaces.
-namespace Microsoft.Samples.Debugging.CorSymbolStore
-{
- using System.Diagnostics.SymbolStore;
-
- // Interface does not need to be marked with the serializable attribute
- using System;
- using System.Text;
- using System.Runtime.InteropServices;
-
-
- // This interface isn't directly returned, but SymbolScope which implements ISymbolScope
- // also implements ISymbolScope2 and thus you may want to explicitly cast it to use these methods.
- [
- ComVisible(false)
- ]
- public interface ISymbolScope2 : ISymbolScope
- {
-
- int LocalCount{ get; }
-
- int ConstantCount{ get; }
-
- ISymbolConstant[] GetConstants();
-
- }
-}
diff --git a/main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/SymStore/ISymSearchInfo.cs b/main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/SymStore/ISymSearchInfo.cs deleted file mode 100644 index 076a2874f7..0000000000 --- a/main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/SymStore/ISymSearchInfo.cs +++ /dev/null @@ -1,31 +0,0 @@ -//---------------------------------------------------------------------
-// This file is part of the CLR Managed Debugger (mdbg) Sample.
-//
-// Copyright (C) Microsoft Corporation. All rights reserved.
-//---------------------------------------------------------------------
-
-
-// These interfaces serve as an extension to the BCL's SymbolStore interfaces.
-namespace Microsoft.Samples.Debugging.CorSymbolStore
-{
- using System.Diagnostics.SymbolStore;
-
- // Interface does not need to be marked with the serializable attribute
- using System;
- using System.Text;
- using System.Runtime.InteropServices;
-
- // This interface is returned by ISymbolReaderSymbolSearchInfo
- // and thus must be public
- [
- ComVisible(false)
- ]
- public interface ISymbolSearchInfo
- {
- int SearchPathLength{ get; }
-
- String SearchPath{ get; }
-
- int HResult{ get; }
- }
-}
diff --git a/main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/SymStore/ISymWriter2.cs b/main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/SymStore/ISymWriter2.cs deleted file mode 100644 index f09d0e663f..0000000000 --- a/main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/SymStore/ISymWriter2.cs +++ /dev/null @@ -1,107 +0,0 @@ -//---------------------------------------------------------------------
-// This file is part of the CLR Managed Debugger (mdbg) Sample.
-//
-// Copyright (C) Microsoft Corporation. All rights reserved.
-//---------------------------------------------------------------------
-
-
-// These interfaces serve as an extension to the BCL's SymbolStore interfaces.
-namespace Microsoft.Samples.Debugging.CorSymbolStore
-{
- using System.Diagnostics.SymbolStore;
-
-
- using System;
- using System.Text;
- using System.Reflection;
- using System.Runtime.InteropServices;
- using System.Runtime.InteropServices.ComTypes;
-
- [StructLayout(LayoutKind.Sequential)]
- public struct ImageDebugDirectory {
- int Characteristics;
- int TimeDateStamp;
- short MajorVersion;
- short MinorVersion;
- int Type;
- int SizeOfData;
- int AddressOfRawData;
- int PointerToRawData;
-
- public override string ToString()
- {
- return String.Format( @"Characteristics: {0}
-TimeDateStamp: {1}
-MajorVersion: {2}
-MinorVersion: {3}
-Type: {4}
-SizeOfData: {5}
-AddressOfRawData: {6}
-PointerToRawData: {7}
-",
- Characteristics,
- TimeDateStamp,
- MajorVersion,
- MinorVersion,
- Type,
- SizeOfData,
- AddressOfRawData,
- PointerToRawData);
- }
- };
-
- [
- ComVisible(false)
- ]
- public interface ISymbolWriter2 : ISymbolWriter
- {
- void Initialize(Object emitter,
- String fileName,
- Boolean fullBuild);
-
- void Initialize(Object emitter,
- String fileName,
- IStream stream,
- Boolean fullBuild);
-
- void Initialize(Object emitter,
- String temporaryFileName,
- IStream stream,
- Boolean fullBuild,
- String finalFileName);
-
- byte[] GetDebugInfo(out ImageDebugDirectory imageDebugDirectory);
-
- void RemapToken(SymbolToken oldToken,
- SymbolToken newToken);
-
- void DefineConstant(String name,
- Object value,
- byte[] signature);
-
- void Abort();
-
- void DefineLocalVariable(String name,
- int attributes,
- SymbolToken sigToken,
- int addressKind,
- int addr1,
- int addr2,
- int addr3,
- int startOffset,
- int endOffset);
-
- void DefineGlobalVariable(String name,
- int attributes,
- SymbolToken sigToken,
- int addressKind,
- int addr1,
- int addr2,
- int addr3);
-
-
- void DefineConstant(String name,
- Object value,
- SymbolToken sigToken);
- }
-}
diff --git a/main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/SymStore/SymAccess.cs b/main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/SymStore/SymAccess.cs deleted file mode 100644 index 85e339a469..0000000000 --- a/main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/SymStore/SymAccess.cs +++ /dev/null @@ -1,150 +0,0 @@ -//---------------------------------------------------------------------
-// This file is part of the CLR Managed Debugger (mdbg) Sample.
-//
-// Copyright (C) Microsoft Corporation. All rights reserved.
-//---------------------------------------------------------------------
-
-/*
- * This file contains a class that distributes Symbol Reader and Writer interfaces.
- */
-
-namespace Microsoft.Samples.Debugging.CorSymbolStore
-{
- using System.Diagnostics;
- using System.Diagnostics.SymbolStore;
- using System;
- using System.Runtime.InteropServices;
-
- /*
- * This class includes methods for getting top-level access to symbol objects for reading and writing to PDB files
- */
- public static class SymbolAccess
- {
- // Guids for imported metadata interfaces.
- private static Guid dispenserClassID = new Guid(0xe5cb7a31, 0x7512, 0x11d2, 0x89, 0xce, 0x00, 0x80, 0xc7, 0x92, 0xe5, 0xd8); // CLSID_CorMetaDataDispenser
- private static Guid dispenserIID = new Guid(0x809c652e, 0x7396, 0x11d2, 0x97, 0x71, 0x00, 0xa0, 0xc9, 0xb4, 0xd5, 0x0c); // IID_IMetaDataDispenser
- private static Guid importerIID = new Guid(0x7dac8207, 0xd3ae, 0x4c75, 0x9b, 0x67, 0x92, 0x80, 0x1a, 0x49, 0x7d, 0x44); // IID_IMetaDataImport
- private static Guid emitterIID = new Guid(0xba3fee4c, 0xecb9, 0x4e41, 0x83, 0xb7, 0x18, 0x3f, 0xa4, 0x1c, 0xd8, 0x59); // IID_IMetaDataEmit
-
- const int OPEN_READ = 0;
- const int OPEN_WRITE = 1;
-
- internal static class NativeMethods
- {
- [DllImport("ole32.dll")]
- internal static extern int CoCreateInstance([In] ref Guid rclsid,
- [In, MarshalAs(UnmanagedType.IUnknown)] Object pUnkOuter,
- [In] uint dwClsContext,
- [In] ref Guid riid,
- [Out, MarshalAs(UnmanagedType.Interface)] out Object ppv);
- }
-
- // This function will either use a given IMetadataEmitter for the ISymbolWriter2
- // or it will make a new one based on the path that you provide.
- // In either case, you need to make sure that the metadata in the image file matches
- // the metadata in the symbols.
- public static ISymbolWriter2 GetWriterForFile(string pathModule, ref object emitter)
- {
- // If no emitter is provided, make one and return it.
- if (emitter == null)
- {
- // First get a dispenser
- object objDispenser;
- NativeMethods.CoCreateInstance(ref dispenserClassID, null, 1, ref dispenserIID, out objDispenser);
- Debug.Assert(objDispenser != null, "Dispenser is null.");
-
- // Now get an emitter
- IMetaDataDispenserPrivate dispenser = (IMetaDataDispenserPrivate)objDispenser;
- dispenser.OpenScope(pathModule, OPEN_WRITE, ref emitterIID, out emitter);
- }
- Debug.Assert(emitter != null, "Emitter is null.");
-
- // An emitter was provided, just use that one.
- ISymbolWriter2 writer = new SymbolWriter();
- writer.Initialize(emitter, pathModule, false);
- return writer;
- }
-
- /*
- * If you want a SymbolReader for a given exe, just use this function.
- */
- public static ISymbolReader GetReaderForFile(string pathModule)
- {
- return GetReaderForFile(pathModule, null);
- }
- /*
- * If you know the name of the exe and a searchPath where the file may exist, use this one.
- */
- public static ISymbolReader GetReaderForFile(string pathModule, string searchPath)
- {
- return GetReaderForFile(new SymbolBinder(), pathModule, searchPath);
- }
- /*
- * This private function provides implementation for the two public versions.
- * searchPath is a simicolon-delimited list of paths on which to search for pathModule.
- * If searchPath is null, pathModule must be a full path to the assembly.
- */
- private static ISymbolReader GetReaderForFile(SymbolBinder binder, string pathModule, string searchPath)
- {
- // First create the Metadata dispenser.
- object objDispenser;
- NativeMethods.CoCreateInstance(ref dispenserClassID, null, 1, ref dispenserIID, out objDispenser);
-
- // Now open an Importer on the given filename. We'll end up passing this importer straight
- // through to the Binder.
- object objImporter;
- IMetaDataDispenserPrivate dispenser = (IMetaDataDispenserPrivate)objDispenser;
- dispenser.OpenScope(pathModule, OPEN_READ, ref importerIID, out objImporter);
-
- IntPtr importerPtr = IntPtr.Zero;
- ISymbolReader reader;
- try
- {
- // This will manually AddRef the underlying object, so we need to be very careful to Release it.
- importerPtr = Marshal.GetComInterfaceForObject(objImporter, typeof(IMetadataImportPrivateComVisible));
-
- reader = binder.GetReader(importerPtr, pathModule, searchPath);
- }
- finally
- {
- if (importerPtr != IntPtr.Zero)
- {
- Marshal.Release(importerPtr);
- }
- }
- return reader;
- }
- }
-
- // We can use reflection-only load context to use reflection to query for metadata information rather
- // than painfully import the com-classic metadata interfaces.
- [Guid("809c652e-7396-11d2-9771-00a0c9b4d50c"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
- [ComVisible(true)]
- internal interface IMetaDataDispenserPrivate
- {
- // We need to be able to call OpenScope, which is the 2nd vtable slot.
- // Thus we need this one placeholder here to occupy the first slot..
- void DefineScope_Placeholder();
-
- //STDMETHOD(OpenScope)( // Return code.
- // LPCWSTR szScope, // [in] The scope to open.
- // DWORD dwOpenFlags, // [in] Open mode flags.
- // REFIID riid, // [in] The interface desired.
- // IUnknown **ppIUnk) PURE; // [out] Return interface on success.
- void OpenScope([In, MarshalAs(UnmanagedType.LPWStr)] String szScope, [In] Int32 dwOpenFlags, [In] ref Guid riid, [Out, MarshalAs(UnmanagedType.IUnknown)] out Object punk);
-
- // There are more methods in this interface, but we don't need them.
- }
- // Since we're just blindly passing this interface through managed code to the Symbinder, we don't care about actually
- // importing the specific methods.
- // This needs to be public so that we can call Marshal.GetComInterfaceForObject() on it to get the
- // underlying metadata pointer.
- // That doesn't mean that you should actually use it though because the interface is basically empty.
- [Guid("7DAC8207-D3AE-4c75-9B67-92801A497D44"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
- [ComVisible(true)]
- public interface IMetadataImportPrivateComVisible
- {
- // Just need a single placeholder method so that it doesn't complain about an empty interface.
- void Placeholder();
- }
-}
diff --git a/main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/SymStore/SymConstant.cs b/main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/SymStore/SymConstant.cs deleted file mode 100644 index efc35235d1..0000000000 --- a/main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/SymStore/SymConstant.cs +++ /dev/null @@ -1,73 +0,0 @@ -//---------------------------------------------------------------------
-// This file is part of the CLR Managed Debugger (mdbg) Sample.
-//
-// Copyright (C) Microsoft Corporation. All rights reserved.
-//---------------------------------------------------------------------
-
-
-// These interfaces serve as an extension to the BCL's SymbolStore interfaces.
-namespace Microsoft.Samples.Debugging.CorSymbolStore
-{
- using System.Diagnostics.SymbolStore;
-
-
- // Interface does not need to be marked with the serializable attribute
- using System;
- using System.Text;
- using System.Runtime.InteropServices;
- using System.Runtime.InteropServices.ComTypes;
-
- [
- ComImport,
- Guid("48B25ED8-5BAD-41bc-9CEE-CD62FABC74E9"),
- InterfaceType(ComInterfaceType.InterfaceIsIUnknown),
- ComVisible(false)
- ]
- internal interface ISymUnmanagedConstant
- {
- void GetName(int cchName,
- out int pcchName,
- [MarshalAs(UnmanagedType.LPWStr)] StringBuilder name);
-
- void GetValue(out Object pValue);
-
- void GetSignature(int cSig,
- out int pcSig,
- [In, Out, MarshalAs(UnmanagedType.LPArray, SizeParamIndex=0)] byte[] sig);
- }
-
- internal class SymConstant : ISymbolConstant
- {
- ISymUnmanagedConstant m_target;
-
- public SymConstant(ISymUnmanagedConstant target)
- {
- m_target = target;
- }
-
- public String GetName()
- {
- int count;
- m_target.GetName(0, out count, null);
- StringBuilder name = new StringBuilder(count);
- m_target.GetName(count, out count, name);
- return name.ToString();
- }
-
- public Object GetValue()
- {
- Object value = null;
- m_target.GetValue(out value);
- return value;
- }
-
- public byte[] GetSignature()
- {
- int count = 0;
- m_target.GetSignature(0, out count, null);
- byte[] sig = new byte[count];
- m_target.GetSignature(count, out count, sig);
- return sig;
- }
- }
-}
diff --git a/main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/SymStore/SymDocument.cs b/main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/SymStore/SymDocument.cs deleted file mode 100644 index b180ebcfac..0000000000 --- a/main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/SymStore/SymDocument.cs +++ /dev/null @@ -1,196 +0,0 @@ -//---------------------------------------------------------------------
-// This file is part of the CLR Managed Debugger (mdbg) Sample.
-//
-// Copyright (C) Microsoft Corporation. All rights reserved.
-//---------------------------------------------------------------------
-
-
-// These interfaces serve as an extension to the BCL's SymbolStore interfaces.
-namespace Microsoft.Samples.Debugging.CorSymbolStore
-{
- using System.Diagnostics.SymbolStore;
-
-
- using System;
- using System.Text;
- using System.Runtime.InteropServices;
-
- [
- ComImport,
- Guid("40DE4037-7C81-3E1E-B022-AE1ABFF2CA08"),
- InterfaceType(ComInterfaceType.InterfaceIsIUnknown),
- ComVisible(false)
- ]
- internal interface ISymUnmanagedDocument
- {
- void GetURL(int cchUrl,
- out int pcchUrl,
- [MarshalAs(UnmanagedType.LPWStr)] StringBuilder szUrl);
-
- void GetDocumentType(ref Guid pRetVal);
-
- void GetLanguage(ref Guid pRetVal);
-
- void GetLanguageVendor(ref Guid pRetVal);
-
- void GetCheckSumAlgorithmId(ref Guid pRetVal);
-
- void GetCheckSum(int cData,
- out int pcData,
- [In, Out, MarshalAs(UnmanagedType.LPArray, SizeParamIndex=0)] byte[] data);
-
- void FindClosestLine(int line,
- out int pRetVal);
-
- void HasEmbeddedSource(out Boolean pRetVal);
-
- void GetSourceLength(out int pRetVal);
-
- void GetSourceRange(int startLine,
- int startColumn,
- int endLine,
- int endColumn,
- int cSourceBytes,
- out int pcSourceBytes,
- [In, Out, MarshalAs(UnmanagedType.LPArray, SizeParamIndex=4)] byte[] source);
-
- };
-
- /// <include file='doc\SymDocument.uex' path='docs/doc[@for="SymDocument"]/*' />
- internal class SymbolDocument : ISymbolDocument
- {
- ISymUnmanagedDocument m_unmanagedDocument;
-
- internal SymbolDocument(ISymUnmanagedDocument document)
- {
- if (document == null)
- {
- throw new ArgumentNullException("document");
- }
- m_unmanagedDocument = document;
- }
-
- /// <include file='doc\SymDocument.uex' path='docs/doc[@for="SymDocument.URL"]/*' />
- public String URL
- {
- get
- {
- StringBuilder URL;
- int cchUrl;
- m_unmanagedDocument.GetURL(0, out cchUrl, null);
- URL = new StringBuilder(cchUrl);
- m_unmanagedDocument.GetURL(cchUrl, out cchUrl, URL);
- return URL.ToString();
- }
- }
-
- /// <include file='doc\SymDocument.uex' path='docs/doc[@for="SymDocument.DocumentType"]/*' />
- public Guid DocumentType
- {
- get
- {
- Guid guid = new Guid();
- m_unmanagedDocument.GetDocumentType(ref guid);
- return guid;
- }
- }
-
- /// <include file='doc\SymDocument.uex' path='docs/doc[@for="SymDocument.Language"]/*' />
- public Guid Language
- {
- get
- {
- Guid guid = new Guid();
- m_unmanagedDocument.GetLanguage(ref guid);
- return guid;
- }
- }
-
- /// <include file='doc\SymDocument.uex' path='docs/doc[@for="SymDocument.LanguageVendor"]/*' />
- public Guid LanguageVendor
- {
- get
- {
- Guid guid = new Guid();
- m_unmanagedDocument.GetLanguageVendor(ref guid);
- return guid;
- }
- }
-
- /// <include file='doc\SymDocument.uex' path='docs/doc[@for="SymDocument.CheckSumAlgorithmId"]/*' />
- public Guid CheckSumAlgorithmId
- {
- get
- {
- Guid guid = new Guid();
- m_unmanagedDocument.GetCheckSumAlgorithmId(ref guid);
- return guid;
- }
- }
-
- /// <include file='doc\SymDocument.uex' path='docs/doc[@for="SymDocument.GetCheckSum"]/*' />
- public byte[] GetCheckSum()
- {
- byte[] Data;
- int cData = 0;
- m_unmanagedDocument.GetCheckSum(0, out cData, null);
- Data = new byte[cData];
- m_unmanagedDocument.GetCheckSum(cData, out cData, Data);
- return Data;
- }
-
-
- /// <include file='doc\SymDocument.uex' path='docs/doc[@for="SymDocument.FindClosestLine"]/*' />
- public int FindClosestLine(int line)
- {
- int closestLine = 0;
- m_unmanagedDocument.FindClosestLine(line, out closestLine);
- return closestLine;
- }
-
- /// <include file='doc\SymDocument.uex' path='docs/doc[@for="SymDocument.HasEmbeddedSource"]/*' />
- public bool HasEmbeddedSource
- {
- get
- {
- bool retVal = false;
- m_unmanagedDocument.HasEmbeddedSource(out retVal);
- return retVal;
- }
- }
-
- /// <include file='doc\SymDocument.uex' path='docs/doc[@for="SymDocument.SourceLength"]/*' />
- public int SourceLength
- {
- get
- {
- int retVal = 0;
- m_unmanagedDocument.GetSourceLength(out retVal);
- return retVal;
- }
- }
-
-
-
- /// <include file='doc\SymDocument.uex' path='docs/doc[@for="SymDocument.GetSourceRange"]/*' />
- public byte[] GetSourceRange(int startLine, int startColumn,
- int endLine, int endColumn)
- {
- byte[] Data;
- int count = 0;
- m_unmanagedDocument.GetSourceRange(startLine, startColumn, endLine, endColumn, 0, out count, null);
- Data = new byte[count];
- m_unmanagedDocument.GetSourceRange(startLine, startColumn, endLine, endColumn, count, out count, Data);
- return Data;
- }
-
- internal ISymUnmanagedDocument InternalDocument
- {
- get
- {
- return m_unmanagedDocument;
- }
- }
-
- }
-}
diff --git a/main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/SymStore/SymDocumentWriter.cs b/main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/SymStore/SymDocumentWriter.cs deleted file mode 100644 index e6165cd277..0000000000 --- a/main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/SymStore/SymDocumentWriter.cs +++ /dev/null @@ -1,68 +0,0 @@ -//---------------------------------------------------------------------
-// This file is part of the CLR Managed Debugger (mdbg) Sample.
-//
-// Copyright (C) Microsoft Corporation. All rights reserved.
-//---------------------------------------------------------------------
-
-
-// These interfaces serve as an extension to the BCL's SymbolStore interfaces.
-namespace Microsoft.Samples.Debugging.CorSymbolStore
-{
- using System.Diagnostics.SymbolStore;
-
-
- using System;
- using System.Text;
- using System.Runtime.InteropServices;
- using System.Runtime.InteropServices.ComTypes;
-
- // Interface does not need to be marked with the serializable attribute
- /// <include file='doc\ISymDocumentWriter.uex' path='docs/doc[@for="ISymbolDocumentWriter"]/*' />
- [
- ComImport,
- Guid("B01FAFEB-C450-3A4D-BEEC-B4CEEC01E006"),
- InterfaceType(ComInterfaceType.InterfaceIsIUnknown),
- ComVisible(false)
- ]
- internal interface ISymUnmanagedDocumentWriter
- {
- void SetSource(int sourceSize,
- [MarshalAs(UnmanagedType.LPArray, SizeParamIndex=0)] byte[] source);
-
- void SetCheckSum(Guid algorithmId,
- int checkSumSize,
- [MarshalAs(UnmanagedType.LPArray, SizeParamIndex=1)] byte[] checkSum);
- };
-
-
- internal class SymDocumentWriter: ISymbolDocumentWriter
- {
- ISymUnmanagedDocumentWriter m_unmanagedDocumentWriter;
-
- public SymDocumentWriter(ISymUnmanagedDocumentWriter unmanagedDocumentWriter)
- {
- m_unmanagedDocumentWriter = unmanagedDocumentWriter;
- }
-
- public void SetSource(byte[] source)
- {
- m_unmanagedDocumentWriter.SetSource(source.Length, source);
- }
-
- public void SetCheckSum(Guid algorithmId, byte[] checkSum)
- {
- m_unmanagedDocumentWriter.SetCheckSum(algorithmId, checkSum.Length, checkSum);
- }
-
- // Public API
- internal ISymUnmanagedDocumentWriter InternalDocumentWriter
- {
- get
- {
- return m_unmanagedDocumentWriter;
- }
- }
-
-
- }
-}
diff --git a/main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/SymStore/SymNamespace.cs b/main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/SymStore/SymNamespace.cs deleted file mode 100644 index 9b9b0f2255..0000000000 --- a/main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/SymStore/SymNamespace.cs +++ /dev/null @@ -1,97 +0,0 @@ -//---------------------------------------------------------------------
-// This file is part of the CLR Managed Debugger (mdbg) Sample.
-//
-// Copyright (C) Microsoft Corporation. All rights reserved.
-//---------------------------------------------------------------------
-
-
-// These interfaces serve as an extension to the BCL's SymbolStore interfaces.
-namespace Microsoft.Samples.Debugging.CorSymbolStore
-{
- using System.Diagnostics.SymbolStore;
-
- using System;
- using System.Text;
- using System.Runtime.InteropServices;
- using System.Runtime.InteropServices.ComTypes;
-
- // Interface does not need to be marked with the serializable attribute
- /// <include file='doc\ISymNamespace.uex' path='docs/doc[@for="ISymbolNamespace"]/*' />
- [
- ComImport,
- Guid("0DFF7289-54F8-11d3-BD28-0000F80849BD"),
- InterfaceType(ComInterfaceType.InterfaceIsIUnknown),
- ComVisible(false)
- ]
- internal interface ISymUnmanagedNamespace
- {
- void GetName(int cchName,
- out int pcchName,
- [MarshalAs(UnmanagedType.LPWStr)] StringBuilder szName);
-
- void GetNamespaces(int cNameSpaces,
- out int pcNameSpaces,
- [In, Out, MarshalAs(UnmanagedType.LPArray, SizeParamIndex=0)] ISymUnmanagedNamespace[] namespaces);
-
- void GetVariables(int cVars,
- out int pcVars,
- [In, Out, MarshalAs(UnmanagedType.LPArray, SizeParamIndex=0)] ISymUnmanagedVariable[] pVars);
- }
-
-
-
- internal class SymNamespace : ISymbolNamespace
- {
- ISymUnmanagedNamespace m_unmanagedNamespace;
-
- internal SymNamespace(ISymUnmanagedNamespace nameSpace)
- {
- m_unmanagedNamespace = nameSpace;
- }
-
- public String Name
- {
- get
- {
- StringBuilder Name;
- int cchName = 0;
- m_unmanagedNamespace.GetName(0, out cchName, null);
- Name = new StringBuilder(cchName);
- m_unmanagedNamespace.GetName(cchName, out cchName, Name);
- return Name.ToString();
- }
- }
-
- public ISymbolNamespace[] GetNamespaces()
- {
- uint i;
- int cNamespaces = 0;
- m_unmanagedNamespace.GetNamespaces(0, out cNamespaces, null);
- ISymUnmanagedNamespace[] unmamagedNamespaces = new ISymUnmanagedNamespace[cNamespaces];
- m_unmanagedNamespace.GetNamespaces(cNamespaces, out cNamespaces, unmamagedNamespaces);
-
- ISymbolNamespace[] Namespaces = new ISymbolNamespace[cNamespaces];
- for (i = 0; i < cNamespaces; i++)
- {
- Namespaces[i] = new SymNamespace(unmamagedNamespaces[i]);
- }
- return Namespaces;
- }
-
- public ISymbolVariable[] GetVariables()
- {
- int cVars = 0;
- uint i;
- m_unmanagedNamespace.GetVariables(0, out cVars, null);
- ISymUnmanagedVariable[] unmanagedVariables = new ISymUnmanagedVariable[cVars];
- m_unmanagedNamespace.GetVariables(cVars, out cVars, unmanagedVariables);
-
- ISymbolVariable[] Variables = new ISymbolVariable[cVars];
- for (i = 0; i < cVars; i++)
- {
- Variables[i] = new SymVariable(unmanagedVariables[i]);
- }
- return Variables;
- }
- }
-}
diff --git a/main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/SymStore/SymReader.cs b/main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/SymStore/SymReader.cs deleted file mode 100644 index 9d31798156..0000000000 --- a/main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/SymStore/SymReader.cs +++ /dev/null @@ -1,458 +0,0 @@ -//---------------------------------------------------------------------
-// This file is part of the CLR Managed Debugger (mdbg) Sample.
-//
-// Copyright (C) Microsoft Corporation. All rights reserved.
-//---------------------------------------------------------------------
-
-
-// These interfaces serve as an extension to the BCL's SymbolStore interfaces.
-namespace Microsoft.Samples.Debugging.CorSymbolStore
-{
- using System.Diagnostics.SymbolStore;
- using Microsoft.Samples.Debugging.CorDebug;
-
- // Interface does not need to be marked with the serializable attribute
- using System;
- using System.Text;
- using System.Runtime.InteropServices;
- using System.Runtime.InteropServices.ComTypes;
-
- [
- ComImport,
- Guid("969708D2-05E5-4861-A3B0-96E473CDF63F"),
- InterfaceType(ComInterfaceType.InterfaceIsIUnknown),
- ComVisible(false)
- ]
- public interface ISymUnmanagedDispose
- {
- int Destroy();
- }
-
- [
- ComImport,
- Guid("B4CE6286-2A6B-3712-A3B7-1EE1DAD467B5"),
- InterfaceType(ComInterfaceType.InterfaceIsIUnknown),
- ComVisible(false)
- ]
- internal interface ISymUnmanagedReader
- {
- void GetDocument([MarshalAs(UnmanagedType.LPWStr)] String url,
- Guid language,
- Guid languageVendor,
- Guid documentType,
- [MarshalAs(UnmanagedType.Interface)] out ISymUnmanagedDocument retVal);
-
- void GetDocuments(int cDocs,
- out int pcDocs,
- [In, Out, MarshalAs(UnmanagedType.LPArray, SizeParamIndex=0)] ISymUnmanagedDocument[] pDocs);
-
-
- // These methods will often return error HRs in common cases.
- // Using PreserveSig and manually handling error cases provides a big performance win.
- // Far fewer exceptions will be thrown and caught.
- // Exceptions should be reserved for truely "exceptional" cases.
- [PreserveSig]
- int GetUserEntryPoint(out SymbolToken EntryPoint);
-
- [PreserveSig]
- int GetMethod(SymbolToken methodToken,
- [MarshalAs(UnmanagedType.Interface)] out ISymUnmanagedMethod retVal);
-
- [PreserveSig]
- int GetMethodByVersion(SymbolToken methodToken,
- int version,
- [MarshalAs(UnmanagedType.Interface)] out ISymUnmanagedMethod retVal);
-
- void GetVariables(SymbolToken parent,
- int cVars,
- out int pcVars,
- [In, Out, MarshalAs(UnmanagedType.LPArray, SizeParamIndex=1)] ISymUnmanagedVariable[] vars);
-
- void GetGlobalVariables(int cVars,
- out int pcVars,
- [In, Out, MarshalAs(UnmanagedType.LPArray, SizeParamIndex=0)] ISymUnmanagedVariable[] vars);
-
-
- void GetMethodFromDocumentPosition(ISymUnmanagedDocument document,
- int line,
- int column,
- [MarshalAs(UnmanagedType.Interface)] out ISymUnmanagedMethod retVal);
-
- void GetSymAttribute(SymbolToken parent,
- [MarshalAs(UnmanagedType.LPWStr)] String name,
- int sizeBuffer,
- out int lengthBuffer,
- [In, Out, MarshalAs(UnmanagedType.LPArray, SizeParamIndex=2)] byte[] buffer);
-
- void GetNamespaces(int cNameSpaces,
- out int pcNameSpaces,
- [In, Out, MarshalAs(UnmanagedType.LPArray, SizeParamIndex=0)] ISymUnmanagedNamespace[] namespaces);
-
- void Initialize(IntPtr importer,
- [MarshalAs(UnmanagedType.LPWStr)] String filename,
- [MarshalAs(UnmanagedType.LPWStr)] String searchPath,
- IStream stream);
-
- void UpdateSymbolStore([MarshalAs(UnmanagedType.LPWStr)] String filename,
- IStream stream);
-
- void ReplaceSymbolStore([MarshalAs(UnmanagedType.LPWStr)] String filename,
- IStream stream);
-
- void GetSymbolStoreFileName(int cchName,
- out int pcchName,
- [MarshalAs(UnmanagedType.LPWStr)] StringBuilder szName);
-
- void GetMethodsFromDocumentPosition(ISymUnmanagedDocument document,
- int line,
- int column,
- int cMethod,
- out int pcMethod,
- [In, Out, MarshalAs(UnmanagedType.LPArray, SizeParamIndex=3)] ISymUnmanagedMethod[] pRetVal);
-
- void GetDocumentVersion(ISymUnmanagedDocument pDoc,
- out int version,
- out Boolean pbCurrent);
-
- void GetMethodVersion(ISymUnmanagedMethod pMethod,
- out int version);
- };
-
- [
- ComImport,
- Guid("E502D2DD-8671-4338-8F2A-FC08229628C4"),
- InterfaceType(ComInterfaceType.InterfaceIsIUnknown),
- ComVisible(false)
- ]
- internal interface ISymUnmanagedEncUpdate
- {
-
- void UpdateSymbolStore2(IStream stream,
- [MarshalAs(UnmanagedType.LPArray)] SymbolLineDelta[] iSymbolLineDeltas,
- int cDeltaLines);
-
- void GetLocalVariableCount(SymbolToken mdMethodToken,
- out int pcLocals);
-
- void GetLocalVariables(SymbolToken mdMethodToken,
- int cLocals,
- [In, Out, MarshalAs(UnmanagedType.LPArray, SizeParamIndex=1)] ISymUnmanagedVariable[] rgLocals,
- out int pceltFetched);
- }
-
-
- [
- ComImport,
- Guid("20D9645D-03CD-4e34-9C11-9848A5B084F1"),
- InterfaceType(ComInterfaceType.InterfaceIsIUnknown),
- ComVisible(false)
- ]
- internal interface ISymUnmanagedReaderSymbolSearchInfo
- {
- void GetSymbolSearchInfoCount(out int pcSearchInfo);
-
- void GetSymbolSearchInfo(int cSearchInfo,
- out int pcSearchInfo,
- [In, Out, MarshalAs(UnmanagedType.LPArray, SizeParamIndex=0)] ISymUnmanagedSymbolSearchInfo[] searchInfo);
- }
-
-
- internal class SymReader : ISymbolReader, ISymbolReader2, ISymbolReaderSymbolSearchInfo, ISymbolEncUpdate, IDisposable
- {
-
- private ISymUnmanagedReader m_reader; // Unmanaged Reader pointer
-
- internal SymReader(ISymUnmanagedReader reader)
- {
- m_reader = reader;
- }
-
- public void Dispose()
- {
- var disposable = m_reader as ISymUnmanagedDispose;
- if (disposable != null)
- disposable.Destroy();
- m_reader = null;
- }
-
- public ISymbolDocument GetDocument(String url,
- Guid language,
- Guid languageVendor,
- Guid documentType)
- {
- ISymUnmanagedDocument document = null;
- m_reader.GetDocument(url, language, languageVendor, documentType, out document);
- if (document == null)
- {
- return null;
- }
- return new SymbolDocument(document);
- }
-
- public ISymbolDocument[] GetDocuments()
- {
- int cDocs = 0;
- m_reader.GetDocuments(0, out cDocs, null);
- ISymUnmanagedDocument[] unmanagedDocuments = new ISymUnmanagedDocument[cDocs];
- m_reader.GetDocuments(cDocs, out cDocs, unmanagedDocuments);
-
- ISymbolDocument[] documents = new SymbolDocument[cDocs];
- uint i;
- for (i = 0; i < cDocs; i++)
- {
- documents[i] = new SymbolDocument(unmanagedDocuments[i]);
- }
- return documents;
- }
-
- public SymbolToken UserEntryPoint
- {
- get
- {
- SymbolToken entryPoint;
- int hr = m_reader.GetUserEntryPoint(out entryPoint);
- if (hr == (int)HResult.E_FAIL)
- {
- // Not all assemblies have entry points
- // dlls for example...
- return new SymbolToken(0);
- }
- else
- {
- Marshal.ThrowExceptionForHR(hr);
- }
- return entryPoint;
- }
- }
-
- public ISymbolMethod GetMethod(SymbolToken method)
- {
- ISymUnmanagedMethod unmanagedMethod = null;
- int hr = m_reader.GetMethod(method, out unmanagedMethod);
- if (hr == (int)HResult.E_FAIL)
- {
- // This means that the method has no symbol info because it's probably empty
- // This can happen for virtual methods with no IL
- return null;
- }
- else
- {
- Marshal.ThrowExceptionForHR(hr);
- }
- return new SymMethod(unmanagedMethod);
- }
-
- public ISymbolMethod GetMethod(SymbolToken method, int version)
- {
- ISymUnmanagedMethod unmanagedMethod = null;
- int hr = m_reader.GetMethodByVersion(method, version, out unmanagedMethod);
- if (hr == (int)HResult.E_FAIL)
- {
- // This means that the method has no symbol info because it's probably empty
- // This can happen for virtual methods with no IL
- return null;
- }
- else
- {
- Marshal.ThrowExceptionForHR(hr);
- }
- return new SymMethod(unmanagedMethod);
- }
-
- public ISymbolVariable[] GetVariables(SymbolToken parent)
- {
- int cVars = 0;
- uint i;
- m_reader.GetVariables(parent, 0, out cVars, null);
- ISymUnmanagedVariable[] unmanagedVariables = new ISymUnmanagedVariable[cVars];
- m_reader.GetVariables(parent, cVars, out cVars, unmanagedVariables);
- SymVariable[] variables = new SymVariable[cVars];
-
- for (i = 0; i < cVars; i++)
- {
- variables[i] = new SymVariable(unmanagedVariables[i]);
- }
- return variables;
- }
-
- public ISymbolVariable[] GetGlobalVariables()
- {
- int cVars = 0;
- uint i;
- m_reader.GetGlobalVariables(0, out cVars, null);
- ISymUnmanagedVariable[] unmanagedVariables = new ISymUnmanagedVariable[cVars];
- m_reader.GetGlobalVariables(cVars, out cVars, unmanagedVariables);
- SymVariable[] variables = new SymVariable[cVars];
-
- for (i = 0; i < cVars; i++)
- {
- variables[i] = new SymVariable(unmanagedVariables[i]);
- }
- return variables;
- }
-
- public ISymbolMethod GetMethodFromDocumentPosition(ISymbolDocument document,
- int line,
- int column)
- {
- ISymUnmanagedMethod unmanagedMethod = null;
- m_reader.GetMethodFromDocumentPosition(((SymbolDocument)document).InternalDocument, line, column, out unmanagedMethod);
- return new SymMethod(unmanagedMethod);
- }
-
- public byte[] GetSymAttribute(SymbolToken parent, String name)
- {
- byte[] Data;
- int cData = 0;
- m_reader.GetSymAttribute(parent, name, 0, out cData, null);
- Data = new byte[cData];
- m_reader.GetSymAttribute(parent, name, cData, out cData, Data);
- return Data;
- }
-
- public ISymbolNamespace[] GetNamespaces()
- {
- int count = 0;
- uint i;
- m_reader.GetNamespaces(0, out count, null);
- ISymUnmanagedNamespace[] unmanagedNamespaces = new ISymUnmanagedNamespace[count];
- m_reader.GetNamespaces(count, out count, unmanagedNamespaces);
- ISymbolNamespace[] namespaces = new SymNamespace[count];
-
- for (i = 0; i < count; i++)
- {
- namespaces[i] = new SymNamespace(unmanagedNamespaces[i]);
- }
- return namespaces;
- }
-
- public void Initialize(Object importer, String filename,
- String searchPath, IStream stream)
- {
- IntPtr uImporter = IntPtr.Zero;
- try {
- uImporter = Marshal.GetIUnknownForObject(importer);
- m_reader.Initialize(uImporter, filename, searchPath, stream);
- } finally {
- if (uImporter != IntPtr.Zero)
- Marshal.Release(uImporter);
- }
- }
-
- public void UpdateSymbolStore(String fileName, IStream stream)
- {
- m_reader.UpdateSymbolStore(fileName, stream);
- }
-
- public void ReplaceSymbolStore(String fileName, IStream stream)
- {
- m_reader.ReplaceSymbolStore(fileName, stream);
- }
-
-
- public String GetSymbolStoreFileName()
- {
- StringBuilder fileName;
- int count = 0;
-
- // there's a known issue in Diasymreader where we can't query the size of the pdb filename.
- // So we'll just estimate large as a workaround.
-
- count = 300;
- fileName = new StringBuilder(count);
- m_reader.GetSymbolStoreFileName(count, out count, fileName);
- return fileName.ToString();
- }
-
- public ISymbolMethod[] GetMethodsFromDocumentPosition(
- ISymbolDocument document, int line, int column)
-
- {
- ISymUnmanagedMethod[] unmanagedMethods;
- ISymbolMethod[] methods;
- int count = 0;
- uint i;
- m_reader.GetMethodsFromDocumentPosition(((SymbolDocument)document).InternalDocument, line, column, 0, out count, null);
- unmanagedMethods = new ISymUnmanagedMethod[count];
- m_reader.GetMethodsFromDocumentPosition(((SymbolDocument)document).InternalDocument, line, column, count, out count, unmanagedMethods);
- methods = new ISymbolMethod[count];
-
- for (i = 0; i < count; i++)
- {
- methods[i] = new SymMethod(unmanagedMethods[i]);
- }
- return methods;
- }
-
- public int GetDocumentVersion(ISymbolDocument document,
- out Boolean isCurrent)
- {
- int version = 0;
- m_reader.GetDocumentVersion(((SymbolDocument)document).InternalDocument, out version, out isCurrent);
- return version;
- }
-
- public int GetMethodVersion(ISymbolMethod method)
- {
- int version = 0;
- m_reader.GetMethodVersion(((SymMethod)method).InternalMethod, out version);
- return version;
- }
-
-
- public void UpdateSymbolStore(IStream stream,
- SymbolLineDelta[] iSymbolLineDeltas)
- {
- ((ISymUnmanagedEncUpdate)m_reader).UpdateSymbolStore2(stream, iSymbolLineDeltas, iSymbolLineDeltas.Length);
- }
-
- public int GetLocalVariableCount(SymbolToken mdMethodToken)
- {
- int count = 0;
- ((ISymUnmanagedEncUpdate)m_reader).GetLocalVariableCount(mdMethodToken, out count);
- return count;
- }
-
- public ISymbolVariable[] GetLocalVariables(SymbolToken mdMethodToken)
- {
- int count = 0;
- ((ISymUnmanagedEncUpdate)m_reader).GetLocalVariables(mdMethodToken, 0, null, out count);
- ISymUnmanagedVariable[] unmanagedVariables = new ISymUnmanagedVariable[count];
- ((ISymUnmanagedEncUpdate)m_reader).GetLocalVariables(mdMethodToken, count, unmanagedVariables, out count);
-
- ISymbolVariable[] variables = new ISymbolVariable[count];
- uint i;
- for (i = 0; i < count; i++)
- {
- variables[i] = new SymVariable(unmanagedVariables[i]);
- }
- return variables;
- }
-
-
- public int GetSymbolSearchInfoCount()
- {
- int count = 0;
- ((ISymUnmanagedReaderSymbolSearchInfo)m_reader).GetSymbolSearchInfoCount(out count);
- return count;
- }
-
- public ISymbolSearchInfo[] GetSymbolSearchInfo()
- {
- int count = 0;
- ((ISymUnmanagedReaderSymbolSearchInfo)m_reader).GetSymbolSearchInfo(0, out count, null);
- ISymUnmanagedSymbolSearchInfo[] unmanagedSearchInfo = new ISymUnmanagedSymbolSearchInfo[count];
- ((ISymUnmanagedReaderSymbolSearchInfo)m_reader).GetSymbolSearchInfo(count, out count, unmanagedSearchInfo);
-
- ISymbolSearchInfo[] searchInfo = new ISymbolSearchInfo[count];
-
- uint i;
- for (i = 0; i < count; i++)
- {
- searchInfo[i] = new SymSymbolSearchInfo(unmanagedSearchInfo[i]);
- }
- return searchInfo;
-
- }
- }
-}
diff --git a/main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/SymStore/SymScope.cs b/main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/SymStore/SymScope.cs deleted file mode 100644 index c8cb9e5fcf..0000000000 --- a/main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/SymStore/SymScope.cs +++ /dev/null @@ -1,226 +0,0 @@ -//---------------------------------------------------------------------
-// This file is part of the CLR Managed Debugger (mdbg) Sample.
-//
-// Copyright (C) Microsoft Corporation. All rights reserved.
-//---------------------------------------------------------------------
-
-
-// These interfaces serve as an extension to the BCL's SymbolStore interfaces.
-namespace Microsoft.Samples.Debugging.CorSymbolStore
-{
- using System.Diagnostics.SymbolStore;
-
- // Interface does not need to be marked with the serializable attribute
- using System;
- using System.Text;
- using System.Runtime.InteropServices;
- using System.Runtime.InteropServices.ComTypes;
-
- [
- ComImport,
- Guid("68005D0F-B8E0-3B01-84D5-A11A94154942"),
- InterfaceType(ComInterfaceType.InterfaceIsIUnknown),
- ComVisible(false)
- ]
- internal interface ISymUnmanagedScope
- {
- void GetMethod([MarshalAs(UnmanagedType.Interface)] out ISymUnmanagedMethod pRetVal);
-
- void GetParent([MarshalAs(UnmanagedType.Interface)] out ISymUnmanagedScope pRetVal);
-
- void GetChildren(int cChildren,
- out int pcChildren,
- [In, Out, MarshalAs(UnmanagedType.LPArray, SizeParamIndex=0)] ISymUnmanagedScope[] children);
-
- void GetStartOffset(out int pRetVal);
-
- void GetEndOffset(out int pRetVal);
-
- void GetLocalCount(out int pRetVal);
-
- void GetLocals(int cLocals,
- out int pcLocals,
- [In, Out, MarshalAs(UnmanagedType.LPArray, SizeParamIndex=0)] ISymUnmanagedVariable[] locals);
-
- void GetNamespaces(int cNameSpaces,
- out int pcNameSpaces,
- [In, Out, MarshalAs(UnmanagedType.LPArray, SizeParamIndex=0)] ISymUnmanagedNamespace[] namespaces);
- };
-
- [
- ComImport,
- Guid("AE932FBA-3FD8-4dba-8232-30A2309B02DB"),
- InterfaceType(ComInterfaceType.InterfaceIsIUnknown),
- ComVisible(false)
- ]
- internal interface ISymUnmanagedScope2 : ISymUnmanagedScope
- {
- // ISymUnmanagedScope methods (need to define the base interface methods also, per COM interop requirements)
- new void GetMethod([MarshalAs(UnmanagedType.Interface)] out ISymUnmanagedMethod pRetVal);
-
- new void GetParent([MarshalAs(UnmanagedType.Interface)] out ISymUnmanagedScope pRetVal);
-
- new void GetChildren(int cChildren,
- out int pcChildren,
- [In, Out, MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 0)] ISymUnmanagedScope[] children);
-
- new void GetStartOffset(out int pRetVal);
-
- new void GetEndOffset(out int pRetVal);
-
- new void GetLocalCount(out int pRetVal);
-
- new void GetLocals(int cLocals,
- out int pcLocals,
- [In, Out, MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 0)] ISymUnmanagedVariable[] locals);
-
- new void GetNamespaces(int cNameSpaces,
- out int pcNameSpaces,
- [In, Out, MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 0)] ISymUnmanagedNamespace[] namespaces);
-
- // ISymUnmanagedScope2 methods
- void GetConstantCount(out int pRetVal);
-
- void GetConstants(int cConstants,
- out int pcConstants,
- [In, Out, MarshalAs(UnmanagedType.LPArray, SizeParamIndex=0)] ISymUnmanagedConstant[] constants);
- }
-
-
- internal class SymScope : ISymbolScope, ISymbolScope2
- {
- ISymUnmanagedScope m_target;
-
- internal SymScope(ISymUnmanagedScope target)
- {
- m_target = target;
- }
-
- public ISymbolMethod Method
- {
- get
- {
- ISymUnmanagedMethod uMethod = null;
- m_target.GetMethod(out uMethod);
- return new SymMethod(uMethod);
- }
- }
-
- public ISymbolScope Parent
- {
- get
- {
- ISymUnmanagedScope uScope = null;
- m_target.GetParent(out uScope);
- return new SymScope(uScope);
- }
- }
-
- public ISymbolScope[] GetChildren()
- {
- int count;
- m_target.GetChildren(0, out count, null);
- ISymUnmanagedScope[] uScopes = new ISymUnmanagedScope[count];
- m_target.GetChildren(count, out count, uScopes);
-
- int i;
- ISymbolScope[] scopes = new ISymbolScope[count];
- for (i = 0; i < count; i++)
- {
- scopes[i] = new SymScope(uScopes[i]);
- }
- return scopes;
- }
-
- public int StartOffset
- {
- get
- {
- int offset;
- m_target.GetStartOffset(out offset);
- return offset;
- }
- }
-
-
- public int EndOffset
- {
- get
- {
- int offset;
- m_target.GetEndOffset(out offset);
- return offset;
- }
- }
-
- public ISymbolVariable[] GetLocals()
- {
- int count;
- m_target.GetLocals(0, out count, null);
- ISymUnmanagedVariable[] uVariables = new ISymUnmanagedVariable[count];
- m_target.GetLocals(count, out count, uVariables);
-
- int i;
- ISymbolVariable[] variables = new ISymbolVariable[count];
- for (i = 0; i < count; i++)
- {
- variables[i] = new SymVariable(uVariables[i]);
- }
- return variables;
- }
-
- public ISymbolNamespace[] GetNamespaces()
- {
- int count;
- m_target.GetNamespaces(0, out count, null);
- ISymUnmanagedNamespace[] uNamespaces = new ISymUnmanagedNamespace[count];
- m_target.GetNamespaces(count, out count, uNamespaces);
-
- int i;
- ISymbolNamespace[] namespaces = new ISymbolNamespace[count];
- for (i = 0; i < count; i++)
- {
- namespaces[i] = new SymNamespace(uNamespaces[i]);
- }
- return namespaces;
- }
-
- public int LocalCount
- {
- get
- {
- int count;
- m_target.GetLocalCount(out count);
- return count;
- }
- }
-
- public int ConstantCount
- {
- get
- {
- int count;
- ((ISymUnmanagedScope2)m_target).GetConstantCount(out count);
- return count;
- }
- }
-
- public ISymbolConstant[] GetConstants()
- {
- int count;
- ((ISymUnmanagedScope2)m_target).GetConstants(0, out count, null);
- ISymUnmanagedConstant[] uConstants = new ISymUnmanagedConstant[count];
- ((ISymUnmanagedScope2)m_target).GetConstants(count, out count, uConstants);
-
- int i;
- ISymbolConstant[] Constants = new ISymbolConstant[count];
- for (i = 0; i < count; i++)
- {
- Constants[i] = new SymConstant(uConstants[i]);
- }
- return Constants;
- }
-
-
- }
-}
diff --git a/main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/SymStore/SymSearchInfo.cs b/main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/SymStore/SymSearchInfo.cs deleted file mode 100644 index 712277dcb4..0000000000 --- a/main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/SymStore/SymSearchInfo.cs +++ /dev/null @@ -1,78 +0,0 @@ -//---------------------------------------------------------------------
-// This file is part of the CLR Managed Debugger (mdbg) Sample.
-//
-// Copyright (C) Microsoft Corporation. All rights reserved.
-//---------------------------------------------------------------------
-
-
-// These interfaces serve as an extension to the BCL's SymbolStore interfaces.
-namespace Microsoft.Samples.Debugging.CorSymbolStore
-{
- using System.Diagnostics.SymbolStore;
-
- // Interface does not need to be marked with the serializable attribute
- using System;
- using System.Text;
- using System.Runtime.InteropServices;
- using System.Runtime.InteropServices.ComTypes;
-
- [
- ComImport,
- Guid("F8B3534A-A46B-4980-B520-BEC4ACEABA8F"),
- InterfaceType(ComInterfaceType.InterfaceIsIUnknown),
- ComVisible(false)
- ]
- internal interface ISymUnmanagedSymbolSearchInfo
- {
- void GetSearchPathLength(out int pcchPath);
-
- void GetSearchPath(int cchPath,
- out int pcchPath,
- [MarshalAs(UnmanagedType.LPWStr)] StringBuilder szPath);
-
- void GetHRESULT(out int hr);
- }
-
- internal class SymSymbolSearchInfo : ISymbolSearchInfo
- {
- ISymUnmanagedSymbolSearchInfo m_target;
-
- public SymSymbolSearchInfo(ISymUnmanagedSymbolSearchInfo target)
- {
- m_target = target;
- }
-
- public int SearchPathLength
- {
- get
- {
- int length;
- m_target.GetSearchPathLength(out length);
- return length;
- }
- }
-
- public String SearchPath
- {
- get
- {
- int length;
- m_target.GetSearchPath(0, out length, null);
- StringBuilder path = new StringBuilder(length);
- m_target.GetSearchPath(length, out length, path);
- return path.ToString();
- }
- }
-
- public int HResult
- {
- get
- {
- int hr;
- m_target.GetHRESULT(out hr);
- return hr;
- }
- }
- }
-
-}
diff --git a/main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/SymStore/SymSearchPolicyAttributes.cs b/main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/SymStore/SymSearchPolicyAttributes.cs deleted file mode 100644 index 01c24612b6..0000000000 --- a/main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/SymStore/SymSearchPolicyAttributes.cs +++ /dev/null @@ -1,32 +0,0 @@ -//---------------------------------------------------------------------
-// This file is part of the CLR Managed Debugger (mdbg) Sample.
-//
-// Copyright (C) Microsoft Corporation. All rights reserved.
-//---------------------------------------------------------------------
-
-
-// These interfaces serve as an extension to the BCL's SymbolStore interfaces.
-namespace Microsoft.Samples.Debugging.CorSymbolStore
-{
- using System.Diagnostics.SymbolStore;
-
- // Only statics, does not need to be marked with the serializable attribute
- using System;
-
- [Serializable(), FlagsAttribute()]
- public enum SymSearchPolicies
- {
- // query the registry for symbol search paths
- AllowRegistryAccess = 1,
-
- // access a symbol server
- AllowSymbolServerAccess = 2,
-
- // Look at the path specified in Debug Directory
- AllowOriginalPathAccess = 4,
-
- // look for PDB in the place where the exe is.
- AllowReferencePathAccess = 8,
-
- }
-}
diff --git a/main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/SymStore/SymWriter.cs b/main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/SymStore/SymWriter.cs deleted file mode 100644 index c7ea23578b..0000000000 --- a/main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/SymStore/SymWriter.cs +++ /dev/null @@ -1,748 +0,0 @@ -//---------------------------------------------------------------------
-// This file is part of the CLR Managed Debugger (mdbg) Sample.
-//
-// Copyright (C) Microsoft Corporation. All rights reserved.
-//---------------------------------------------------------------------
-
-
-// These interfaces serve as an extension to the BCL's SymbolStore interfaces.
-namespace Microsoft.Samples.Debugging.CorSymbolStore
-{
- using System.Diagnostics.SymbolStore;
-
-
- using System;
- using System.Reflection;
- using System.Runtime.InteropServices;
- using System.Runtime.InteropServices.ComTypes;
-
- [
- ComImport,
- Guid("ED14AA72-78E2-4884-84E2-334293AE5214"),
- InterfaceType(ComInterfaceType.InterfaceIsIUnknown),
- ComVisible(false)
- ]
- internal interface ISymUnmanagedWriter
- {
- void DefineDocument([MarshalAs(UnmanagedType.LPWStr)] String url,
- ref Guid language,
- ref Guid languageVendor,
- ref Guid documentType,
- [MarshalAs(UnmanagedType.Interface)] out ISymUnmanagedDocumentWriter RetVal);
-
- void SetUserEntryPoint(SymbolToken entryMethod);
-
- void OpenMethod(SymbolToken method);
-
- void CloseMethod();
-
- void OpenScope(int startOffset,
- out int pRetVal);
-
- void CloseScope(int endOffset);
-
- void SetScopeRange(int scopeID,
- int startOffset,
- int endOffset);
-
- void DefineLocalVariable([MarshalAs(UnmanagedType.LPWStr)] String name,
- int attributes,
- int cSig,
- [MarshalAs(UnmanagedType.LPArray, SizeParamIndex=2)] byte[] signature,
- int addressKind,
- int addr1,
- int addr2,
- int addr3,
- int startOffset,
- int endOffset);
-
- void DefineParameter([MarshalAs(UnmanagedType.LPWStr)] String name,
- int attributes,
- int sequence,
- int addressKind,
- int addr1,
- int addr2,
- int addr3);
-
- void DefineField(SymbolToken parent,
- [MarshalAs(UnmanagedType.LPWStr)] String name,
- int attributes,
- int cSig,
- [MarshalAs(UnmanagedType.LPArray, SizeParamIndex=3)] byte[] signature,
- int addressKind,
- int addr1,
- int addr2,
- int addr3);
-
- void DefineGlobalVariable([MarshalAs(UnmanagedType.LPWStr)] String name,
- int attributes,
- int cSig,
- [MarshalAs(UnmanagedType.LPArray, SizeParamIndex=2)] byte[] signature,
- int addressKind,
- int addr1,
- int addr2,
- int addr3);
-
- void Close();
-
- void SetSymAttribute(SymbolToken parent,
- [MarshalAs(UnmanagedType.LPWStr)] String name,
- int cData,
- [MarshalAs(UnmanagedType.LPArray, SizeParamIndex=2)] byte[] data);
-
- void OpenNamespace([MarshalAs(UnmanagedType.LPWStr)] String name);
-
- void CloseNamespace();
-
- void UsingNamespace([MarshalAs(UnmanagedType.LPWStr)] String fullName);
-
- void SetMethodSourceRange(ISymUnmanagedDocumentWriter startDoc,
- int startLine,
- int startColumn,
- ISymUnmanagedDocumentWriter endDoc,
- int endLine,
- int endColumn);
-
- void Initialize(IntPtr emitter,
- [MarshalAs(UnmanagedType.LPWStr)] String filename,
- IStream stream,
- Boolean fullBuild);
-
- void GetDebugInfo(out ImageDebugDirectory iDD,
- int cData,
- out int pcData,
- [In, Out, MarshalAs(UnmanagedType.LPArray, SizeParamIndex=1)] byte[] data);
-
- void DefineSequencePoints(ISymUnmanagedDocumentWriter document,
- int spCount,
- [MarshalAs(UnmanagedType.LPArray, SizeParamIndex=1)] int[] offsets,
- [MarshalAs(UnmanagedType.LPArray, SizeParamIndex=1)] int[] lines,
- [MarshalAs(UnmanagedType.LPArray, SizeParamIndex=1)] int[] columns,
- [MarshalAs(UnmanagedType.LPArray, SizeParamIndex=1)] int[] endLines,
- [MarshalAs(UnmanagedType.LPArray, SizeParamIndex=1)] int[] endColumns);
-
- void RemapToken(SymbolToken oldToken,
- SymbolToken newToken);
-
- void Initialize2(IntPtr emitter,
- [MarshalAs(UnmanagedType.LPWStr)] String tempfilename,
- IStream stream,
- Boolean fullBuild,
- [MarshalAs(UnmanagedType.LPWStr)] String finalfilename);
-
- void DefineConstant( [MarshalAs(UnmanagedType.LPWStr)] String name,
- Object value,
- int cSig,
- [MarshalAs(UnmanagedType.LPArray, SizeParamIndex=2)] byte[] signature);
-
- void Abort();
-
- }
-
-
- [
- ComImport,
- Guid("0B97726E-9E6D-4f05-9A26-424022093CAA"),
- InterfaceType(ComInterfaceType.InterfaceIsIUnknown),
- ComVisible(false)
- ]
- internal interface ISymUnmanagedWriter2 : ISymUnmanagedWriter
- {
- // ISymUnmanagedWriter interfaces (need to define the base interface methods also, per COM interop requirements)
- new void DefineDocument([MarshalAs(UnmanagedType.LPWStr)] String url,
- ref Guid language,
- ref Guid languageVendor,
- ref Guid documentType,
- [MarshalAs(UnmanagedType.Interface)] out ISymUnmanagedDocumentWriter RetVal);
-
- new void SetUserEntryPoint(SymbolToken entryMethod);
-
- new void OpenMethod(SymbolToken method);
-
- new void CloseMethod();
-
- new void OpenScope(int startOffset,
- out int pRetVal);
-
- new void CloseScope(int endOffset);
-
- new void SetScopeRange(int scopeID,
- int startOffset,
- int endOffset);
-
- new void DefineLocalVariable([MarshalAs(UnmanagedType.LPWStr)] String name,
- int attributes,
- int cSig,
- [MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 2)] byte[] signature,
- int addressKind,
- int addr1,
- int addr2,
- int addr3,
- int startOffset,
- int endOffset);
-
- new void DefineParameter([MarshalAs(UnmanagedType.LPWStr)] String name,
- int attributes,
- int sequence,
- int addressKind,
- int addr1,
- int addr2,
- int addr3);
-
- new void DefineField(SymbolToken parent,
- [MarshalAs(UnmanagedType.LPWStr)] String name,
- int attributes,
- int cSig,
- [MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 3)] byte[] signature,
- int addressKind,
- int addr1,
- int addr2,
- int addr3);
-
- new void DefineGlobalVariable([MarshalAs(UnmanagedType.LPWStr)] String name,
- int attributes,
- int cSig,
- [MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 2)] byte[] signature,
- int addressKind,
- int addr1,
- int addr2,
- int addr3);
-
- new void Close();
-
- new void SetSymAttribute(SymbolToken parent,
- [MarshalAs(UnmanagedType.LPWStr)] String name,
- int cData,
- [MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 2)] byte[] data);
-
- new void OpenNamespace([MarshalAs(UnmanagedType.LPWStr)] String name);
-
- new void CloseNamespace();
-
- new void UsingNamespace([MarshalAs(UnmanagedType.LPWStr)] String fullName);
-
- new void SetMethodSourceRange(ISymUnmanagedDocumentWriter startDoc,
- int startLine,
- int startColumn,
- ISymUnmanagedDocumentWriter endDoc,
- int endLine,
- int endColumn);
-
- new void Initialize(IntPtr emitter,
- [MarshalAs(UnmanagedType.LPWStr)] String filename,
- IStream stream,
- Boolean fullBuild);
-
- new void GetDebugInfo(out ImageDebugDirectory iDD,
- int cData,
- out int pcData,
- [In, Out, MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 1)] byte[] data);
-
- new void DefineSequencePoints(ISymUnmanagedDocumentWriter document,
- int spCount,
- [MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 1)] int[] offsets,
- [MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 1)] int[] lines,
- [MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 1)] int[] columns,
- [MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 1)] int[] endLines,
- [MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 1)] int[] endColumns);
-
- new void RemapToken(SymbolToken oldToken,
- SymbolToken newToken);
-
- new void Initialize2(IntPtr emitter,
- [MarshalAs(UnmanagedType.LPWStr)] String tempfilename,
- IStream stream,
- Boolean fullBuild,
- [MarshalAs(UnmanagedType.LPWStr)] String finalfilename);
-
- new void DefineConstant([MarshalAs(UnmanagedType.LPWStr)] String name,
- Object value,
- int cSig,
- [MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 2)] byte[] signature);
-
- new void Abort();
-
- // ISymUnmanagedWriter2 interfaces
- void DefineLocalVariable2([MarshalAs(UnmanagedType.LPWStr)] String name,
- int attributes,
- SymbolToken sigToken,
- int addressKind,
- int addr1,
- int addr2,
- int addr3,
- int startOffset,
- int endOffset);
-
- void DefineGlobalVariable2([MarshalAs(UnmanagedType.LPWStr)] String name,
- int attributes,
- SymbolToken sigToken,
- int addressKind,
- int addr1,
- int addr2,
- int addr3);
-
-
- void DefineConstant2([MarshalAs(UnmanagedType.LPWStr)] String name,
- Object value,
- SymbolToken sigToken);
- };
-
- [
- ComImport,
- Guid("12F1E02C-1E05-4B0E-9468-EBC9D1BB040F"),
- InterfaceType(ComInterfaceType.InterfaceIsIUnknown),
- ComVisible(false)
- ]
- internal interface ISymUnmanagedWriter3 : ISymUnmanagedWriter2
- {
- // ISymUnmanagedWriter interfaces (need to define the base interface methods also, per COM interop requirements)
- new void DefineDocument([MarshalAs(UnmanagedType.LPWStr)] String url,
- ref Guid language,
- ref Guid languageVendor,
- ref Guid documentType,
- [MarshalAs(UnmanagedType.Interface)] out ISymUnmanagedDocumentWriter RetVal);
-
- new void SetUserEntryPoint(SymbolToken entryMethod);
-
- new void OpenMethod(SymbolToken method);
-
- new void CloseMethod();
-
- new void OpenScope(int startOffset,
- out int pRetVal);
-
- new void CloseScope(int endOffset);
-
- new void SetScopeRange(int scopeID,
- int startOffset,
- int endOffset);
-
- new void DefineLocalVariable([MarshalAs(UnmanagedType.LPWStr)] String name,
- int attributes,
- int cSig,
- [MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 2)] byte[] signature,
- int addressKind,
- int addr1,
- int addr2,
- int addr3,
- int startOffset,
- int endOffset);
-
- new void DefineParameter([MarshalAs(UnmanagedType.LPWStr)] String name,
- int attributes,
- int sequence,
- int addressKind,
- int addr1,
- int addr2,
- int addr3);
-
- new void DefineField(SymbolToken parent,
- [MarshalAs(UnmanagedType.LPWStr)] String name,
- int attributes,
- int cSig,
- [MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 3)] byte[] signature,
- int addressKind,
- int addr1,
- int addr2,
- int addr3);
-
- new void DefineGlobalVariable([MarshalAs(UnmanagedType.LPWStr)] String name,
- int attributes,
- int cSig,
- [MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 2)] byte[] signature,
- int addressKind,
- int addr1,
- int addr2,
- int addr3);
-
- new void Close();
-
- new void SetSymAttribute(SymbolToken parent,
- [MarshalAs(UnmanagedType.LPWStr)] String name,
- int cData,
- [MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 2)] byte[] data);
-
- new void OpenNamespace([MarshalAs(UnmanagedType.LPWStr)] String name);
-
- new void CloseNamespace();
-
- new void UsingNamespace([MarshalAs(UnmanagedType.LPWStr)] String fullName);
-
- new void SetMethodSourceRange(ISymUnmanagedDocumentWriter startDoc,
- int startLine,
- int startColumn,
- ISymUnmanagedDocumentWriter endDoc,
- int endLine,
- int endColumn);
-
- new void Initialize(IntPtr emitter,
- [MarshalAs(UnmanagedType.LPWStr)] String filename,
- IStream stream,
- Boolean fullBuild);
-
- new void GetDebugInfo(out ImageDebugDirectory iDD,
- int cData,
- out int pcData,
- [In, Out, MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 1)] byte[] data);
-
- new void DefineSequencePoints(ISymUnmanagedDocumentWriter document,
- int spCount,
- [MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 1)] int[] offsets,
- [MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 1)] int[] lines,
- [MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 1)] int[] columns,
- [MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 1)] int[] endLines,
- [MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 1)] int[] endColumns);
-
- new void RemapToken(SymbolToken oldToken,
- SymbolToken newToken);
-
- new void Initialize2(IntPtr emitter,
- [MarshalAs(UnmanagedType.LPWStr)] String tempfilename,
- IStream stream,
- Boolean fullBuild,
- [MarshalAs(UnmanagedType.LPWStr)] String finalfilename);
-
- new void DefineConstant([MarshalAs(UnmanagedType.LPWStr)] String name,
- Object value,
- int cSig,
- [MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 2)] byte[] signature);
-
- new void Abort();
-
- // ISymUnmanagedWriter2 interfaces (need to define the base interface methods also, per COM interop requirements)
- new void DefineLocalVariable2([MarshalAs(UnmanagedType.LPWStr)] String name,
- int attributes,
- SymbolToken sigToken,
- int addressKind,
- int addr1,
- int addr2,
- int addr3,
- int startOffset,
- int endOffset);
-
- new void DefineGlobalVariable2([MarshalAs(UnmanagedType.LPWStr)] String name,
- int attributes,
- SymbolToken sigToken,
- int addressKind,
- int addr1,
- int addr2,
- int addr3);
-
-
- new void DefineConstant2([MarshalAs(UnmanagedType.LPWStr)] String name,
- Object value,
- SymbolToken sigToken);
-
- // ISymUnmanagedWriter3 interfaces
- void OpenMethod2(SymbolToken method,
- int isect,
- int offset);
- void Commit();
- }
-
- /// <include file='doc\SymWriter.uex' path='docs/doc[@for="SymbolWriter"]/*' />
- internal class SymbolWriter: ISymbolWriter2
- {
- ISymUnmanagedWriter m_target;
-
- private unsafe ISymUnmanagedWriter GetWriter(IntPtr ppUnderlyingWriter)
- {
- // this comes in as double pointer, so need to deference in order to create CCW
- return (ISymUnmanagedWriter)Marshal.GetObjectForIUnknown((IntPtr)(*((void **)ppUnderlyingWriter.ToPointer())));
- }
-
- /// <include file='doc\SymWriter.uex' path='docs/doc[@for="SymbolWriter.SymbolWriter"]/*' />
- public SymbolWriter()
- {
- Guid CLSID_CorSymWriter = new Guid("0AE2DEB0-F901-478b-BB9F-881EE8066788");
- m_target = (ISymUnmanagedWriter)Activator.CreateInstance(Type.GetTypeFromCLSID(CLSID_CorSymWriter));
- }
-
- /// <include file='doc\SymWriter.uex' path='docs/doc[@for="SymbolWriter.SetUnderlyingWriter"]/*' />
- public void SetUnderlyingWriter(IntPtr ppUnderlyingWriter)
- {
- m_target = GetWriter(ppUnderlyingWriter);
- }
-
- /// <include file='doc\SymWriter.uex' path='docs/doc[@for="SymbolWriter.Initialize"]/*' />
- public void Initialize(IntPtr emitter, String filename, bool fullBuild)
- {
- m_target.Initialize(emitter, filename, null, fullBuild);
- }
-
- /// <include file='doc\SymWriter.uex' path='docs/doc[@for="SymbolWriter.Initialize"]/*' />
- public void Initialize(Object emitter, String filename, bool fullBuild)
- {
- IntPtr uEmitter = IntPtr.Zero;
- try {
- uEmitter = Marshal.GetIUnknownForObject(emitter);
- m_target.Initialize(uEmitter, filename, null, fullBuild);
- } finally {
- if (uEmitter != IntPtr.Zero)
- Marshal.Release(uEmitter);
- }
- }
-
- /// <include file='doc\SymWriter.uex' path='docs/doc[@for="SymbolWriter.Initialize1"]/*' />
- public void Initialize(Object emitter,
- [MarshalAs(UnmanagedType.LPWStr)] String filename,
- IStream stream,
- Boolean fullBuild)
- {
- IntPtr uEmitter = IntPtr.Zero;
- try {
- uEmitter = Marshal.GetIUnknownForObject(emitter);
- m_target.Initialize(uEmitter, filename, stream, fullBuild);
- } finally {
- if (uEmitter != IntPtr.Zero)
- Marshal.Release(uEmitter);
- }
- }
-
- /// <include file='doc\SymWriter.uex' path='docs/doc[@for="SymbolWriter.Initialize2"]/*' />
- public void Initialize(Object emitter,
- [MarshalAs(UnmanagedType.LPWStr)] String tempfilename,
- IStream stream,
- Boolean fullBuild,
- [MarshalAs(UnmanagedType.LPWStr)] String finalfilename)
- {
- IntPtr uEmitter = IntPtr.Zero;
- try {
- uEmitter = Marshal.GetIUnknownForObject(emitter);
- m_target.Initialize2(uEmitter, tempfilename, stream, fullBuild, finalfilename);
- } finally {
- if (uEmitter != IntPtr.Zero)
- Marshal.Release(uEmitter);
- }
- }
-
- /// <include file='doc\SymWriter.uex' path='docs/doc[@for="SymbolWriter.DefineDocument"]/*' />
- public ISymbolDocumentWriter DefineDocument(String url,
- Guid language,
- Guid languageVendor,
- Guid documentType)
- {
- ISymUnmanagedDocumentWriter writer = null;
- m_target.DefineDocument(url, ref language, ref languageVendor, ref documentType, out writer);
- return new SymDocumentWriter(writer);
- }
-
- /// <include file='doc\SymWriter.uex' path='docs/doc[@for="SymbolWriter.SetUserEntryPoint"]/*' />
- public void SetUserEntryPoint(SymbolToken entryMethod)
- {
- m_target.SetUserEntryPoint(entryMethod);
- }
-
- /// <include file='doc\SymWriter.uex' path='docs/doc[@for="SymbolWriter.OpenMethod"]/*' />
- public void OpenMethod(SymbolToken method)
- {
- m_target.OpenMethod(method);
- }
-
- /// <include file='doc\SymWriter.uex' path='docs/doc[@for="SymbolWriter.CloseMethod"]/*' />
- public void CloseMethod()
- {
- m_target.CloseMethod();
- }
-
- /// <include file='doc\SymWriter.uex' path='docs/doc[@for="SymbolWriter.DefineSequencePoints"]/*' />
- public void DefineSequencePoints(ISymbolDocumentWriter document,
- int[] offsets,
- int[] lines,
- int[] columns,
- int[] endLines,
- int[] endColumns)
- {
- m_target.DefineSequencePoints(((SymDocumentWriter)document).InternalDocumentWriter, offsets.Length,
- offsets, lines, columns, endLines, endColumns);
- }
-
- /// <include file='doc\SymWriter.uex' path='docs/doc[@for="SymbolWriter.OpenScope"]/*' />
- public int OpenScope(int startOffset)
- {
- int ret;
- m_target.OpenScope(startOffset, out ret);
- return ret;
- }
-
- /// <include file='doc\SymWriter.uex' path='docs/doc[@for="SymbolWriter.CloseScope"]/*' />
- public void CloseScope(int endOffset)
- {
- m_target.CloseScope(endOffset);
- }
-
- /// <include file='doc\SymWriter.uex' path='docs/doc[@for="SymbolWriter.SetScopeRange"]/*' />
- public void SetScopeRange(int scopeID, int startOffset, int endOffset)
- {
- m_target.SetScopeRange(scopeID, startOffset, endOffset);
- }
-
- /// <include file='doc\SymWriter.uex' path='docs/doc[@for="SymbolWriter.DefineLocalVariable"]/*' />
- public void DefineLocalVariable(String name,
- FieldAttributes attributes,
- byte[] signature,
- SymAddressKind addressKind,
- int addr1,
- int addr2,
- int addr3,
- int startOffset,
- int endOffset)
- {
- m_target.DefineLocalVariable(name, (int)attributes, signature.Length, signature,
- (int)addressKind, addr1, addr2, addr3, startOffset, endOffset);
- }
-
- /// <include file='doc\SymWriter.uex' path='docs/doc[@for="SymbolWriter.DefineParameter"]/*' />
- public void DefineParameter(String name,
- ParameterAttributes attributes,
- int sequence,
- SymAddressKind addressKind,
- int addr1,
- int addr2,
- int addr3)
- {
- m_target.DefineParameter(name, (int)attributes, sequence, (int)addressKind, addr1, addr2, addr3);
- }
-
- /// <include file='doc\SymWriter.uex' path='docs/doc[@for="SymbolWriter.DefineField"]/*' />
- public void DefineField(SymbolToken parent,
- String name,
- FieldAttributes attributes,
- byte[] signature,
- SymAddressKind addressKind,
- int addr1,
- int addr2,
- int addr3)
- {
- m_target.DefineField(parent, name, (int)attributes, signature.Length, signature,
- (int)addressKind, addr1, addr2, addr3);
- }
-
- /// <include file='doc\SymWriter.uex' path='docs/doc[@for="SymbolWriter.DefineGlobalVariable"]/*' />
- public void DefineGlobalVariable(String name,
- FieldAttributes attributes,
- byte[] signature,
- SymAddressKind addressKind,
- int addr1,
- int addr2,
- int addr3)
- {
- m_target.DefineGlobalVariable(name, (int)attributes, signature.Length, signature,
- (int)addressKind, addr1, addr2, addr3);
- }
-
- /// <include file='doc\SymWriter.uex' path='docs/doc[@for="SymbolWriter.Close"]/*' />
- public void Close()
- {
- m_target.Close();
- }
-
- /// <include file='doc\SymWriter.uex' path='docs/doc[@for="SymbolWriter.SetSymAttribute"]/*' />
- public void SetSymAttribute(SymbolToken parent, String name, byte[] data)
- {
- m_target.SetSymAttribute(parent, name, data.Length, data);
- }
-
- /// <include file='doc\SymWriter.uex' path='docs/doc[@for="SymbolWriter.OpenNamespace"]/*' />
- public void OpenNamespace(String name)
- {
- m_target.OpenNamespace(name);
- }
-
- /// <include file='doc\SymWriter.uex' path='docs/doc[@for="SymbolWriter.CloseNamespace"]/*' />
- public void CloseNamespace()
- {
- m_target.CloseNamespace();
- }
-
- /// <include file='doc\SymWriter.uex' path='docs/doc[@for="SymbolWriter.UsingNamespace"]/*' />
- public void UsingNamespace(String fullName)
- {
- m_target.UsingNamespace(fullName);
- }
-
- /// <include file='doc\SymWriter.uex' path='docs/doc[@for="SymbolWriter.SetMethodSourceRange"]/*' />
- public void SetMethodSourceRange(ISymbolDocumentWriter startDoc,
- int startLine,
- int startColumn,
- ISymbolDocumentWriter endDoc,
- int endLine,
- int endColumn)
- {
- m_target.SetMethodSourceRange(((SymDocumentWriter)startDoc).InternalDocumentWriter, startLine, startColumn,
- ((SymDocumentWriter)endDoc).InternalDocumentWriter, endLine, endColumn);
- }
-
- /// <include file='doc\SymWriter.uex' path='docs/doc[@for="SymbolWriter.GetDebugInfo"]/*' />
- public byte[] GetDebugInfo(out ImageDebugDirectory iDD)
- {
- int length;
- m_target.GetDebugInfo(out iDD, 0, out length, null);
- byte[] data = new byte[length];
- m_target.GetDebugInfo(out iDD, length, out length, data);
- System.Diagnostics.Debug.Assert(data.Length == length);
- return data;
- }
-
-
- /// <include file='doc\SymWriter.uex' path='docs/doc[@for="SymbolWriter.RemapToken"]/*' />
- public void RemapToken(SymbolToken oldToken,
- SymbolToken newToken)
- {
- m_target.RemapToken(oldToken, newToken);
- }
-
-
- /// <include file='doc\SymWriter.uex' path='docs/doc[@for="SymbolWriter.DefineConstant"]/*' />
- public void DefineConstant([MarshalAs(UnmanagedType.LPWStr)] String name,
- Object value,
- byte[] signature)
- {
- m_target.DefineConstant(name, value, signature.Length, signature);
- }
-
- /// <include file='doc\SymWriter.uex' path='docs/doc[@for="SymbolWriter.Abort"]/*' />
- public void Abort()
- {
- m_target.Abort();
- }
-
- /// <include file='doc\SymWriter.uex' path='docs/doc[@for="SymbolWriter.DefineLocalVariable1"]/*' />
- public void DefineLocalVariable([MarshalAs(UnmanagedType.LPWStr)] String name,
- int attributes,
- SymbolToken sigToken,
- int addressKind,
- int addr1,
- int addr2,
- int addr3,
- int startOffset,
- int endOffset)
- {
- ((ISymUnmanagedWriter2)m_target).DefineLocalVariable2(name, attributes, sigToken,
- addressKind, addr1, addr2, addr3, startOffset, endOffset);
- }
-
- /// <include file='doc\SymWriter.uex' path='docs/doc[@for="SymbolWriter.DefineGlobalVariable1"]/*' />
- public void DefineGlobalVariable([MarshalAs(UnmanagedType.LPWStr)] String name,
- int attributes,
- SymbolToken sigToken,
- int addressKind,
- int addr1,
- int addr2,
- int addr3)
- {
- ((ISymUnmanagedWriter2)m_target).DefineGlobalVariable2(name, attributes, sigToken,
- addressKind, addr1, addr2, addr3);
- }
-
-
-
- /// <include file='doc\SymWriter.uex' path='docs/doc[@for="SymbolWriter.DefineConstant1"]/*' />
- public void DefineConstant([MarshalAs(UnmanagedType.LPWStr)] String name,
- Object value,
- SymbolToken sigToken)
- {
- ((ISymUnmanagedWriter2)m_target).DefineConstant2(name, value, sigToken);
- }
- }
-}
diff --git a/main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/SymStore/symbinder.cs b/main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/SymStore/symbinder.cs deleted file mode 100644 index dfd4068813..0000000000 --- a/main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/SymStore/symbinder.cs +++ /dev/null @@ -1,251 +0,0 @@ -//---------------------------------------------------------------------
-// This file is part of the CLR Managed Debugger (mdbg) Sample.
-//
-// Copyright (C) Microsoft Corporation. All rights reserved.
-//---------------------------------------------------------------------
-
-
-// These interfaces serve as an extension to the BCL's SymbolStore interfaces.
-namespace Microsoft.Samples.Debugging.CorSymbolStore
-{
- using System.Diagnostics.SymbolStore;
-
-
- using System;
- using System.Text;
- using System.Runtime.InteropServices;
- using System.Runtime.InteropServices.ComTypes;
-
- [
- ComImport,
- Guid("AA544d42-28CB-11d3-bd22-0000f80849bd"),
- InterfaceType(ComInterfaceType.InterfaceIsIUnknown),
- ComVisible(false)
- ]
- internal interface ISymUnmanagedBinder
- {
- // These methods will often return error HRs in common cases.
- // If there are no symbols for the given target, a failing hr is returned.
- // This is pretty common.
- //
- // Using PreserveSig and manually handling error cases provides a big performance win.
- // Far fewer exceptions will be thrown and caught.
- // Exceptions should be reserved for truely "exceptional" cases.
- [PreserveSig]
- int GetReaderForFile(IntPtr importer,
- [MarshalAs(UnmanagedType.LPWStr)] String filename,
- [MarshalAs(UnmanagedType.LPWStr)] String SearchPath,
- [MarshalAs(UnmanagedType.Interface)] out ISymUnmanagedReader retVal);
-
- [PreserveSig]
- int GetReaderFromStream(IntPtr importer,
- IStream stream,
- [MarshalAs(UnmanagedType.Interface)] out ISymUnmanagedReader retVal);
- }
-
- [
- ComImport,
- Guid("ACCEE350-89AF-4ccb-8B40-1C2C4C6F9434"),
- InterfaceType(ComInterfaceType.InterfaceIsIUnknown),
- ComVisible(false)
- ]
- internal interface ISymUnmanagedBinder2 : ISymUnmanagedBinder
- {
- // ISymUnmanagedBinder methods (need to define the base interface methods also, per COM interop requirements)
- [PreserveSig]
- new int GetReaderForFile(IntPtr importer,
- [MarshalAs(UnmanagedType.LPWStr)] String filename,
- [MarshalAs(UnmanagedType.LPWStr)] String SearchPath,
- [MarshalAs(UnmanagedType.Interface)] out ISymUnmanagedReader retVal);
-
- [PreserveSig]
- new int GetReaderFromStream(IntPtr importer,
- IStream stream,
- [MarshalAs(UnmanagedType.Interface)] out ISymUnmanagedReader retVal);
-
- // ISymUnmanagedBinder2 methods
- [PreserveSig]
- int GetReaderForFile2(IntPtr importer,
- [MarshalAs(UnmanagedType.LPWStr)] String fileName,
- [MarshalAs(UnmanagedType.LPWStr)] String searchPath,
- int searchPolicy,
- [MarshalAs(UnmanagedType.Interface)] out ISymUnmanagedReader pRetVal);
- }
-
- [
- ComImport,
- Guid("28AD3D43-B601-4d26-8A1B-25F9165AF9D7"),
- InterfaceType(ComInterfaceType.InterfaceIsIUnknown),
- ComVisible(false)
- ]
- internal interface ISymUnmanagedBinder3 : ISymUnmanagedBinder2
- {
- // ISymUnmanagedBinder methods (need to define the base interface methods also, per COM interop requirements)
- [PreserveSig]
- new int GetReaderForFile(IntPtr importer,
- [MarshalAs(UnmanagedType.LPWStr)] String filename,
- [MarshalAs(UnmanagedType.LPWStr)] String SearchPath,
- [MarshalAs(UnmanagedType.Interface)] out ISymUnmanagedReader retVal);
-
- [PreserveSig]
- new int GetReaderFromStream(IntPtr importer,
- IStream stream,
- [MarshalAs(UnmanagedType.Interface)] out ISymUnmanagedReader retVal);
-
- // ISymUnmanagedBinder2 methods (need to define the base interface methods also, per COM interop requirements)
- [PreserveSig]
- new int GetReaderForFile2(IntPtr importer,
- [MarshalAs(UnmanagedType.LPWStr)] String fileName,
- [MarshalAs(UnmanagedType.LPWStr)] String searchPath,
- int searchPolicy,
- [MarshalAs(UnmanagedType.Interface)] out ISymUnmanagedReader pRetVal);
-
- // ISymUnmanagedBinder3 methods
- [PreserveSig]
- int GetReaderFromCallback(IntPtr importer,
- [MarshalAs(UnmanagedType.LPWStr)] String fileName,
- [MarshalAs(UnmanagedType.LPWStr)] String searchPath,
- int searchPolicy,
- IntPtr callback,
- [MarshalAs(UnmanagedType.Interface)] out ISymUnmanagedReader pRetVal);
- }
-
- /// <include file='doc\symbinder.uex' path='docs/doc[@for="SymbolBinder"]/*' />
-
- public class SymbolBinder: ISymbolBinder1, ISymbolBinder2
- {
- ISymUnmanagedBinder m_binder;
-
- /// <include file='doc\symbinder.uex' path='docs/doc[@for="SymbolBinder.SymbolBinder"]/*' />
- public SymbolBinder()
- {
- Guid CLSID_CorSymBinder = new Guid("0A29FF9E-7F9C-4437-8B11-F424491E3931");
- m_binder = (ISymUnmanagedBinder3)Activator.CreateInstance(Type.GetTypeFromCLSID(CLSID_CorSymBinder));
- }
-
- /// <include file='doc\symbinder.uex' path='docs/doc[@for="SymbolBinder.GetReader"]/*' />
- public ISymbolReader GetReader(IntPtr importer, String filename,
- String searchPath)
- {
- ISymUnmanagedReader reader = null;
- int hr = m_binder.GetReaderForFile(importer, filename, searchPath, out reader);
- if (IsFailingResultNormal(hr))
- {
- return null;
- }
- Marshal.ThrowExceptionForHR(hr);
- return new SymReader(reader);
- }
-
- /// <include file='doc\symbinder.uex' path='docs/doc[@for="SymbolBinder.GetReaderForFile"]/*' />
- public ISymbolReader GetReaderForFile(Object importer, String filename,
- String searchPath)
- {
- ISymUnmanagedReader reader = null;
- IntPtr uImporter = IntPtr.Zero;
- try
- {
- uImporter = Marshal.GetIUnknownForObject(importer);
- int hr = m_binder.GetReaderForFile(uImporter, filename, searchPath, out reader);
- if (IsFailingResultNormal(hr))
- {
- return null;
- }
- Marshal.ThrowExceptionForHR(hr);
- }
- finally
- {
- if (uImporter != IntPtr.Zero)
- Marshal.Release(uImporter);
- }
- return new SymReader(reader);
- }
-
- /// <include file='doc\symbinder.uex' path='docs/doc[@for="SymbolBinder.GetReaderForFile1"]/*' />
- public ISymbolReader GetReaderForFile(Object importer, String fileName,
- String searchPath, SymSearchPolicies searchPolicy)
- {
- ISymUnmanagedReader symReader = null;
- IntPtr uImporter = IntPtr.Zero;
- try
- {
- uImporter = Marshal.GetIUnknownForObject(importer);
- int hr = ((ISymUnmanagedBinder2)m_binder).GetReaderForFile2(uImporter, fileName, searchPath, (int)searchPolicy, out symReader);
- if (IsFailingResultNormal(hr))
- {
- return null;
- }
- Marshal.ThrowExceptionForHR(hr);
- }
- finally
- {
- if (uImporter != IntPtr.Zero)
- Marshal.Release(uImporter);
- }
- return new SymReader(symReader);
- }
-
- /// <include file='doc\symbinder.uex' path='docs/doc[@for="SymbolBinder.GetReaderForFile2"]/*' />
- public ISymbolReader GetReaderForFile(Object importer, String fileName,
- String searchPath, SymSearchPolicies searchPolicy,
- IntPtr callback)
- {
- ISymUnmanagedReader reader = null;
- IntPtr uImporter = IntPtr.Zero;
- try
- {
- uImporter = Marshal.GetIUnknownForObject(importer);
- int hr = ((ISymUnmanagedBinder3)m_binder).GetReaderFromCallback(uImporter, fileName, searchPath, (int)searchPolicy, callback, out reader);
- if (IsFailingResultNormal(hr))
- {
- return null;
- }
- Marshal.ThrowExceptionForHR(hr);
- }
- finally {
- if (uImporter != IntPtr.Zero)
- Marshal.Release(uImporter);
- }
- return new SymReader(reader);
- }
-
- /// <include file='doc\symbinder.uex' path='docs/doc[@for="SymbolBinder.GetReaderFromStream"]/*' />
- public ISymbolReader GetReaderFromStream(Object importer, IStream stream)
- {
- ISymUnmanagedReader reader = null;
- IntPtr uImporter = IntPtr.Zero;
- try
- {
- uImporter = Marshal.GetIUnknownForObject(importer);
- int hr = ((ISymUnmanagedBinder2)m_binder).GetReaderFromStream(uImporter, stream, out reader);
- if (IsFailingResultNormal(hr))
- {
- return null;
- }
- Marshal.ThrowExceptionForHR(hr);
- }
- finally
- {
- if (uImporter != IntPtr.Zero)
- Marshal.Release(uImporter);
- }
- return new SymReader(reader);
- }
-
- private static bool IsFailingResultNormal(int hr)
- {
- // If a pdb is not found, that's a pretty common thing.
- if (hr == unchecked((int)0x806D0005)) // E_PDB_NOT_FOUND
- {
- return true;
- }
- // Other fairly common things may happen here, but we don't want to hide
- // this from the programmer.
- // You may get 0x806D0014 if the pdb is there, but just old (mismatched)
- // Or if you ask for the symbol information on something that's not an assembly.
- // If that may happen for your application, wrap calls to GetReaderForFile in
- // try-catch(COMException) blocks and use the error code in the COMException to report error.
- return false;
- }
- }
-}
diff --git a/main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/SymStore/symmethod.cs b/main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/SymStore/symmethod.cs deleted file mode 100644 index 4d0693cf2a..0000000000 --- a/main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/SymStore/symmethod.cs +++ /dev/null @@ -1,300 +0,0 @@ -//---------------------------------------------------------------------
-// This file is part of the CLR Managed Debugger (mdbg) Sample.
-//
-// Copyright (C) Microsoft Corporation. All rights reserved.
-//---------------------------------------------------------------------
-
-
-// These interfaces serve as an extension to the BCL's SymbolStore interfaces.
-namespace Microsoft.Samples.Debugging.CorSymbolStore
-{
- using System.Diagnostics.SymbolStore;
-
- using System.Runtime.InteropServices;
- using System;
- using System.Text;
-
- [
- ComImport,
- Guid("B62B923C-B500-3158-A543-24F307A8B7E1"),
- InterfaceType(ComInterfaceType.InterfaceIsIUnknown),
- ComVisible(false)
- ]
- interface ISymUnmanagedMethod
- {
- void GetToken(out SymbolToken pToken);
- void GetSequencePointCount(out int retVal);
- void GetRootScope([MarshalAs(UnmanagedType.Interface)] out ISymUnmanagedScope retVal);
- void GetScopeFromOffset(int offset, [MarshalAs(UnmanagedType.Interface)] out ISymUnmanagedScope retVal);
- void GetOffset(ISymUnmanagedDocument document,
- int line,
- int column,
- out int retVal);
- void GetRanges(ISymUnmanagedDocument document,
- int line,
- int column,
- int cRanges,
- out int pcRanges,
- [In, Out, MarshalAs(UnmanagedType.LPArray, SizeParamIndex=3)] int[] ranges);
- void GetParameters(int cParams,
- out int pcParams,
- [In, Out, MarshalAs(UnmanagedType.LPArray, SizeParamIndex=0)] ISymUnmanagedVariable[] parms);
- void GetNamespace([MarshalAs(UnmanagedType.Interface)] out ISymUnmanagedNamespace retVal);
- void GetSourceStartEnd(ISymUnmanagedDocument[] docs,
- [In, Out, MarshalAs(UnmanagedType.LPArray)] int[] lines,
- [In, Out, MarshalAs(UnmanagedType.LPArray)] int[] columns,
- out Boolean retVal);
- void GetSequencePoints(int cPoints,
- out int pcPoints,
- [In, Out, MarshalAs(UnmanagedType.LPArray, SizeParamIndex=0)] int[] offsets,
- [In, Out, MarshalAs(UnmanagedType.LPArray, SizeParamIndex=0)] ISymUnmanagedDocument[] documents,
- [In, Out, MarshalAs(UnmanagedType.LPArray, SizeParamIndex=0)] int[] lines,
- [In, Out, MarshalAs(UnmanagedType.LPArray, SizeParamIndex=0)] int[] columns,
- [In, Out, MarshalAs(UnmanagedType.LPArray, SizeParamIndex=0)] int[] endLines,
- [In, Out, MarshalAs(UnmanagedType.LPArray, SizeParamIndex=0)] int[] endColumns);
- }
-
- [
- ComImport,
- Guid("85E891DA-A631-4c76-ACA2-A44A39C46B8C"),
- InterfaceType(ComInterfaceType.InterfaceIsIUnknown),
- ComVisible(false)
- ]
- internal interface ISymENCUnmanagedMethod
- {
- void GetFileNameFromOffset(int dwOffset,
- int cchName,
- out int pcchName,
- [MarshalAs(UnmanagedType.LPWStr)] StringBuilder name);
-
- void GetLineFromOffset(int dwOffset,
- out int pline,
- out int pcolumn,
- out int pendLine,
- out int pendColumn,
- out int pdwStartOffset);
- }
-
-
- internal class SymMethod : ISymbolMethod, ISymbolEnCMethod
- {
- ISymUnmanagedMethod m_unmanagedMethod;
-
- public SymMethod(ISymUnmanagedMethod unmanagedMethod)
- {
- m_unmanagedMethod = unmanagedMethod;
- }
-
- public SymbolToken Token
- {
- get
- {
- SymbolToken token;
- m_unmanagedMethod.GetToken(out token);
- return token;
- }
- }
-
- public int SequencePointCount
- {
- get
- {
- int retval = 0;
- m_unmanagedMethod.GetSequencePointCount(out retval);
- return retval;
- }
- }
-
- public void GetSequencePoints(int[] offsets,
- ISymbolDocument[] documents,
- int[] lines,
- int[] columns,
- int[] endLines,
- int[] endColumns)
- {
- int spCount = 0;
- if (offsets != null)
- spCount = offsets.Length;
- else if (documents != null)
- spCount = documents.Length;
- else if (lines != null)
- spCount = lines.Length;
- else if (columns != null)
- spCount = columns.Length;
- else if (endLines != null)
- spCount = endLines.Length;
- else if (endColumns != null)
- spCount = endColumns.Length;
-
- // Don't do anything if they're not really asking for anything.
- if (spCount == 0)
- return;
-
- // Make sure all arrays are the same length.
- if ((offsets != null) && (spCount != offsets.Length))
- throw new ArgumentException();
-
- if ((lines != null) && (spCount != lines.Length))
- throw new ArgumentException();
-
- if ((columns != null) && (spCount != columns.Length))
- throw new ArgumentException();
-
- if ((endLines != null) && (spCount != endLines.Length))
- throw new ArgumentException();
-
- if ((endColumns != null) && (spCount != endColumns.Length))
- throw new ArgumentException();
-
- ISymUnmanagedDocument[] unmanagedDocuments = new ISymUnmanagedDocument[documents.Length];
- int cPoints = 0;
- uint i;
- m_unmanagedMethod.GetSequencePoints(documents.Length, out cPoints,
- offsets, unmanagedDocuments,
- lines, columns,
- endLines, endColumns);
-
- // Create the SymbolDocument form the IntPtr's
- for (i = 0; i < documents.Length; i++)
- {
- documents[i] = new SymbolDocument(unmanagedDocuments[i]);
- }
-
- return;
-
- }
-
- public ISymbolScope RootScope
- {
- get
- {
- ISymUnmanagedScope retval = null;
- m_unmanagedMethod.GetRootScope(out retval);
- return new SymScope(retval);
- }
- }
-
- public ISymbolScope GetScope(int offset)
- {
- ISymUnmanagedScope retVal = null;
- m_unmanagedMethod.GetScopeFromOffset(offset, out retVal);
- return new SymScope(retVal);
- }
-
- public int GetOffset(ISymbolDocument document,
- int line,
- int column)
- {
- int retVal = 0;
- m_unmanagedMethod.GetOffset(((SymbolDocument)document).InternalDocument, line, column, out retVal);
- return retVal;
- }
-
- public int[] GetRanges(ISymbolDocument document,
- int line,
- int column)
- {
- int cRanges = 0;
- m_unmanagedMethod.GetRanges(((SymbolDocument)document).InternalDocument, line, column, 0, out cRanges, null);
- int[] Ranges = new int[cRanges];
- m_unmanagedMethod.GetRanges(((SymbolDocument)document).InternalDocument, line, column, cRanges, out cRanges, Ranges);
- return Ranges;
- }
-
-
- public ISymbolVariable[] GetParameters()
- {
- int cVariables = 0;
- uint i;
- m_unmanagedMethod.GetParameters(0, out cVariables, null);
- ISymUnmanagedVariable[] unmanagedVariables = new ISymUnmanagedVariable[cVariables];
- m_unmanagedMethod.GetParameters(cVariables, out cVariables, unmanagedVariables);
-
- ISymbolVariable[] Variables = new ISymbolVariable[cVariables];
- for (i = 0; i < cVariables; i++)
- {
- Variables[i] = new SymVariable(unmanagedVariables[i]);
- }
-
- return Variables;
- }
-
- public ISymbolNamespace GetNamespace()
- {
- ISymUnmanagedNamespace retVal = null;
- m_unmanagedMethod.GetNamespace(out retVal);
- return new SymNamespace(retVal);
- }
-
- public bool GetSourceStartEnd(ISymbolDocument[] docs,
- int[] lines,
- int[] columns)
- {
- uint i;
- bool pRetVal = false;
- int spCount = 0;
- if (docs != null)
- spCount = docs.Length;
- else if (lines != null)
- spCount = lines.Length;
- else if (columns != null)
- spCount = columns.Length;
-
- // If we don't have at least 2 entries then return an error
- if (spCount < 2)
- throw new ArgumentException();
-
- // Make sure all arrays are the same length.
- if ((docs != null) && (spCount != docs.Length))
- throw new ArgumentException();
-
- if ((lines != null) && (spCount != lines.Length))
- throw new ArgumentException();
-
- if ((columns != null) && (spCount != columns.Length))
- throw new ArgumentException();
-
- ISymUnmanagedDocument[] unmanagedDocuments = new ISymUnmanagedDocument[docs.Length];
- m_unmanagedMethod.GetSourceStartEnd(unmanagedDocuments, lines, columns, out pRetVal);
- if (pRetVal)
- {
- for (i = 0; i < docs.Length;i++)
- {
- docs[i] = new SymbolDocument(unmanagedDocuments[i]);
- }
- }
- return pRetVal;
-
- }
-
- public String GetFileNameFromOffset(int dwOffset)
- {
- int cchName = 0;
- ((ISymENCUnmanagedMethod)m_unmanagedMethod).GetFileNameFromOffset(dwOffset, 0, out cchName, null);
- StringBuilder Name = new StringBuilder(cchName);
- ((ISymENCUnmanagedMethod)m_unmanagedMethod).GetFileNameFromOffset(dwOffset, cchName, out cchName, Name);
- return Name.ToString();
- }
-
- public int GetLineFromOffset(int dwOffset,
- out int pcolumn,
- out int pendLine,
- out int pendColumn,
- out int pdwStartOffset)
- {
- int line = 0;
- ((ISymENCUnmanagedMethod)m_unmanagedMethod).GetLineFromOffset(
- dwOffset, out line, out pcolumn, out pendLine, out pendColumn, out pdwStartOffset);
- return line;
- }
-
- public ISymUnmanagedMethod InternalMethod
- {
- get
- {
- return m_unmanagedMethod;
- }
- }
- }
-
-}
diff --git a/main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/SymStore/symvariable.cs b/main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/SymStore/symvariable.cs deleted file mode 100644 index 93cb1df701..0000000000 --- a/main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/SymStore/symvariable.cs +++ /dev/null @@ -1,154 +0,0 @@ -//---------------------------------------------------------------------
-// This file is part of the CLR Managed Debugger (mdbg) Sample.
-//
-// Copyright (C) Microsoft Corporation. All rights reserved.
-//---------------------------------------------------------------------
-
-
-// These interfaces serve as an extension to the BCL's SymbolStore interfaces.
-namespace Microsoft.Samples.Debugging.CorSymbolStore
-{
- using System.Diagnostics.SymbolStore;
-
- // Interface does not need to be marked with the serializable attribute
- using System;
- using System.Text;
- using System.Runtime.InteropServices;
- using System.Runtime.InteropServices.ComTypes;
-
- [
- ComImport,
- Guid("9F60EEBE-2D9A-3F7C-BF58-80BC991C60BB"),
- InterfaceType(ComInterfaceType.InterfaceIsIUnknown),
- ComVisible(false)
- ]
- internal interface ISymUnmanagedVariable
- {
- void GetName(int cchName,
- out int pcchName,
- [MarshalAs(UnmanagedType.LPWStr)] StringBuilder szName);
-
- void GetAttributes(out int pRetVal);
-
- void GetSignature(int cSig,
- out int pcSig,
- [In, Out, MarshalAs(UnmanagedType.LPArray, SizeParamIndex=0)] byte[] sig);
-
- void GetAddressKind(out int pRetVal);
-
- void GetAddressField1(out int pRetVal);
-
- void GetAddressField2(out int pRetVal);
-
- void GetAddressField3(out int pRetVal);
-
- void GetStartOffset(out int pRetVal);
-
- void GetEndOffset(out int pRetVal);
- }
-
- /// <include file='doc\ISymVariable.uex' path='docs/doc[@for="ISymbolVariable"]/*' />
-
- internal class SymVariable : ISymbolVariable
- {
- ISymUnmanagedVariable m_unmanagedVariable;
-
- internal SymVariable(ISymUnmanagedVariable variable)
- {
- m_unmanagedVariable = variable;
- }
-
- public String Name
- {
- get
- {
- StringBuilder Name;
- int cchName;
- m_unmanagedVariable.GetName(0, out cchName, null);
- Name = new StringBuilder(cchName);
- m_unmanagedVariable.GetName(cchName, out cchName, Name);
- return Name.ToString();
- }
- }
-
- public Object Attributes
- {
- get
- {
- int RetVal;
- m_unmanagedVariable.GetAttributes(out RetVal);
- return (object)RetVal;
- }
- }
-
- public byte[] GetSignature()
- {
- byte[] Data;
- int cData;
- m_unmanagedVariable.GetSignature(0, out cData, null);
- Data = new byte[cData];
- m_unmanagedVariable.GetSignature(cData, out cData, Data);
- return Data;
- }
-
- public SymAddressKind AddressKind
- {
- get
- {
- int RetVal;
- m_unmanagedVariable.GetAddressKind(out RetVal);
- return (SymAddressKind)RetVal;
- }
- }
-
- public int AddressField1
- {
- get
- {
- int RetVal;
- m_unmanagedVariable.GetAddressField1(out RetVal);
- return RetVal;
- }
- }
-
- public int AddressField2
- {
- get
- {
- int RetVal;
- m_unmanagedVariable.GetAddressField2(out RetVal);
- return RetVal;
- }
- }
-
- public int AddressField3
- {
- get
- {
- int RetVal;
- m_unmanagedVariable.GetAddressField3(out RetVal);
- return RetVal;
- }
- }
-
- public int StartOffset
- {
- get
- {
- int RetVal;
- m_unmanagedVariable.GetStartOffset(out RetVal);
- return RetVal;
- }
- }
-
- public int EndOffset
- {
- get
- {
- int RetVal;
- m_unmanagedVariable.GetEndOffset(out RetVal);
- return RetVal;
- }
- }
- }
-}
diff --git a/main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/debug/AppDomain.cs b/main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/debug/AppDomain.cs deleted file mode 100644 index a082856816..0000000000 --- a/main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/debug/AppDomain.cs +++ /dev/null @@ -1,151 +0,0 @@ -//---------------------------------------------------------------------
-// This file is part of the CLR Managed Debugger (mdbg) Sample.
-//
-// Copyright (C) Microsoft Corporation. All rights reserved.
-//---------------------------------------------------------------------
-using System;
-using System.Collections;
-using System.Text;
-
-using Microsoft.Samples.Debugging.CorDebug.NativeApi;
-
-namespace Microsoft.Samples.Debugging.CorDebug
-{
- public sealed class CorAppDomain : CorController
- {
- /** Create an CorAppDomain object. */
- internal CorAppDomain (ICorDebugAppDomain appDomain)
- : base (appDomain)
- {
- }
-
- /** Get the ICorDebugAppDomain interface back from the Controller. */
- private ICorDebugAppDomain _ad ()
- {
- return (ICorDebugAppDomain) GetController();
- }
-
- /** Get the process containing the CorAppDomain. */
- public CorProcess Process
- {
- get
- {
- ICorDebugProcess proc = null;
- _ad().GetProcess (out proc);
- return CorProcess.GetCorProcess (proc);
- }
- }
-
- /** Get all Assemblies in the CorAppDomain. */
- public IEnumerable Assemblies
- {
- get
- {
- ICorDebugAssemblyEnum eas = null;
- _ad().EnumerateAssemblies (out eas);
- return new CorAssemblyEnumerator (eas);
- }
- }
-
-
- /** All active breakpoints in the CorAppDomain */
- public IEnumerable Breakpoints
- {
- get
- {
- ICorDebugBreakpointEnum bpoint = null;
- _ad().EnumerateBreakpoints (out bpoint);
- return new CorBreakpointEnumerator (bpoint);
- }
- }
-
- /** All active steppers in the CorAppDomain */
- public IEnumerable Steppers
- {
- get
- {
- ICorDebugStepperEnum step = null;
- _ad().EnumerateSteppers (out step);
- return new CorStepperEnumerator (step);
- }
- }
-
- /** Is the debugger attached to the CorAppDomain? */
- public bool IsAttached ()
- {
- int attach = 0;
- _ad().IsAttached (out attach);
- return !(attach==0);
- }
-
- /** The name of the CorAppDomain */
- public String Name
- {
- get
- {
- uint size = 0;
- _ad().GetName (0, out size, null);
- StringBuilder szName = new StringBuilder((int)size);
- _ad().GetName ((uint)szName.Capacity, out size, szName);
- return szName.ToString();
- }
- }
-
- /** Get the runtime App domain object */
- public CorValue AppDomainVariable
- {
- get
- {
- ICorDebugValue val = null;
- _ad().GetObject (out val);
- return new CorValue (val);
- }
- }
-
- /**
- * Attach the AppDomain to receive all CorAppDomain related events (e.g.
- * load assembly, load module, etc.) in order to debug the AppDomain.
- */
- public void Attach ()
- {
- _ad().Attach ();
- }
-
- /** Get the ID of this CorAppDomain */
- public int Id
- {
- get
- {
- uint id = 0;
- _ad().GetID (out id);
- return (int) id;
- }
- }
-
- /** Returns CorType object for an array of or pointer to the given type */
- public CorType GetArrayOrPointerType(CorElementType elementType, int rank, CorType parameterTypes)
- {
- ICorDebugType ct = null;
- uint urank = (uint) rank;
- (_ad() as ICorDebugAppDomain2).GetArrayOrPointerType(elementType, urank, parameterTypes.m_type, out ct);
- return ct==null?null:new CorType (ct);
- }
-
- /** Returns CorType object for a pointer to a function */
- public CorType GetFunctionPointerType(CorType[] parameterTypes)
- {
- ICorDebugType[] types = null;
- if (parameterTypes != null)
- {
- types = new ICorDebugType[parameterTypes.Length];
- for (int i = 0; i < parameterTypes.Length; i++)
- types[i] = parameterTypes[i].m_type;
- }
-
- ICorDebugType ct = null;
- (_ad() as ICorDebugAppDomain2).GetFunctionPointerType((uint)types.Length, types, out ct);
- return ct==null?null:new CorType (ct);
- }
-
- }
-}
diff --git a/main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/debug/AppDomainEnumerator.cs b/main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/debug/AppDomainEnumerator.cs deleted file mode 100644 index de09922fe8..0000000000 --- a/main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/debug/AppDomainEnumerator.cs +++ /dev/null @@ -1,71 +0,0 @@ -//---------------------------------------------------------------------
-// This file is part of the CLR Managed Debugger (mdbg) Sample.
-//
-// Copyright (C) Microsoft Corporation. All rights reserved.
-//---------------------------------------------------------------------
-using System;
-using System.Collections;
-using Microsoft.Samples.Debugging.CorDebug.NativeApi;
-
-
-namespace Microsoft.Samples.Debugging.CorDebug
-{
- /** Exposes an enumerator for AppDomains. */
- internal class CorAppDomainEnumerator : IEnumerable, IEnumerator, ICloneable
- {
- private ICorDebugAppDomainEnum m_enum;
- private CorAppDomain m_ad;
-
- internal CorAppDomainEnumerator (ICorDebugAppDomainEnum appDomainEnumerator)
- {
- m_enum = appDomainEnumerator;
- }
-
- //
- // ICloneable interface
- //
- public Object Clone ()
- {
- ICorDebugEnum clone = null;
- m_enum.Clone (out clone);
- return new CorAppDomainEnumerator ((ICorDebugAppDomainEnum)clone);
- }
-
- //
- // IEnumerable interface
- //
- public IEnumerator GetEnumerator ()
- {
- return this;
- }
-
- //
- // IEnumerator interface
- //
- public bool MoveNext ()
- {
- ICorDebugAppDomain[] a = new ICorDebugAppDomain [1];
- uint c = 0;
- int r = m_enum.Next ((uint) a.Length, a, out c);
- if (r==0 && c==1) // S_OK && we got 1 new element
- m_ad = new CorAppDomain (a[0]);
- else
- m_ad = null;
- return m_ad != null;
- }
-
- public void Reset ()
- {
- m_enum.Reset ();
- m_ad = null;
- }
-
- public Object Current
- {
- get
- {
- return m_ad;
- }
- }
- } /* class AppDomainEnumerator */
-} /* namespace */
diff --git a/main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/debug/Assembly.cs b/main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/debug/Assembly.cs deleted file mode 100644 index bdb3d18559..0000000000 --- a/main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/debug/Assembly.cs +++ /dev/null @@ -1,111 +0,0 @@ -//---------------------------------------------------------------------
-// This file is part of the CLR Managed Debugger (mdbg) Sample.
-//
-// Copyright (C) Microsoft Corporation. All rights reserved.
-//---------------------------------------------------------------------
-using System;
-using System.Collections;
-
-using Microsoft.Samples.Debugging.CorDebug.NativeApi;
-
-namespace Microsoft.Samples.Debugging.CorDebug
-{
- /**
- * Information about an Assembly being debugged.
- */
- public sealed class CorAssembly : WrapperBase
- {
- private ICorDebugAssembly m_asm;
-
- internal CorAssembly (ICorDebugAssembly managedAssembly)
- :base(managedAssembly)
- {
- m_asm = managedAssembly;
- }
-
-
- /** Get the process containing the Assembly. */
- public CorProcess Process
- {
- get
- {
- ICorDebugProcess proc = null;
- m_asm.GetProcess (out proc);
- return CorProcess.GetCorProcess(proc);
- }
- }
-
- /** Get the AppDomain containing the assembly. */
- public CorAppDomain AppDomain
- {
- get
- {
- ICorDebugAppDomain ad = null;
- m_asm.GetAppDomain (out ad);
- return new CorAppDomain (ad);
- }
- }
-
- /** All the modules in the assembly. */
- public IEnumerable Modules
- {
- get
- {
- ICorDebugModuleEnum emod = null;
- m_asm.EnumerateModules (out emod);
- return new CorModuleEnumerator (emod);
- }
- }
-
- /** Get the name of the code base used to load the assembly. */
- public String CodeBase
- {
- get
- {
- char[] name = new char[300];
- uint sz = 0;
- m_asm.GetCodeBase ((uint) name.Length, out sz, name);
- // ``sz'' includes terminating null; String doesn't handle null,
- // so we "forget" it.
- return new String (name, 0, (int) (sz-1));
- }
- }
-
- /** The name of the assembly. */
- public String Name
- {
- get
- {
- char[] name = new char[300];
- uint sz = 0;
- m_asm.GetName ((uint) name.Length, out sz, name);
- // ``sz'' includes terminating null; String doesn't handle null,
- // so we "forget" it.
- return new String (name, 0, (int) (sz-1));
- }
- }
-
- public Boolean IsFullyTrusted
- {
- get
- {
- ICorDebugAssembly2 asm2 = m_asm as ICorDebugAssembly2;
- if( asm2 == null )
- {
- throw new NotSupportedException("This version of the CLR does not support IsFullyTrusted");
- }
-
- int trustFlag;
- asm2.IsFullyTrusted( out trustFlag );
- if( trustFlag == 0 )
- {
- return false;
- }
- else
- {
- return true;
- }
- }
- }
- } /* class Assembly */
-} /* namespace debugging */
diff --git a/main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/debug/AssemblyEnumerator.cs b/main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/debug/AssemblyEnumerator.cs deleted file mode 100644 index aebd8074a1..0000000000 --- a/main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/debug/AssemblyEnumerator.cs +++ /dev/null @@ -1,71 +0,0 @@ -//---------------------------------------------------------------------
-// This file is part of the CLR Managed Debugger (mdbg) Sample.
-//
-// Copyright (C) Microsoft Corporation. All rights reserved.
-//---------------------------------------------------------------------
-using System;
-using System.Collections;
-
-using Microsoft.Samples.Debugging.CorDebug.NativeApi;
-
-namespace Microsoft.Samples.Debugging.CorDebug
-{
- /** Exposes an enumerator for Assemblies. */
- internal class CorAssemblyEnumerator : IEnumerable, IEnumerator, ICloneable
- {
- private ICorDebugAssemblyEnum m_enum;
- private CorAssembly m_asm;
-
- internal CorAssemblyEnumerator (ICorDebugAssemblyEnum assemblyEnumerator)
- {
- m_enum = assemblyEnumerator;
- }
-
- //
- // ICloneable interface
- //
- public Object Clone ()
- {
- ICorDebugEnum clone = null;
- m_enum.Clone (out clone);
- return new CorAssemblyEnumerator ((ICorDebugAssemblyEnum)clone);
- }
-
- //
- // IEnumerable interface
- //
- public IEnumerator GetEnumerator ()
- {
- return this;
- }
-
- //
- // IEnumerator interface
- //
- public bool MoveNext ()
- {
- ICorDebugAssembly[] a = new ICorDebugAssembly[1];
- uint c = 0;
- int r = m_enum.Next ((uint) a.Length, a, out c);
- if (r==0 && c==1) // S_OK && we got 1 new element
- m_asm = new CorAssembly (a[0]);
- else
- m_asm = null;
- return m_asm != null;
- }
-
- public void Reset ()
- {
- m_enum.Reset ();
- m_asm = null;
- }
-
- public Object Current
- {
- get
- {
- return m_asm;
- }
- }
- } /* class AssemblyEnumerator */
-} /* namespace */
diff --git a/main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/debug/Breakpoint.cs b/main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/debug/Breakpoint.cs deleted file mode 100644 index 61994747eb..0000000000 --- a/main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/debug/Breakpoint.cs +++ /dev/null @@ -1,39 +0,0 @@ -//---------------------------------------------------------------------
-// This file is part of the CLR Managed Debugger (mdbg) Sample.
-//
-// Copyright (C) Microsoft Corporation. All rights reserved.
-//---------------------------------------------------------------------
-using System;
-using System.Diagnostics;
-
-using Microsoft.Samples.Debugging.CorDebug.NativeApi;
-
-namespace Microsoft.Samples.Debugging.CorDebug
-{
- public abstract class CorBreakpoint : WrapperBase
- {
- [CLSCompliant(false)]
- protected CorBreakpoint(ICorDebugBreakpoint managedBreakpoint) : base(managedBreakpoint)
- {
- Debug.Assert(managedBreakpoint!=null);
- m_corBreakpoint = managedBreakpoint;
- }
-
- public virtual void Activate(bool active)
- {
- m_corBreakpoint.Activate (active ? 1 : 0);
- }
-
- public virtual bool IsActive
- {
- get
- {
- int r = 0;
- m_corBreakpoint.IsActive (out r);
- return !(r==0);
- }
- }
-
- private ICorDebugBreakpoint m_corBreakpoint;
- }
-} /* namespace */
diff --git a/main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/debug/BreakpointEnumerator.cs b/main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/debug/BreakpointEnumerator.cs deleted file mode 100644 index 1369812344..0000000000 --- a/main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/debug/BreakpointEnumerator.cs +++ /dev/null @@ -1,84 +0,0 @@ -//---------------------------------------------------------------------
-// This file is part of the CLR Managed Debugger (mdbg) Sample.
-//
-// Copyright (C) Microsoft Corporation. All rights reserved.
-//---------------------------------------------------------------------
-using System;
-using System.Collections;
-
-using Microsoft.Samples.Debugging.CorDebug.NativeApi;
-
-namespace Microsoft.Samples.Debugging.CorDebug
-{
- /** Exposes an enumerator for Assemblies. */
- internal class CorBreakpointEnumerator : IEnumerable, IEnumerator, ICloneable
- {
- private ICorDebugBreakpointEnum m_enum;
- private CorBreakpoint m_br;
-
- internal CorBreakpointEnumerator (ICorDebugBreakpointEnum breakpointEnumerator)
- {
- m_enum = breakpointEnumerator;
- }
-
- //
- // ICloneable interface
- //
- public Object Clone ()
- {
- ICorDebugEnum clone = null;
- m_enum.Clone (out clone);
- return new CorBreakpointEnumerator ((ICorDebugBreakpointEnum)clone);
- }
-
- //
- // IEnumerable interface
- //
- public IEnumerator GetEnumerator ()
- {
- return this;
- }
-
- //
- // IEnumerator interface
- //
- public bool MoveNext ()
- {
- ICorDebugBreakpoint[] a = new ICorDebugBreakpoint[1];
- uint c = 0;
- int r = m_enum.Next ((uint) a.Length, a, out c);
- if (r==0 && c==1) // S_OK && we got 1 new element
- {
- ICorDebugBreakpoint br = a[0];
- throw new NotImplementedException();
- /*
- if(a is ICorDebugFunctionBreakpoint)
- m_br = new CorFunctionBreakpoint((ICorDebugFunctionBreakpoint)br);
- else if( a is ICorDebugModuleBreakpoint)
- m_br = new CorModuleBreakpoint((ICorDebugModuleBreakpoint)br);
- else if( a is ICorDebugValueBreakpoint)
- m_br = new ValueBreakpoint((ICorDebugValueBreakpoint)m_br);
- else
- Debug.Assert(false);
- */
- }
- else
- m_br = null;
- return m_br != null;
- }
-
- public void Reset ()
- {
- m_enum.Reset ();
- m_br = null;
- }
-
- public Object Current
- {
- get
- {
- return m_br;
- }
- }
- } /* class BreakpointEnumerator */
-} /* namespace */
diff --git a/main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/debug/ChainEnumerator.cs b/main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/debug/ChainEnumerator.cs deleted file mode 100644 index 300351ff1f..0000000000 --- a/main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/debug/ChainEnumerator.cs +++ /dev/null @@ -1,76 +0,0 @@ -//---------------------------------------------------------------------
-// This file is part of the CLR Managed Debugger (mdbg) Sample.
-//
-// Copyright (C) Microsoft Corporation. All rights reserved.
-//---------------------------------------------------------------------
-using System;
-using System.Collections;
-
-using Microsoft.Samples.Debugging.CorDebug.NativeApi;
-
-namespace Microsoft.Samples.Debugging.CorDebug
-{
- /**
- * Exposes an enumerator for Chains.
- *
- * This is horribly broken at this point, as Chains aren't implemented yet.
- */
- internal class CorChainEnumerator : IEnumerable, IEnumerator, ICloneable
- {
- private ICorDebugChainEnum m_enum;
-
- private CorChain m_chain;
-
- internal CorChainEnumerator (ICorDebugChainEnum chainEnumerator)
- {
- m_enum = chainEnumerator;
- }
-
- //
- // ICloneable interface
- //
- public Object Clone ()
- {
- ICorDebugEnum clone = null;
- m_enum.Clone (out clone);
- return new CorChainEnumerator ((ICorDebugChainEnum)clone);
- }
-
- //
- // IEnumerable interface
- //
- public IEnumerator GetEnumerator ()
- {
- return this;
- }
-
- //
- // IEnumerator interface
- //
- public bool MoveNext ()
- {
- ICorDebugChain[] a = new ICorDebugChain[1];
- uint c = 0;
- int r = m_enum.Next ((uint)a.Length, a, out c);
- if (r==0 && c==1) // S_OK && we got 1 new element
- m_chain = new CorChain (a[0]);
- else
- m_chain = null;
- return m_chain != null;
- }
-
- public void Reset ()
- {
- m_enum.Reset ();
- m_chain = null;
- }
-
- public Object Current
- {
- get
- {
- return m_chain;
- }
- }
- } /* class ChainEnumerator */
-} /* namespace */
diff --git a/main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/debug/Class.cs b/main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/debug/Class.cs deleted file mode 100644 index d764d6d889..0000000000 --- a/main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/debug/Class.cs +++ /dev/null @@ -1,80 +0,0 @@ -//---------------------------------------------------------------------
-// This file is part of the CLR Managed Debugger (mdbg) Sample.
-//
-// Copyright (C) Microsoft Corporation. All rights reserved.
-//---------------------------------------------------------------------
-using System;
-
-using Microsoft.Samples.Debugging.CorDebug.NativeApi;
-
-namespace Microsoft.Samples.Debugging.CorDebug
-{
- public sealed class CorClass : WrapperBase
- {
- internal ICorDebugClass m_class;
-
- internal CorClass (ICorDebugClass managedClass)
- : base(managedClass)
- {
- m_class = managedClass;
- }
-
-
-
- /** The module containing the class */
- public CorModule Module
- {
- get
- {
- ICorDebugModule m = null;
- m_class.GetModule (out m);
- return new CorModule (m);
- }
- }
-
- /** The metadata typedef token of the class. */
- public int Token
- {
- get
- {
- uint td = 0;
- m_class.GetToken (out td);
- return (int) td;
- }
- }
-
- public bool JMCStatus
- {
- set
- {
- (m_class as ICorDebugClass2).SetJMCStatus(value?1:0);
- }
- }
-
- public CorType GetParameterizedType(CorElementType elementType, CorType[] typeArguments)
- {
- ICorDebugType[] types = null;
- uint length = 0;
- if (typeArguments != null)
- {
- types = new ICorDebugType[typeArguments.Length];
- for (int i = 0; i < typeArguments.Length; i++)
- types[i] = typeArguments[i].m_type;
- length = (uint)typeArguments.Length;
- }
-
- ICorDebugType pType;
- (m_class as ICorDebugClass2).GetParameterizedType(elementType, length, types, out pType);
- return pType==null?null:new CorType (pType);
- }
-
- public CorValue GetStaticFieldValue(int fieldToken, CorFrame managedFrame)
- {
- ICorDebugValue pValue;
- m_class.GetStaticFieldValue((uint)fieldToken, (managedFrame==null)?null:managedFrame.m_frame, out pValue);
- return pValue==null?null:new CorValue(pValue);
- }
-
- } /* class Class */
-
-} /* namespace */
diff --git a/main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/debug/Constants.cs b/main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/debug/Constants.cs deleted file mode 100644 index d2b5502197..0000000000 --- a/main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/debug/Constants.cs +++ /dev/null @@ -1,107 +0,0 @@ -//---------------------------------------------------------------------
-// This file is part of the CLR Managed Debugger (mdbg) Sample.
-//
-// Copyright (C) Microsoft Corporation. All rights reserved.
-//---------------------------------------------------------------------
-using System;
-using System.Diagnostics;
-using System.Globalization;
-
-using Microsoft.Samples.Debugging.CorDebug.NativeApi;
-
-namespace Microsoft.Samples.Debugging.CorDebug
-{
-
- [Flags]
- public enum ContextFlags
- {
- CONTEXT_CONTROL = 0x00010001,
- CONTEXT_INTEGER = 0x00010002,
- CONTEXT_SEGMENTS = 0x00010004,
- CONTEXT_FLOATING_POINT = 0x00010008,
- CONTEXT_DEBUG_REGISTERS = 0x00010010,
- CONTEXT_EXTENDED_REGISTERS = 0x00010020,
- CONTEXT_FULL = CONTEXT_CONTROL + CONTEXT_INTEGER + CONTEXT_SEGMENTS,
- CONTEXT_ALL = CONTEXT_CONTROL + CONTEXT_INTEGER + CONTEXT_FLOATING_POINT + CONTEXT_DEBUG_REGISTERS + CONTEXT_EXTENDED_REGISTERS
- }
-
- public enum CorDebuggerVersion
- {
- RTM = 1, //v1.0
- Everett = 2, //v1.1
- Whidbey = 3, //v2.0
- }
-
- // copied from Cordebug.idl
- [Flags]
- public enum CorDebugJITCompilerFlags
- {
- CORDEBUG_JIT_DEFAULT = 0x1,
- CORDEBUG_JIT_DISABLE_OPTIMIZATION = 0x3,
- CORDEBUG_JIT_ENABLE_ENC = 0x7
- }
-
- // keep in sync with CorHdr.h
- public enum CorTokenType
- {
- mdtModule = 0x00000000, //
- mdtTypeRef = 0x01000000, //
- mdtTypeDef = 0x02000000, //
- mdtFieldDef = 0x04000000, //
- mdtMethodDef = 0x06000000, //
- mdtParamDef = 0x08000000, //
- mdtInterfaceImpl = 0x09000000, //
- mdtMemberRef = 0x0a000000, //
- mdtCustomAttribute = 0x0c000000, //
- mdtPermission = 0x0e000000, //
- mdtSignature = 0x11000000, //
- mdtEvent = 0x14000000, //
- mdtProperty = 0x17000000, //
- mdtModuleRef = 0x1a000000, //
- mdtTypeSpec = 0x1b000000, //
- mdtAssembly = 0x20000000, //
- mdtAssemblyRef = 0x23000000, //
- mdtFile = 0x26000000, //
- mdtExportedType = 0x27000000, //
- mdtManifestResource = 0x28000000, //
- mdtGenericParam = 0x2a000000, //
- mdtMethodSpec = 0x2b000000, //
- mdtGenericParamConstraint = 0x2c000000,
-
- mdtString = 0x70000000, //
- mdtName = 0x71000000, //
- mdtBaseType = 0x72000000, // Leave this on the high end value. This does not correspond to metadata table
- }
-
- public abstract class TokenUtils
- {
- public static CorTokenType TypeFromToken(int token)
- {
- return (CorTokenType) ((UInt32)token & 0xff000000);
- }
-
- public static int RidFromToken(int token)
- {
- return (int)( (UInt32)token & 0x00ffffff);
- }
-
- public static bool IsNullToken(int token)
- {
- return (RidFromToken(token)==0);
- }
- }
-
-
- abstract class HRUtils
- {
- public static bool IsFailingHR(int hr)
- {
- return hr<0;
- }
-
- public static bool IsSOK(int hr)
- {
- return hr==0;
- }
- }
-}
diff --git a/main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/debug/Controller.cs b/main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/debug/Controller.cs deleted file mode 100644 index 323bbabb03..0000000000 --- a/main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/debug/Controller.cs +++ /dev/null @@ -1,129 +0,0 @@ -//---------------------------------------------------------------------
-// This file is part of the CLR Managed Debugger (mdbg) Sample.
-//
-// Copyright (C) Microsoft Corporation. All rights reserved.
-//---------------------------------------------------------------------
-using System;
-using System.Collections;
-
-using Microsoft.Samples.Debugging.CorDebug.NativeApi;
-
-namespace Microsoft.Samples.Debugging.CorDebug
-{
- /**
- * Represents a scope at which program execution can be controlled.
- */
- public class CorController : WrapperBase
- {
- internal CorController (ICorDebugController controller)
- :base(controller)
- {
- m_controller = controller;
- }
-
- /**
- * Cooperative stop on all threads running managed code in the process.
- */
- public virtual void Stop (int timeout)
- {
- m_controller.Stop ((uint)timeout);
- }
-
- /**
- * Continue processes after a call to Stop.
- *
- * outOfBand is true if continuing from an unmanaged event that
- * was sent with the outOfBand flag in the unmanaged callback;
- * false if continueing from a managed event or normal unmanaged event.
- */
- public virtual void Continue (bool outOfBand)
- {
- m_controller.Continue (outOfBand ? 1 : 0);
- }
-
- /**
- * Are the threads in the process running freely?
- */
- public bool IsRunning ()
- {
- int running = 0;
- m_controller.IsRunning (out running);
- return !(running == 0);
- }
-
- /**
- * Are there managed callbacks queued up for the requested thread?
- */
- public bool HasQueuedCallbacks (CorThread managedThread)
- {
- int queued = 0;
- m_controller.HasQueuedCallbacks( (managedThread==null)?null:managedThread.GetInterface(),
- out queued
- );
- return !(queued == 0);
- }
-
- /** Enumerate over all threads in active in the process. */
- public IEnumerable Threads
- {
- get
- {
- ICorDebugThreadEnum ethreads = null;
- m_controller.EnumerateThreads (out ethreads);
- return new CorThreadEnumerator (ethreads);
- }
- }
-
- /**
- * Set the current debug state of each thread.
- */
- [CLSCompliant(false)]
- public void SetAllThreadsDebugState (CorDebugThreadState state, CorThread exceptThis)
- {
- m_controller.SetAllThreadsDebugState (state, exceptThis != null ? exceptThis.GetInterface() : null);
- }
-
- /** Detach the debugger from the process/appdomain. */
- public void Detach ()
- {
- m_controller.Detach ();
- }
-
- /** Terminate the current process. */
- public void Terminate (int exitCode)
- {
- m_controller.Terminate ((uint)exitCode);
- }
-
- /* Can the delta PEs be applied to the running process? */
- /*
- public IEnumerable CanCommitChanges (uint number, EditAndContinueSnapshot[] snapshots)
- {
- ICorDebugErrorInfoEnum error = null;
- m_controller.CanCommitChanges (number, snapshots, out error);
- if (error == null)
- return null;
- return new ErrorInfoEnumerator (error);
- }
- */
-
- /* Apply the delta PEs to the running process. */
- /*
- public IEnumerable CommitChanges (uint number, EditAndContinueSnapshot[] snapshots)
- {
- ICorDebugErrorInfoEnum error = null;
- m_controller.CommitChanges (number, snapshots, out error);
- if (error == null)
- return null;
- return new ErrorInfoEnumerator (error);
- }
- */
- [CLSCompliant(false)]
- protected ICorDebugController GetController ()
- {
- return m_controller;
- }
-
- private ICorDebugController m_controller;
- }
-}
diff --git a/main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/debug/CorAPIAssemblyAttributes.cs b/main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/debug/CorAPIAssemblyAttributes.cs deleted file mode 100644 index 3da9b7c4ec..0000000000 --- a/main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/debug/CorAPIAssemblyAttributes.cs +++ /dev/null @@ -1,13 +0,0 @@ -
-// Attributes for the CorApiAssembly
-using System;
-using System.Runtime.InteropServices;
-using System.Runtime.InteropServices.ComTypes;
-using System.Security.Permissions;
-
-
-
-// Expose non-CLS-compliant types, so we can't be CLS-compliant
-[assembly:CLSCompliant(true)]
-// [Xamarin] Bump version to .NET 4.0.
-[assembly:System.Runtime.InteropServices.ComVisible(false)]
\ No newline at end of file diff --git a/main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/debug/Debugger.cs b/main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/debug/Debugger.cs deleted file mode 100644 index 7004b21a8d..0000000000 --- a/main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/debug/Debugger.cs +++ /dev/null @@ -1,2118 +0,0 @@ -//---------------------------------------------------------------------
-// This file is part of the CLR Managed Debugger (mdbg) Sample.
-//
-// Copyright (C) Microsoft Corporation. All rights reserved.
-//---------------------------------------------------------------------
-using System;
-using System.Collections;
-using System.Diagnostics;
-using System.Runtime.InteropServices;
-using System.Runtime.InteropServices.ComTypes;
-using System.Threading;
-using System.Text;
-using System.Security.Permissions;
-using System.Globalization;
-
-
-using Microsoft.Samples.Debugging.CorDebug.NativeApi;
-using Microsoft.Samples.Debugging.Extensions;
-using System.Collections.Generic;
-using Microsoft.Samples.Debugging.CorPublish.Metahost;
-using Microsoft.Win32.SafeHandles;
-
-
-namespace Microsoft.Samples.Debugging.CorDebug
-{
- /**
- * Wraps the native CLR Debugger.
- * Note that we don't derive the class from WrapperBase, becuase this
- * class will never be returned in any callback.
- */
- public sealed class CorDebugger : MarshalByRefObject
- {
- private const int MaxVersionStringLength = 256; // == MAX_PATH
-
- public static string GetDebuggerVersionFromFile(string pathToExe)
- {
- Debug.Assert( !string.IsNullOrEmpty(pathToExe) );
- if( string.IsNullOrEmpty(pathToExe) )
- throw new ArgumentException("Value cannot be null or empty.", "pathToExe");
- int neededSize;
- StringBuilder sb = new StringBuilder(MaxVersionStringLength);
- NativeMethods.GetRequestedRuntimeVersion(pathToExe, sb, sb.Capacity, out neededSize);
- return sb.ToString();
- }
-
- public static string GetDebuggerVersionFromPid(int pid)
- {
- using(ProcessSafeHandle ph = NativeMethods.OpenProcess((int)(NativeMethods.ProcessAccessOptions.PROCESS_VM_READ |
- NativeMethods.ProcessAccessOptions.PROCESS_QUERY_INFORMATION |
- NativeMethods.ProcessAccessOptions.PROCESS_DUP_HANDLE |
- NativeMethods.ProcessAccessOptions.SYNCHRONIZE),
- false, // inherit handle
- pid) )
- {
- if( ph.IsInvalid )
- throw new System.ComponentModel.Win32Exception(Marshal.GetLastWin32Error());
- int neededSize;
- StringBuilder sb = new StringBuilder(MaxVersionStringLength);
- NativeMethods.GetVersionFromProcess(ph, sb, sb.Capacity, out neededSize);
- return sb.ToString();
- }
- }
-
- public static List<string> GetProcessLoadedRuntimes (int pid)
- {
- using (ProcessSafeHandle ph = NativeMethods.OpenProcess (
- (int) (NativeMethods.ProcessAccessOptions.PROCESS_VM_READ |
- NativeMethods.ProcessAccessOptions.PROCESS_QUERY_INFORMATION |
- NativeMethods.ProcessAccessOptions.PROCESS_DUP_HANDLE |
- NativeMethods.ProcessAccessOptions.SYNCHRONIZE),
- false, // inherit handle
- pid)) {
- if (ph.IsInvalid)
- return new List<string> ();
- int neededSize = MaxVersionStringLength;
- IClrMetaHost host;
- NativeMethods.CLRCreateInstance (ref NativeMethods.CLSID_CLRMetaHost,
- ref NativeMethods.IID_ICLRMetaHost, out host);
- var result = new List<string> ();
- var runtimes = host.EnumerateLoadedRuntimes (ph);
- var array = new object[1];
- int count;
- while (runtimes.Next (1, array, out count) == 0) {
- var info = array[0] as IClrRuntimeInfo;
- if (info == null)
- continue;
- var stringBuilder = new StringBuilder (MaxVersionStringLength);
- info.GetVersionString (stringBuilder, ref neededSize);
- result.Add (stringBuilder.ToString ());
- }
- return result;
- }
- }
-
- public static string GetDefaultDebuggerVersion()
- {
- int size;
- NativeMethods.GetCORVersion(null,0,out size);
- Debug.Assert(size>0);
- StringBuilder sb = new StringBuilder(size);
- int hr = NativeMethods.GetCORVersion(sb,sb.Capacity,out size);
- Marshal.ThrowExceptionForHR(hr);
- return sb.ToString();
- }
-
-
- /// <summary>Creates a debugger wrapper from Guid.</summary>
- public CorDebugger(Guid debuggerGuid)
- {
- ICorDebug rawDebuggingAPI;
- NativeMethods.CoCreateInstance(ref debuggerGuid,
- IntPtr.Zero, // pUnkOuter
- 1, // CLSCTX_INPROC_SERVER
- ref NativeMethods.IIDICorDebug,
- out rawDebuggingAPI);
- InitFromICorDebug(rawDebuggingAPI);
- }
- /// <summary>Creates a debugger interface that is able debug requested verison of CLR</summary>
- /// <param name="debuggerVersion">Version number of the debugging interface.</param>
- /// <remarks>The version number is usually retrieved either by calling one of following mscoree functions:
- /// GetCorVerison, GetRequestedRuntimeVersion or GetVersionFromProcess.</remarks>
- public CorDebugger (string debuggerVersion)
- {
- InitFromVersion(debuggerVersion);
- }
-
- ~CorDebugger()
- {
- if(m_debugger!=null)
- try
- {
- Terminate();
- }
- catch
- {
- // sometimes we cannot terminate because GC collects object in wrong
- // order. But since the whole process is shutting down, we really
- // don't care.
-
- }
- }
-
-
- /**
- * Closes the debugger. After this method is called, it is an error
- * to call any other methods on this object.
- */
- public void Terminate ()
- {
- Debug.Assert(m_debugger!=null);
- ICorDebug d= m_debugger;
- m_debugger = null;
- d.Terminate ();
- }
-
- /**
- * Specify the callback object to use for managed events.
- */
- internal void SetManagedHandler (ICorDebugManagedCallback managedCallback)
- {
- m_debugger.SetManagedHandler (managedCallback);
- }
-
- /**
- * Specify the callback object to use for unmanaged events.
- */
- internal void SetUnmanagedHandler (ICorDebugUnmanagedCallback nativeCallback)
- {
- m_debugger.SetUnmanagedHandler (nativeCallback);
- }
-
- /**
- * Launch a process under the control of the debugger.
- *
- * Parameters are the same as the Win32 CreateProcess call.
- */
- public CorProcess CreateProcess (
- String applicationName,
- String commandLine
- )
- {
- return CreateProcess (applicationName, commandLine, ".");
- }
-
- /**
- * Launch a process under the control of the debugger.
- *
- * Parameters are the same as the Win32 CreateProcess call.
- */
- public CorProcess CreateProcess (
- String applicationName,
- String commandLine,
- String currentDirectory
- )
- {
- // [Xamarin] ASP.NET Debugging.
- return CreateProcess (applicationName, commandLine, currentDirectory, null, 0);
- }
-
- /**
- * Launch a process under the control of the debugger.
- *
- * Parameters are the same as the Win32 CreateProcess call.
- */
- // [Xamarin] ASP.NET Debugging.
- public CorProcess CreateProcess (
- String applicationName,
- String commandLine,
- String currentDirectory,
- IDictionary<string,string> environment
- )
- {
- return CreateProcess (applicationName, commandLine, currentDirectory, environment, 0);
- }
-
- /**
- * Launch a process under the control of the debugger.
- *
- * Parameters are the same as the Win32 CreateProcess call.
- */
- public CorProcess CreateProcess (
- String applicationName,
- String commandLine,
- String currentDirectory,
- IDictionary<string,string> environment,
- int flags
- )
- {
- PROCESS_INFORMATION pi = new PROCESS_INFORMATION ();
-
- STARTUPINFO si = new STARTUPINFO ();
- si.cb = Marshal.SizeOf(si);
-
- // initialize safe handles
- // [Xamarin] ASP.NET Debugging and output redirection.
- SafeFileHandle outReadPipe = null, errorReadPipe = null;
- DebuggerExtensions.SetupOutputRedirection (si, ref flags, out outReadPipe, out errorReadPipe);
- IntPtr env = DebuggerExtensions.SetupEnvironment (environment);
-
- CorProcess ret;
-
- //constrained execution region (Cer)
- System.Runtime.CompilerServices.RuntimeHelpers.PrepareConstrainedRegions();
- try
- {
- }
- finally
- {
- ret = CreateProcess (
- applicationName,
- commandLine,
- null,
- null,
- true, // inherit handles
- flags, // creation flags
- env, // environment
- currentDirectory,
- si, // startup info
- ref pi, // process information
- CorDebugCreateProcessFlags.DEBUG_NO_SPECIAL_OPTIONS);
- NativeMethods.CloseHandle (pi.hProcess);
- NativeMethods.CloseHandle (pi.hThread);
- }
-
- DebuggerExtensions.TearDownEnvironment (env);
- DebuggerExtensions.TearDownOutputRedirection (outReadPipe, errorReadPipe, si, ret);
-
- return ret;
- }
-
- /**
- * Launch a process under the control of the debugger.
- *
- * Parameters are the same as the Win32 CreateProcess call.
- *
- * The caller should remember to execute:
- *
- * Microsoft.Win32.Interop.Windows.CloseHandle (
- * processInformation.hProcess);
- *
- * after CreateProcess returns.
- */
- [CLSCompliant(false)]
- public CorProcess CreateProcess (
- String applicationName,
- String commandLine,
- SECURITY_ATTRIBUTES processAttributes,
- SECURITY_ATTRIBUTES threadAttributes,
- bool inheritHandles,
- int creationFlags,
- IntPtr environment,
- String currentDirectory,
- STARTUPINFO startupInfo,
- ref PROCESS_INFORMATION processInformation,
- CorDebugCreateProcessFlags debuggingFlags)
- {
- /*
- * If commandLine is: <c:\a b\a arg1 arg2> and c:\a.exe does not exist,
- * then without this logic, "c:\a b\a.exe" would be tried next.
- * To prevent this ambiguity, this forces the user to quote if the path
- * has spaces in it: <"c:\a b\a" arg1 arg2>
- */
- if(null == applicationName && !commandLine.StartsWith("\""))
- {
- int firstSpace = commandLine.IndexOf(" ");
- if(firstSpace != -1)
- commandLine = String.Format(CultureInfo.InvariantCulture, "\"{0}\" {1}", commandLine.Substring(0,firstSpace), commandLine.Substring(firstSpace, commandLine.Length-firstSpace));
- }
-
- ICorDebugProcess proc = null;
-
- m_debugger.CreateProcess (
- applicationName,
- commandLine,
- processAttributes,
- threadAttributes,
- inheritHandles ? 1 : 0,
- (uint) creationFlags,
- environment,
- currentDirectory,
- startupInfo,
- processInformation,
- debuggingFlags,
- out proc);
-
- return CorProcess.GetCorProcess(proc);
- }
-
- /**
- * Attach to an active process
- */
- public CorProcess DebugActiveProcess (int processId, bool win32Attach)
- {
- ICorDebugProcess proc = null;
- m_debugger.DebugActiveProcess ((uint)processId, win32Attach ? 1 : 0, out proc);
- return CorProcess.GetCorProcess(proc);
- }
-
- /**
- * Enumerate all processes currently being debugged.
- */
- public IEnumerable Processes
- {
- get
- {
- ICorDebugProcessEnum eproc = null;
- m_debugger.EnumerateProcesses (out eproc);
- return new CorProcessEnumerator (eproc);
- }
- }
-
- /**
- * Get the Process object for the given PID.
- */
- public CorProcess GetProcess (int processId)
- {
- ICorDebugProcess proc = null;
- m_debugger.GetProcess ((uint) processId, out proc);
- return CorProcess.GetCorProcess(proc);
- }
-
- /**
- * Warn us of potentional problems in using debugging (eg. whether a kernel debugger is
- * attached). This API should probably be renamed or the warnings turned into errors
- * in CreateProcess/DebugActiveProcess
- */
- public void CanLaunchOrAttach(int processId, bool win32DebuggingEnabled)
- {
- m_debugger.CanLaunchOrAttach((uint) processId,
- win32DebuggingEnabled?1:0);
- }
-
- ////////////////////////////////////////////////////////////////////////////////
- //
- // CorDebugger private implement part
- //
- ////////////////////////////////////////////////////////////////////////////////
-
- // called by constructors during initialization
- private void InitFromVersion(string debuggerVersion)
- {
- if( debuggerVersion.StartsWith("v1") )
- {
- throw new ArgumentException( "Can't debug a version 1 CLR process (\"" + debuggerVersion +
- "\"). Run application in a version 2 CLR, or use a version 1 debugger instead." );
- }
-
- ICorDebug rawDebuggingAPI;
- // [Xamarin] .NET 4 API Version.
-#if MDBG_FAKE_COM
- // TODO: Ideally, there wouldn't be any difference in the corapi code for MDBG_FAKE_COM.
- // This would require puting this initialization logic into the wrapper and interop assembly, which doesn't seem right.
- // We should also release this pUnk, but doing that here would be difficult and we aren't done with it until
- // we shutdown anyway.
- IntPtr pUnk = NativeMethods.CreateDebuggingInterfaceFromVersion((int)CorDebuggerVersion.Whidbey, debuggerVersion);
- rawDebuggingAPI = new NativeApi.CorDebugClass(pUnk);
-#else
- int apiVersion = debuggerVersion.StartsWith ("v4") ? 4 : 3;
- rawDebuggingAPI = NativeMethods.CreateDebuggingInterfaceFromVersion (apiVersion, debuggerVersion);
-#endif
- InitFromICorDebug(rawDebuggingAPI);
- }
-
- private void InitFromICorDebug(ICorDebug rawDebuggingAPI)
- {
- Debug.Assert(rawDebuggingAPI!=null);
- if( rawDebuggingAPI==null )
- throw new ArgumentException("Cannot be null.","rawDebugggingAPI");
-
- m_debugger = rawDebuggingAPI;
- m_debugger.Initialize ();
- m_debugger.SetManagedHandler (new ManagedCallback(this));
- }
-
- /**
- * Helper for invoking events. Checks to make sure that handlers
- * are hooked up to a handler before the handler is invoked.
- *
- * We want to allow maximum flexibility by our callers. As such,
- * we don't require that they call <code>e.Controller.Continue</code>,
- * nor do we require that this class call it. <b>Someone</b> needs
- * to call it, however.
- *
- * Consequently, if an exception is thrown and the process is stopped,
- * the process is continued automatically.
- */
-
- void InternalFireEvent(ManagedCallbackType callbackType,CorEventArgs e)
- {
- CorProcess owner;
- CorController c = e.Controller;
- Debug.Assert(c!=null);
- if(c is CorProcess)
- owner = (CorProcess)c ;
- else
- {
- Debug.Assert(c is CorAppDomain);
- owner = (c as CorAppDomain).Process;
- }
- Debug.Assert(owner!=null);
- try
- {
- owner.DispatchEvent(callbackType,e);
- }
- finally
- {
- if(e.Continue)
- {
- e.Controller.Continue(false);
- }
- }
- }
-
- ////////////////////////////////////////////////////////////////////////////////
- //
- // ManagedCallback
- //
- ////////////////////////////////////////////////////////////////////////////////
-
- /**
- * This is the object that gets passed to the debugger. It's
- * the intermediate "source" of the events, which repackages
- * the event arguments into a more approprate form and forwards
- * the call to the appropriate function.
- */
- private class ManagedCallback : ManagedCallbackBase
- {
- public ManagedCallback (CorDebugger outer)
- {
- m_outer = outer;
- }
- protected override void HandleEvent(ManagedCallbackType eventId, CorEventArgs args)
- {
- m_outer.InternalFireEvent(eventId, args);
- }
- private CorDebugger m_outer;
- }
-
-
-
- private ICorDebug m_debugger = null;
- } /* class Debugger */
-
-
- ////////////////////////////////////////////////////////////////////////////////
- //
- // CorEvent Classes & Corresponding delegates
- //
- ////////////////////////////////////////////////////////////////////////////////
-
- /**
- * All of the Debugger events make a Controller available (to specify
- * whether or not to continue the program, or to stop, etc.).
- *
- * This serves as the base class for all events used for debugging.
- *
- * NOTE: If you don't want <b>Controller.Continue(false)</b> to be
- * called after event processing has finished, you need to set the
- * <b>Continue</b> property to <b>false</b>.
- */
-
- public class CorEventArgs : EventArgs
- {
- private CorController m_controller;
-
- private bool m_continue;
-
-
- private ManagedCallbackType m_callbackType;
-
- private CorThread m_thread;
-
- public CorEventArgs(CorController controller)
- {
- m_controller = controller;
- m_continue = true;
- }
-
- public CorEventArgs(CorController controller, ManagedCallbackType callbackType)
- {
- m_controller = controller;
- m_continue = true;
- m_callbackType = callbackType;
- }
-
- /** The Controller of the current event. */
- public CorController Controller
- {
- get
- {
- return m_controller;
- }
- }
-
- /**
- * The default behavior after an event is to Continue processing
- * after the event has been handled. This can be changed by
- * setting this property to false.
- */
- public virtual bool Continue
- {
- get
- {
- return m_continue;
- }
- set
- {
- m_continue = value;
- }
- }
-
- /// <summary>
- /// The type of callback that returned this CorEventArgs object.
- /// </summary>
- public ManagedCallbackType CallbackType
- {
- get
- {
- return m_callbackType;
- }
- }
-
- /// <summary>
- /// The CorThread associated with the callback event that returned
- /// this CorEventArgs object. If here is no such thread, Thread is null.
- /// </summary>
- public CorThread Thread
- {
- get
- {
- return m_thread;
- }
- protected set
- {
- m_thread = value;
- }
- }
-
- }
-
-
- /**
- * This class is used for all events that only have access to the
- * CorProcess that is generating the event.
- */
- public class CorProcessEventArgs : CorEventArgs
- {
- public CorProcessEventArgs(CorProcess process)
- : base(process)
- {
- }
-
- public CorProcessEventArgs(CorProcess process, ManagedCallbackType callbackType)
- : base(process, callbackType)
- {
- }
-
- /** The process that generated the event. */
- public CorProcess Process
- {
- get
- {
- return (CorProcess)Controller;
- }
- }
-
- public override string ToString()
- {
- switch (CallbackType)
- {
- case ManagedCallbackType.OnCreateProcess:
- return "Process Created";
- case ManagedCallbackType.OnProcessExit:
- return "Process Exited";
- case ManagedCallbackType.OnControlCTrap:
- break;
- }
- return base.ToString();
- }
- }
-
-
- /**
- * The event arguments for events that contain both a CorProcess
- * and an CorAppDomain.
- */
- public class CorAppDomainEventArgs : CorProcessEventArgs
- {
- private CorAppDomain m_ad;
-
- public CorAppDomainEventArgs(CorProcess process, CorAppDomain ad)
- : base(process)
- {
- m_ad = ad;
- }
-
- public CorAppDomainEventArgs(CorProcess process, CorAppDomain ad,
- ManagedCallbackType callbackType)
- : base(process, callbackType)
- {
- m_ad = ad;
- }
-
- /** The AppDomain that generated the event. */
- public CorAppDomain AppDomain
- {
- get
- {
- return m_ad;
- }
- }
-
- public override string ToString()
- {
- switch (CallbackType)
- {
- case ManagedCallbackType.OnCreateAppDomain:
- return "AppDomain Created: " + m_ad.Name;
- case ManagedCallbackType.OnAppDomainExit:
- return "AppDomain Exited: " + m_ad.Name;
- }
- return base.ToString();
- }
- }
-
-
- /**
- * The base class for events which take an CorAppDomain as their
- * source, but not a CorProcess.
- */
- public class CorAppDomainBaseEventArgs : CorEventArgs
- {
- public CorAppDomainBaseEventArgs(CorAppDomain ad)
- : base(ad)
- {
- }
-
- public CorAppDomainBaseEventArgs(CorAppDomain ad, ManagedCallbackType callbackType)
- : base(ad, callbackType)
- {
- }
-
- public CorAppDomain AppDomain
- {
- get
- {
- return (CorAppDomain)Controller;
- }
- }
- }
-
-
- /**
- * Arguments for events dealing with threads.
- */
- public class CorThreadEventArgs : CorAppDomainBaseEventArgs
- {
- public CorThreadEventArgs(CorAppDomain appDomain, CorThread thread)
- : base(appDomain != null ? appDomain : thread.AppDomain)
- {
- Thread = thread;
- }
-
- public CorThreadEventArgs(CorAppDomain appDomain, CorThread thread,
- ManagedCallbackType callbackType)
- : base(appDomain != null ? appDomain : thread.AppDomain, callbackType)
- {
- Thread = thread;
- }
-
- public override string ToString()
- {
- switch (CallbackType)
- {
- case ManagedCallbackType.OnBreak:
- return "Break";
- case ManagedCallbackType.OnCreateThread:
- return "Thread Created";
- case ManagedCallbackType.OnThreadExit:
- return "Thread Exited";
- case ManagedCallbackType.OnNameChange:
- return "Name Changed";
- }
- return base.ToString();
- }
- }
-
-
- /**
- * Arguments for events involving breakpoints.
- */
- public class CorBreakpointEventArgs : CorThreadEventArgs
- {
- private CorBreakpoint m_break;
-
- public CorBreakpointEventArgs(CorAppDomain appDomain,
- CorThread thread,
- CorBreakpoint managedBreakpoint)
- : base(appDomain, thread)
- {
- m_break = managedBreakpoint;
- }
-
- public CorBreakpointEventArgs(CorAppDomain appDomain,
- CorThread thread,
- CorBreakpoint managedBreakpoint,
- ManagedCallbackType callbackType)
- : base(appDomain, thread, callbackType)
- {
- m_break = managedBreakpoint;
- }
-
- /** The breakpoint involved. */
- public CorBreakpoint Breakpoint
- {
- get
- {
- return m_break;
- }
- }
-
- public override string ToString()
- {
- if (CallbackType == ManagedCallbackType.OnBreakpoint)
- {
- return "Breakpoint Hit";
- }
- return base.ToString();
- }
- }
-
-
- /**
- * Arguments for when a Step operation has completed.
- */
- public class CorStepCompleteEventArgs : CorThreadEventArgs
- {
- private CorStepper m_stepper;
- private CorDebugStepReason m_stepReason;
-
- [CLSCompliant(false)]
- public CorStepCompleteEventArgs(CorAppDomain appDomain, CorThread thread,
- CorStepper stepper, CorDebugStepReason stepReason)
- : base(appDomain, thread)
- {
- m_stepper = stepper;
- m_stepReason = stepReason;
- }
-
- [CLSCompliant(false)]
- public CorStepCompleteEventArgs(CorAppDomain appDomain, CorThread thread,
- CorStepper stepper, CorDebugStepReason stepReason,
- ManagedCallbackType callbackType)
- : base(appDomain, thread, callbackType)
- {
- m_stepper = stepper;
- m_stepReason = stepReason;
- }
-
- public CorStepper Stepper
- {
- get
- {
- return m_stepper;
- }
- }
-
- [CLSCompliant(false)]
- public CorDebugStepReason StepReason
- {
- get
- {
- return m_stepReason;
- }
- }
-
- public override string ToString()
- {
- if (CallbackType == ManagedCallbackType.OnStepComplete)
- {
- return "Step Complete";
- }
- return base.ToString();
- }
- }
-
-
- /**
- * For events dealing with exceptions.
- */
- public class CorExceptionEventArgs : CorThreadEventArgs
- {
- bool m_unhandled;
-
- public CorExceptionEventArgs(CorAppDomain appDomain,
- CorThread thread,
- bool unhandled)
- : base(appDomain, thread)
- {
- m_unhandled = unhandled;
- }
-
- public CorExceptionEventArgs(CorAppDomain appDomain,
- CorThread thread,
- bool unhandled,
- ManagedCallbackType callbackType)
- : base(appDomain, thread, callbackType)
- {
- m_unhandled = unhandled;
- }
-
- /** Has the exception been handled yet? */
- public bool Unhandled
- {
- get
- {
- return m_unhandled;
- }
- }
- }
-
-
- /**
- * For events dealing the evaluation of something...
- */
- public class CorEvalEventArgs : CorThreadEventArgs
- {
- CorEval m_eval;
-
- public CorEvalEventArgs(CorAppDomain appDomain, CorThread thread,
- CorEval eval)
- : base(appDomain, thread)
- {
- m_eval = eval;
- }
-
- public CorEvalEventArgs(CorAppDomain appDomain, CorThread thread,
- CorEval eval, ManagedCallbackType callbackType)
- : base(appDomain, thread, callbackType)
- {
- m_eval = eval;
- }
-
- /** The object being evaluated. */
- public CorEval Eval
- {
- get
- {
- return m_eval;
- }
- }
-
- public override string ToString()
- {
- switch (CallbackType)
- {
- case ManagedCallbackType.OnEvalComplete:
- return "Eval Complete";
- case ManagedCallbackType.OnEvalException:
- return "Eval Exception";
- }
- return base.ToString();
- }
- }
-
-
- /**
- * For events dealing with module loading/unloading.
- */
- public class CorModuleEventArgs : CorAppDomainBaseEventArgs
- {
- CorModule m_managedModule;
-
- public CorModuleEventArgs(CorAppDomain appDomain, CorModule managedModule)
- : base(appDomain)
- {
- m_managedModule = managedModule;
- }
-
- public CorModuleEventArgs(CorAppDomain appDomain, CorModule managedModule,
- ManagedCallbackType callbackType)
- : base(appDomain, callbackType)
- {
- m_managedModule = managedModule;
- }
-
- public CorModule Module
- {
- get
- {
- return m_managedModule;
- }
- }
-
- public override string ToString()
- {
- switch (CallbackType)
- {
- case ManagedCallbackType.OnModuleLoad:
- return "Module loaded: " + m_managedModule.Name;
- case ManagedCallbackType.OnModuleUnload:
- return "Module unloaded: " + m_managedModule.Name;
- }
- return base.ToString();
- }
- }
-
-
- /**
- * For events dealing with class loading/unloading.
- */
- public class CorClassEventArgs : CorAppDomainBaseEventArgs
- {
- CorClass m_class;
-
- public CorClassEventArgs(CorAppDomain appDomain, CorClass managedClass)
- : base(appDomain)
- {
- m_class = managedClass;
- }
-
- public CorClassEventArgs(CorAppDomain appDomain, CorClass managedClass,
- ManagedCallbackType callbackType)
- : base(appDomain, callbackType)
- {
- m_class = managedClass;
- }
-
- public CorClass Class
- {
- get
- {
- return m_class;
- }
- }
-
- public override string ToString()
- {
- switch (CallbackType)
- {
- case ManagedCallbackType.OnClassLoad:
- return "Class loaded: " + m_class;
- case ManagedCallbackType.OnClassUnload:
- return "Class unloaded: " + m_class;
- }
- return base.ToString();
- }
- }
-
-
- /**
- * For events dealing with debugger errors.
- */
- public class CorDebuggerErrorEventArgs : CorProcessEventArgs
- {
- int m_hresult;
- int m_errorCode;
-
- public CorDebuggerErrorEventArgs(CorProcess process, int hresult,
- int errorCode)
- : base(process)
- {
- m_hresult = hresult;
- m_errorCode = errorCode;
- }
-
- public CorDebuggerErrorEventArgs(CorProcess process, int hresult,
- int errorCode, ManagedCallbackType callbackType)
- : base(process, callbackType)
- {
- m_hresult = hresult;
- m_errorCode = errorCode;
- }
-
- public int HResult
- {
- get
- {
- return m_hresult;
- }
- }
-
- public int ErrorCode
- {
- get
- {
- return m_errorCode;
- }
- }
-
- public override string ToString()
- {
- if (CallbackType == ManagedCallbackType.OnDebuggerError)
- {
- return "Debugger Error";
- }
- return base.ToString();
- }
- }
-
-
- /**
- * For events dealing with Assemblies.
- */
- public class CorAssemblyEventArgs : CorAppDomainBaseEventArgs
- {
- private CorAssembly m_assembly;
- public CorAssemblyEventArgs(CorAppDomain appDomain,
- CorAssembly assembly)
- : base(appDomain)
- {
- m_assembly = assembly;
- }
-
- public CorAssemblyEventArgs(CorAppDomain appDomain,
- CorAssembly assembly, ManagedCallbackType callbackType)
- : base(appDomain, callbackType)
- {
- m_assembly = assembly;
- }
-
- /** The Assembly of interest. */
- public CorAssembly Assembly
- {
- get
- {
- return m_assembly;
- }
- }
-
- public override string ToString()
- {
- switch (CallbackType)
- {
- case ManagedCallbackType.OnAssemblyLoad:
- return "Assembly loaded: " + m_assembly.Name;
- case ManagedCallbackType.OnAssemblyUnload:
- return "Assembly unloaded: " + m_assembly.Name;
- }
- return base.ToString();
- }
- }
-
-
- /**
- * For events dealing with logged messages.
- */
- public class CorLogMessageEventArgs : CorThreadEventArgs
- {
- int m_level;
- string m_logSwitchName;
- string m_message;
-
- public CorLogMessageEventArgs(CorAppDomain appDomain, CorThread thread,
- int level, string logSwitchName, string message)
- : base(appDomain, thread)
- {
- m_level = level;
- m_logSwitchName = logSwitchName;
- m_message = message;
- }
-
- public CorLogMessageEventArgs(CorAppDomain appDomain, CorThread thread,
- int level, string logSwitchName, string message,
- ManagedCallbackType callbackType)
- : base(appDomain, thread, callbackType)
- {
- m_level = level;
- m_logSwitchName = logSwitchName;
- m_message = message;
- }
-
- public int Level
- {
- get
- {
- return m_level;
- }
- }
-
- public string LogSwitchName
- {
- get
- {
- return m_logSwitchName;
- }
- }
-
- public string Message
- {
- get
- {
- return m_message;
- }
- }
-
- public override string ToString()
- {
- if (CallbackType == ManagedCallbackType.OnLogMessage)
- {
- return "Log message(" + m_logSwitchName + ")";
- }
- return base.ToString();
- }
- }
-
-
- /**
- * For events dealing with logged messages.
- */
- public class CorLogSwitchEventArgs : CorThreadEventArgs
- {
- int m_level;
-
- int m_reason;
-
- string m_logSwitchName;
-
- string m_parentName;
-
- public CorLogSwitchEventArgs(CorAppDomain appDomain, CorThread thread,
- int level, int reason, string logSwitchName, string parentName)
- : base(appDomain, thread)
- {
- m_level = level;
- m_reason = reason;
- m_logSwitchName = logSwitchName;
- m_parentName = parentName;
- }
-
- public CorLogSwitchEventArgs(CorAppDomain appDomain, CorThread thread,
- int level, int reason, string logSwitchName, string parentName,
- ManagedCallbackType callbackType)
- : base(appDomain, thread, callbackType)
- {
- m_level = level;
- m_reason = reason;
- m_logSwitchName = logSwitchName;
- m_parentName = parentName;
- }
-
- public int Level
- {
- get
- {
- return m_level;
- }
- }
-
- public int Reason
- {
- get
- {
- return m_reason;
- }
- }
-
- public string LogSwitchName
- {
- get
- {
- return m_logSwitchName;
- }
- }
-
- public string ParentName
- {
- get
- {
- return m_parentName;
- }
- }
-
- public override string ToString()
- {
- if (CallbackType == ManagedCallbackType.OnLogSwitch)
- {
- return "Log Switch" + "\n" +
- "Level: " + m_level + "\n" +
- "Log Switch Name: " + m_logSwitchName;
- }
- return base.ToString();
- }
- }
-
-
- /**
- * For events dealing with MDA messages.
- */
- public class CorMDAEventArgs : CorProcessEventArgs
- {
- // Thread may be null.
- public CorMDAEventArgs(CorMDA mda, CorThread thread, CorProcess proc)
- : base(proc)
- {
- m_mda = mda;
- Thread = thread;
- //m_proc = proc;
- }
-
- public CorMDAEventArgs(CorMDA mda, CorThread thread, CorProcess proc,
- ManagedCallbackType callbackType)
- : base(proc, callbackType)
- {
- m_mda = mda;
- Thread = thread;
- //m_proc = proc;
- }
-
- CorMDA m_mda;
- public CorMDA MDA { get { return m_mda; } }
-
- public override string ToString()
- {
- if (CallbackType == ManagedCallbackType.OnMDANotification)
- {
- return "MDANotification" + "\n" +
- "Name=" + m_mda.Name + "\n" +
- "XML=" + m_mda.XML;
- }
- return base.ToString();
- }
-
- //CorProcess m_proc;
- //CorProcess Process { get { return m_proc; } }
- }
-
-
- /**
- * For events dealing module symbol updates.
- */
- public class CorUpdateModuleSymbolsEventArgs : CorModuleEventArgs
- {
- IStream m_stream;
-
- [CLSCompliant(false)]
- public CorUpdateModuleSymbolsEventArgs(CorAppDomain appDomain,
- CorModule managedModule,
- IStream stream)
- : base(appDomain, managedModule)
- {
- m_stream = stream;
- }
-
- [CLSCompliant(false)]
- public CorUpdateModuleSymbolsEventArgs(CorAppDomain appDomain,
- CorModule managedModule,
- IStream stream,
- ManagedCallbackType callbackType)
- : base(appDomain, managedModule, callbackType)
- {
- m_stream = stream;
- }
-
- [CLSCompliant(false)]
- public IStream Stream
- {
- get
- {
- return m_stream;
- }
- }
-
- public override string ToString()
- {
- if (CallbackType == ManagedCallbackType.OnUpdateModuleSymbols)
- {
- return "Module Symbols Updated";
- }
- return base.ToString();
- }
- }
-
- public sealed class CorExceptionInCallbackEventArgs : CorEventArgs
- {
- public CorExceptionInCallbackEventArgs(CorController controller, Exception exceptionThrown)
- : base(controller)
- {
- m_exceptionThrown = exceptionThrown;
- }
-
- public CorExceptionInCallbackEventArgs(CorController controller, Exception exceptionThrown,
- ManagedCallbackType callbackType)
- : base(controller, callbackType)
- {
- m_exceptionThrown = exceptionThrown;
- }
-
- public Exception ExceptionThrown
- {
- get
- {
- return m_exceptionThrown;
- }
- }
-
- public override string ToString()
- {
- if (CallbackType == ManagedCallbackType.OnExceptionInCallback)
- {
- return "Callback Exception: " + m_exceptionThrown.Message;
- }
- return base.ToString();
- }
-
- private Exception m_exceptionThrown;
- }
-
-
- /**
- * Edit and Continue callbacks
- */
- public class CorEditAndContinueRemapEventArgs : CorThreadEventArgs
- {
- public CorEditAndContinueRemapEventArgs(CorAppDomain appDomain,
- CorThread thread,
- CorFunction managedFunction,
- int accurate)
- : base(appDomain, thread)
- {
- m_managedFunction = managedFunction;
- m_accurate = accurate;
- }
-
- public CorEditAndContinueRemapEventArgs(CorAppDomain appDomain,
- CorThread thread,
- CorFunction managedFunction,
- int accurate,
- ManagedCallbackType callbackType)
- : base(appDomain, thread, callbackType)
- {
- m_managedFunction = managedFunction;
- m_accurate = accurate;
- }
-
- public CorFunction Function
- {
- get
- {
- return m_managedFunction;
- }
- }
-
- public bool IsAccurate
- {
- get
- {
- return m_accurate != 0;
- }
- }
-
- private CorFunction m_managedFunction;
- private int m_accurate;
- }
-
-
- public class CorBreakpointSetErrorEventArgs : CorThreadEventArgs
- {
- public CorBreakpointSetErrorEventArgs(CorAppDomain appDomain,
- CorThread thread,
- CorBreakpoint breakpoint,
- int errorCode)
- : base(appDomain, thread)
- {
- m_breakpoint = breakpoint;
- m_errorCode = errorCode;
- }
-
- public CorBreakpointSetErrorEventArgs(CorAppDomain appDomain,
- CorThread thread,
- CorBreakpoint breakpoint,
- int errorCode,
- ManagedCallbackType callbackType)
- : base(appDomain, thread, callbackType)
- {
- m_breakpoint = breakpoint;
- m_errorCode = errorCode;
- }
-
- public CorBreakpoint Breakpoint
- {
- get
- {
- return m_breakpoint;
- }
- }
-
- public int ErrorCode
- {
- get
- {
- return m_errorCode;
- }
- }
-
- public override string ToString()
- {
- if (CallbackType == ManagedCallbackType.OnBreakpointSetError)
- {
- return "Error Setting Breakpoint";
- }
- return base.ToString();
- }
-
- private CorBreakpoint m_breakpoint;
- private int m_errorCode;
- }
-
-
- public sealed class CorFunctionRemapOpportunityEventArgs : CorThreadEventArgs
- {
- public CorFunctionRemapOpportunityEventArgs(CorAppDomain appDomain,
- CorThread thread,
- CorFunction oldFunction,
- CorFunction newFunction,
- int oldILoffset
- )
- : base(appDomain, thread)
- {
- m_oldFunction = oldFunction;
- m_newFunction = newFunction;
- m_oldILoffset = oldILoffset;
- }
-
- public CorFunctionRemapOpportunityEventArgs(CorAppDomain appDomain,
- CorThread thread,
- CorFunction oldFunction,
- CorFunction newFunction,
- int oldILoffset,
- ManagedCallbackType callbackType
- )
- : base(appDomain, thread, callbackType)
- {
- m_oldFunction = oldFunction;
- m_newFunction = newFunction;
- m_oldILoffset = oldILoffset;
- }
-
- public CorFunction OldFunction
- {
- get
- {
- return m_oldFunction;
- }
- }
-
- public CorFunction NewFunction
- {
- get
- {
- return m_newFunction;
- }
- }
-
- public int OldILOffset
- {
- get
- {
- return m_oldILoffset;
- }
- }
-
- public override string ToString()
- {
- if (CallbackType == ManagedCallbackType.OnFunctionRemapOpportunity)
- {
- return "Function Remap Opportunity";
- }
- return base.ToString();
- }
-
- private CorFunction m_oldFunction, m_newFunction;
- private int m_oldILoffset;
- }
-
- public sealed class CorFunctionRemapCompleteEventArgs : CorThreadEventArgs
- {
- public CorFunctionRemapCompleteEventArgs(CorAppDomain appDomain,
- CorThread thread,
- CorFunction managedFunction
- )
- : base(appDomain, thread)
- {
- m_managedFunction = managedFunction;
- }
-
- public CorFunctionRemapCompleteEventArgs(CorAppDomain appDomain,
- CorThread thread,
- CorFunction managedFunction,
- ManagedCallbackType callbackType
- )
- : base(appDomain, thread, callbackType)
- {
- m_managedFunction = managedFunction;
- }
-
- public CorFunction Function
- {
- get
- {
- return m_managedFunction;
- }
- }
-
- private CorFunction m_managedFunction;
- }
-
-
- public class CorExceptionUnwind2EventArgs : CorThreadEventArgs
- {
-
- [CLSCompliant(false)]
- public CorExceptionUnwind2EventArgs(CorAppDomain appDomain, CorThread thread,
- CorDebugExceptionUnwindCallbackType eventType,
- int flags)
- : base(appDomain, thread)
- {
- m_eventType = eventType;
- m_flags = flags;
- }
-
- [CLSCompliant(false)]
- public CorExceptionUnwind2EventArgs(CorAppDomain appDomain, CorThread thread,
- CorDebugExceptionUnwindCallbackType eventType,
- int flags,
- ManagedCallbackType callbackType)
- : base(appDomain, thread, callbackType)
- {
- m_eventType = eventType;
- m_flags = flags;
- }
-
- [CLSCompliant(false)]
- public CorDebugExceptionUnwindCallbackType EventType
- {
- get
- {
- return m_eventType;
- }
- }
-
- public int Flags
- {
- get
- {
- return m_flags;
- }
- }
-
- public override string ToString()
- {
- if (CallbackType == ManagedCallbackType.OnExceptionUnwind2)
- {
- return "Exception unwind\n" +
- "EventType: " + m_eventType;
- }
- return base.ToString();
- }
-
- CorDebugExceptionUnwindCallbackType m_eventType;
- int m_flags;
- }
-
-
- public class CorException2EventArgs : CorThreadEventArgs
- {
-
- [CLSCompliant(false)]
- public CorException2EventArgs(CorAppDomain appDomain,
- CorThread thread,
- CorFrame frame,
- int offset,
- CorDebugExceptionCallbackType eventType,
- int flags)
- : base(appDomain, thread)
- {
- m_frame = frame;
- m_offset = offset;
- m_eventType = eventType;
- m_flags = flags;
- }
-
- [CLSCompliant(false)]
- public CorException2EventArgs(CorAppDomain appDomain,
- CorThread thread,
- CorFrame frame,
- int offset,
- CorDebugExceptionCallbackType eventType,
- int flags,
- ManagedCallbackType callbackType)
- : base(appDomain, thread, callbackType)
- {
- m_frame = frame;
- m_offset = offset;
- m_eventType = eventType;
- m_flags = flags;
- }
-
- public CorFrame Frame
- {
- get
- {
- return m_frame;
- }
- }
-
- public int Offset
- {
- get
- {
- return m_offset;
- }
- }
-
- [CLSCompliant(false)]
- public CorDebugExceptionCallbackType EventType
- {
- get
- {
- return m_eventType;
- }
- }
-
- public int Flags
- {
- get
- {
- return m_flags;
- }
- }
-
- public override string ToString()
- {
- if (CallbackType == ManagedCallbackType.OnException2)
- {
- return "Exception Thrown";
- }
- return base.ToString();
- }
-
- CorFrame m_frame;
- int m_offset;
- CorDebugExceptionCallbackType m_eventType;
- int m_flags;
- }
-
-
- public enum ManagedCallbackType
- {
- OnBreakpoint,
- OnStepComplete,
- OnBreak,
- OnException,
- OnEvalComplete,
- OnEvalException,
- OnCreateProcess,
- OnProcessExit,
- OnCreateThread,
- OnThreadExit,
- OnModuleLoad,
- OnModuleUnload,
- OnClassLoad,
- OnClassUnload,
- OnDebuggerError,
- OnLogMessage,
- OnLogSwitch,
- OnCreateAppDomain,
- OnAppDomainExit,
- OnAssemblyLoad,
- OnAssemblyUnload,
- OnControlCTrap,
- OnNameChange,
- OnUpdateModuleSymbols,
- OnFunctionRemapOpportunity,
- OnFunctionRemapComplete,
- OnBreakpointSetError,
- OnException2,
- OnExceptionUnwind2,
- OnMDANotification,
- OnExceptionInCallback,
- }
-
- // Helper class to convert from COM-classic callback interface into managed args.
- // Derived classes can overide the HandleEvent method to define the handling.
- abstract public class ManagedCallbackBase : ICorDebugManagedCallback, ICorDebugManagedCallback2
- {
- // Derived class overrides this methdos
- protected abstract void HandleEvent(ManagedCallbackType eventId, CorEventArgs args);
-
- void ICorDebugManagedCallback.Breakpoint(ICorDebugAppDomain appDomain,
- ICorDebugThread thread,
- ICorDebugBreakpoint breakpoint)
- {
- HandleEvent(ManagedCallbackType.OnBreakpoint,
- new CorBreakpointEventArgs(appDomain == null ? null : new CorAppDomain(appDomain),
- thread == null ? null : new CorThread(thread),
- breakpoint == null ? null : new CorFunctionBreakpoint((ICorDebugFunctionBreakpoint)breakpoint),
- ManagedCallbackType.OnBreakpoint
- ));
- }
-
- void ICorDebugManagedCallback.StepComplete(ICorDebugAppDomain appDomain,
- ICorDebugThread thread,
- ICorDebugStepper stepper,
- CorDebugStepReason stepReason)
- {
- HandleEvent(ManagedCallbackType.OnStepComplete,
- new CorStepCompleteEventArgs(appDomain == null ? null : new CorAppDomain(appDomain),
- thread == null ? null : new CorThread(thread),
- stepper == null ? null : new CorStepper(stepper),
- stepReason,
- ManagedCallbackType.OnStepComplete));
- }
-
- void ICorDebugManagedCallback.Break(
- ICorDebugAppDomain appDomain,
- ICorDebugThread thread)
- {
- HandleEvent(ManagedCallbackType.OnBreak,
- new CorThreadEventArgs(appDomain == null ? null : new CorAppDomain(appDomain),
- thread == null ? null : new CorThread(thread),
- ManagedCallbackType.OnBreak));
- }
-
- void ICorDebugManagedCallback.Exception(
- ICorDebugAppDomain appDomain,
- ICorDebugThread thread,
- int unhandled)
- {
- HandleEvent(ManagedCallbackType.OnException,
- new CorExceptionEventArgs(appDomain == null ? null : new CorAppDomain(appDomain),
- thread == null ? null : new CorThread(thread),
- !(unhandled == 0),
- ManagedCallbackType.OnException));
- }
- /* pass false if ``unhandled'' is 0 -- mapping TRUE to true, etc. */
-
- void ICorDebugManagedCallback.EvalComplete(
- ICorDebugAppDomain appDomain,
- ICorDebugThread thread,
- ICorDebugEval eval)
- {
- HandleEvent(ManagedCallbackType.OnEvalComplete,
- new CorEvalEventArgs( appDomain == null ? null : new CorAppDomain(appDomain),
- thread == null ? null : new CorThread(thread),
- eval == null ? null : new CorEval(eval),
- ManagedCallbackType.OnEvalComplete));
- }
-
- void ICorDebugManagedCallback.EvalException(
- ICorDebugAppDomain appDomain,
- ICorDebugThread thread,
- ICorDebugEval eval)
- {
- HandleEvent(ManagedCallbackType.OnEvalException,
- new CorEvalEventArgs( appDomain == null ? null : new CorAppDomain(appDomain),
- thread == null ? null : new CorThread(thread),
- eval == null ? null : new CorEval(eval),
- ManagedCallbackType.OnEvalException));
- }
-
- void ICorDebugManagedCallback.CreateProcess(
- ICorDebugProcess process)
- {
- HandleEvent(ManagedCallbackType.OnCreateProcess,
- new CorProcessEventArgs( process == null ? null : CorProcess.GetCorProcess(process),
- ManagedCallbackType.OnCreateProcess));
- }
-
- void ICorDebugManagedCallback.ExitProcess(
- ICorDebugProcess process)
- {
- HandleEvent(ManagedCallbackType.OnProcessExit,
- new CorProcessEventArgs(process == null ? null : CorProcess.GetCorProcess(process),
- ManagedCallbackType.OnProcessExit) { Continue = false });
- }
-
- void ICorDebugManagedCallback.CreateThread(
- ICorDebugAppDomain appDomain,
- ICorDebugThread thread)
- {
- HandleEvent(ManagedCallbackType.OnCreateThread,
- new CorThreadEventArgs( appDomain == null ? null : new CorAppDomain(appDomain),
- thread == null ? null : new CorThread(thread),
- ManagedCallbackType.OnCreateThread));
- }
-
- void ICorDebugManagedCallback.ExitThread(
- ICorDebugAppDomain appDomain,
- ICorDebugThread thread)
- {
- HandleEvent(ManagedCallbackType.OnThreadExit,
- new CorThreadEventArgs( appDomain == null ? null : new CorAppDomain(appDomain),
- thread == null ? null : new CorThread(thread),
- ManagedCallbackType.OnThreadExit));
- }
-
- void ICorDebugManagedCallback.LoadModule(
- ICorDebugAppDomain appDomain,
- ICorDebugModule managedModule)
- {
- HandleEvent(ManagedCallbackType.OnModuleLoad,
- new CorModuleEventArgs( appDomain == null ? null : new CorAppDomain(appDomain),
- managedModule == null ? null : new CorModule(managedModule),
- ManagedCallbackType.OnModuleLoad));
- }
-
- void ICorDebugManagedCallback.UnloadModule(
- ICorDebugAppDomain appDomain,
- ICorDebugModule managedModule)
- {
- HandleEvent(ManagedCallbackType.OnModuleUnload,
- new CorModuleEventArgs( appDomain == null ? null : new CorAppDomain(appDomain),
- managedModule == null ? null : new CorModule(managedModule),
- ManagedCallbackType.OnModuleUnload));
- }
-
- void ICorDebugManagedCallback.LoadClass(
- ICorDebugAppDomain appDomain,
- ICorDebugClass c)
- {
- HandleEvent(ManagedCallbackType.OnClassLoad,
- new CorClassEventArgs(appDomain == null ? null : new CorAppDomain(appDomain),
- c == null ? null : new CorClass(c),
- ManagedCallbackType.OnClassLoad));
- }
-
- void ICorDebugManagedCallback.UnloadClass(
- ICorDebugAppDomain appDomain,
- ICorDebugClass c)
- {
- HandleEvent(ManagedCallbackType.OnClassUnload,
- new CorClassEventArgs( appDomain == null ? null : new CorAppDomain(appDomain),
- c == null ? null : new CorClass(c),
- ManagedCallbackType.OnClassUnload));
- }
-
- void ICorDebugManagedCallback.DebuggerError(
- ICorDebugProcess process,
- int errorHR,
- uint errorCode)
- {
- HandleEvent(ManagedCallbackType.OnDebuggerError,
- new CorDebuggerErrorEventArgs( process == null ? null : CorProcess.GetCorProcess(process),
- errorHR,
- (int)errorCode,
- ManagedCallbackType.OnDebuggerError));
- }
-
- void ICorDebugManagedCallback.LogMessage(
- ICorDebugAppDomain appDomain,
- ICorDebugThread thread,
- int level,
- string logSwitchName,
- string message)
- {
- HandleEvent(ManagedCallbackType.OnLogMessage,
- new CorLogMessageEventArgs(appDomain == null ? null : new CorAppDomain(appDomain),
- thread == null ? null : new CorThread(thread),
- level, logSwitchName, message,
- ManagedCallbackType.OnLogMessage));
- }
-
- void ICorDebugManagedCallback.LogSwitch(
- ICorDebugAppDomain appDomain,
- ICorDebugThread thread,
- int level,
- uint reason,
- string logSwitchName,
- string parentName)
- {
- HandleEvent(ManagedCallbackType.OnLogSwitch,
- new CorLogSwitchEventArgs( appDomain == null ? null : new CorAppDomain(appDomain),
- thread == null ? null : new CorThread(thread),
- level, (int)reason, logSwitchName, parentName,
- ManagedCallbackType.OnLogSwitch));
- }
-
- void ICorDebugManagedCallback.CreateAppDomain(
- ICorDebugProcess process,
- ICorDebugAppDomain appDomain)
- {
- HandleEvent(ManagedCallbackType.OnCreateAppDomain,
- new CorAppDomainEventArgs( process == null ? null : CorProcess.GetCorProcess(process),
- appDomain == null ? null : new CorAppDomain(appDomain),
- ManagedCallbackType.OnCreateAppDomain));
- }
-
- void ICorDebugManagedCallback.ExitAppDomain(
- ICorDebugProcess process,
- ICorDebugAppDomain appDomain)
- {
- HandleEvent(ManagedCallbackType.OnAppDomainExit,
- new CorAppDomainEventArgs( process == null ? null : CorProcess.GetCorProcess(process),
- appDomain == null ? null : new CorAppDomain(appDomain),
- ManagedCallbackType.OnAppDomainExit));
- }
-
- void ICorDebugManagedCallback.LoadAssembly(
- ICorDebugAppDomain appDomain,
- ICorDebugAssembly assembly)
- {
- HandleEvent(ManagedCallbackType.OnAssemblyLoad,
- new CorAssemblyEventArgs( appDomain == null ? null : new CorAppDomain(appDomain),
- assembly == null ? null : new CorAssembly(assembly),
- ManagedCallbackType.OnAssemblyLoad));
- }
-
- void ICorDebugManagedCallback.UnloadAssembly(
- ICorDebugAppDomain appDomain,
- ICorDebugAssembly assembly)
- {
- HandleEvent(ManagedCallbackType.OnAssemblyUnload,
- new CorAssemblyEventArgs( appDomain == null ? null : new CorAppDomain(appDomain),
- assembly == null ? null : new CorAssembly(assembly),
- ManagedCallbackType.OnAssemblyUnload));
- }
-
- void ICorDebugManagedCallback.ControlCTrap(ICorDebugProcess process)
- {
- HandleEvent(ManagedCallbackType.OnControlCTrap,
- new CorProcessEventArgs( process == null ? null : CorProcess.GetCorProcess(process),
- ManagedCallbackType.OnControlCTrap));
- }
-
- void ICorDebugManagedCallback.NameChange(
- ICorDebugAppDomain appDomain,
- ICorDebugThread thread)
- {
- HandleEvent(ManagedCallbackType.OnNameChange,
- new CorThreadEventArgs( appDomain == null ? null : new CorAppDomain(appDomain),
- thread == null ? null : new CorThread(thread),
- ManagedCallbackType.OnNameChange));
- }
-
-
- void ICorDebugManagedCallback.UpdateModuleSymbols(
- ICorDebugAppDomain appDomain,
- ICorDebugModule managedModule,
- IStream stream)
- {
- HandleEvent(ManagedCallbackType.OnUpdateModuleSymbols,
- new CorUpdateModuleSymbolsEventArgs(appDomain == null ? null : new CorAppDomain(appDomain),
- managedModule == null ? null : new CorModule(managedModule),
- stream,
- ManagedCallbackType.OnUpdateModuleSymbols));
- }
-
- void ICorDebugManagedCallback.EditAndContinueRemap(
- ICorDebugAppDomain appDomain,
- ICorDebugThread thread,
- ICorDebugFunction managedFunction,
- int isAccurate)
- {
- Debug.Assert(false); //OBSOLETE callback
- }
-
-
- void ICorDebugManagedCallback.BreakpointSetError(
- ICorDebugAppDomain appDomain,
- ICorDebugThread thread,
- ICorDebugBreakpoint breakpoint,
- UInt32 errorCode)
- {
- HandleEvent(ManagedCallbackType.OnBreakpointSetError,
- new CorBreakpointSetErrorEventArgs(appDomain == null ? null : new CorAppDomain(appDomain),
- thread == null ? null : new CorThread(thread),
- null,
- (int)errorCode,
- ManagedCallbackType.OnBreakpointSetError));
- }
-
- void ICorDebugManagedCallback2.FunctionRemapOpportunity(ICorDebugAppDomain appDomain,
- ICorDebugThread thread,
- ICorDebugFunction oldFunction,
- ICorDebugFunction newFunction,
- uint oldILoffset)
- {
- HandleEvent(ManagedCallbackType.OnFunctionRemapOpportunity,
- new CorFunctionRemapOpportunityEventArgs(appDomain == null ? null : new CorAppDomain(appDomain),
- thread == null ? null : new CorThread(thread),
- oldFunction == null ? null : new CorFunction(oldFunction),
- newFunction == null ? null : new CorFunction(newFunction),
- (int)oldILoffset,
- ManagedCallbackType.OnFunctionRemapOpportunity));
- }
-
- void ICorDebugManagedCallback2.FunctionRemapComplete(ICorDebugAppDomain appDomain,
- ICorDebugThread thread,
- ICorDebugFunction managedFunction)
- {
- HandleEvent(ManagedCallbackType.OnFunctionRemapComplete,
- new CorFunctionRemapCompleteEventArgs(appDomain == null ? null : new CorAppDomain(appDomain),
- thread == null ? null : new CorThread(thread),
- managedFunction == null ? null : new CorFunction(managedFunction),
- ManagedCallbackType.OnFunctionRemapComplete));
- }
-
- void ICorDebugManagedCallback2.CreateConnection(ICorDebugProcess process, uint connectionId, ref ushort connectionName)
- {
- // Not Implemented
- Debug.Assert(false);
- }
-
- void ICorDebugManagedCallback2.ChangeConnection(ICorDebugProcess process, uint connectionId)
- {
- // Not Implemented
- Debug.Assert(false);
- }
-
- void ICorDebugManagedCallback2.DestroyConnection(ICorDebugProcess process, uint connectionId)
- {
- // Not Implemented
- Debug.Assert(false);
- }
-
- void ICorDebugManagedCallback2.Exception(ICorDebugAppDomain ad, ICorDebugThread thread,
- ICorDebugFrame frame, uint offset,
- CorDebugExceptionCallbackType eventType, uint flags)
- {
- HandleEvent(ManagedCallbackType.OnException2,
- new CorException2EventArgs(ad == null ? null : new CorAppDomain(ad),
- thread == null ? null : new CorThread(thread),
- frame == null ? null : new CorFrame(frame),
- (int)offset,
- eventType,
- (int)flags,
- ManagedCallbackType.OnException2));
- }
-
- void ICorDebugManagedCallback2.ExceptionUnwind(ICorDebugAppDomain ad, ICorDebugThread thread,
- CorDebugExceptionUnwindCallbackType eventType, uint flags)
- {
- HandleEvent(ManagedCallbackType.OnExceptionUnwind2,
- new CorExceptionUnwind2EventArgs(ad == null ? null : new CorAppDomain(ad),
- thread == null ? null : new CorThread(thread),
- eventType,
- (int)flags,
- ManagedCallbackType.OnExceptionUnwind2));
- }
-
- // Get process from controller
- static private CorProcess GetProcessFromController(ICorDebugController pController)
- {
- CorProcess p;
- ICorDebugProcess p2 = pController as ICorDebugProcess;
- if (p2 != null)
- {
- p = CorProcess.GetCorProcess(p2);
- }
- else
- {
- ICorDebugAppDomain a2 = (ICorDebugAppDomain)pController;
- p = new CorAppDomain(a2).Process;
- }
- return p;
- }
-
- void ICorDebugManagedCallback2.MDANotification(ICorDebugController pController,
- ICorDebugThread thread,
- ICorDebugMDA pMDA)
- {
- CorMDA c = new CorMDA(pMDA);
- string szName = c.Name;
- CorDebugMDAFlags f = c.Flags;
- CorProcess p = GetProcessFromController(pController);
-
-
- HandleEvent(ManagedCallbackType.OnMDANotification,
- new CorMDAEventArgs(c,
- thread == null ? null : new CorThread(thread),
- p, ManagedCallbackType.OnMDANotification));
- }
-
-
- }
-
-} /* namespace */
diff --git a/main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/debug/ErrorInfoEnumerator.cs b/main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/debug/ErrorInfoEnumerator.cs deleted file mode 100644 index 5f373102c6..0000000000 --- a/main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/debug/ErrorInfoEnumerator.cs +++ /dev/null @@ -1,69 +0,0 @@ -//---------------------------------------------------------------------
-// This file is part of the CLR Managed Debugger (mdbg) Sample.
-//
-// Copyright (C) Microsoft Corporation. All rights reserved.
-//---------------------------------------------------------------------
-using System;
-using System.Collections;
-
-using Microsoft.Samples.Debugging.CorDebug.NativeApi;
-
-namespace Microsoft.Samples.Debugging.CorDebug
-{
- /**
- * Exposes an enumerator for ErrorInfo objects.
- *
- * This is horribly broken at this point, as ErrorInfo isn't implemented yet.
- */
- internal class CorErrorInfoEnumerator : IEnumerable, IEnumerator, ICloneable
- {
- private ICorDebugErrorInfoEnum m_enum;
-
- private Object m_einfo;
-
- internal CorErrorInfoEnumerator (ICorDebugErrorInfoEnum erroInfoEnumerator)
- {
- m_enum = erroInfoEnumerator;
- }
-
- //
- // ICloneable interface
- //
- public Object Clone ()
- {
- ICorDebugEnum clone = null;
- m_enum.Clone (out clone);
- return new CorErrorInfoEnumerator ((ICorDebugErrorInfoEnum)clone);
- }
-
- //
- // IEnumerable interface
- //
- public IEnumerator GetEnumerator ()
- {
- return this;
- }
-
- //
- // IEnumerator interface
- //
- public bool MoveNext ()
- {
- return false;
- }
-
- public void Reset ()
- {
- m_enum.Reset ();
- m_einfo = null;
- }
-
- public Object Current
- {
- get
- {
- return m_einfo;
- }
- }
- } /* class ErrorInfoEnumerator */
-} /* namespace */
diff --git a/main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/debug/Eval.cs b/main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/debug/Eval.cs deleted file mode 100644 index e34f7c73d4..0000000000 --- a/main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/debug/Eval.cs +++ /dev/null @@ -1,197 +0,0 @@ -//---------------------------------------------------------------------
-// This file is part of the CLR Managed Debugger (mdbg) Sample.
-//
-// Copyright (C) Microsoft Corporation. All rights reserved.
-//---------------------------------------------------------------------
-using System;
-using System.Diagnostics;
-
-using Microsoft.Samples.Debugging.CorDebug.NativeApi;
-
-namespace Microsoft.Samples.Debugging.CorDebug
-{
- /**
- * collects functionality which requires runnint code inside the debuggee.
- */
- public sealed class CorEval : WrapperBase
- {
- private ICorDebugEval m_eval;
-
- internal CorEval (ICorDebugEval e)
- :base(e)
- {
- m_eval = e;
- }
-
-
-
- public void CallFunction (CorFunction managedFunction, CorValue[] arguments)
- {
- ICorDebugValue[] values = null;
- if(arguments!=null)
- {
- values = new ICorDebugValue[arguments.Length];
- for(int i=0;i<arguments.Length;i++)
- values[i] = arguments[i].m_val;
- }
- m_eval.CallFunction(managedFunction.m_function,
- (uint) (arguments==null?0:arguments.Length),
- values);
- }
-
- public void CallParameterizedFunction (CorFunction managedFunction, CorType[] argumentTypes, CorValue[] arguments)
- {
- ICorDebugType[] types = null;
- int typesLength = 0;
- ICorDebugValue[] values = null;
- int valuesLength = 0;
-
- ICorDebugEval2 eval2 = (ICorDebugEval2) m_eval;
-
- if (argumentTypes != null)
- {
- types = new ICorDebugType[argumentTypes.Length];
- for (int i = 0; i < argumentTypes.Length; i++)
- types[i] = argumentTypes[i].m_type;
- typesLength = types.Length;
- }
- if (arguments != null)
- {
- values = new ICorDebugValue[arguments.Length];
- for (int i = 0; i < arguments.Length; i++)
- values[i] = arguments[i].m_val;
- valuesLength = values.Length;
- }
- eval2.CallParameterizedFunction(managedFunction.m_function, (uint)typesLength, types, (uint)valuesLength, values);
- }
-
- public CorValue CreateValueForType(CorType type)
- {
- ICorDebugValue val = null;
- ICorDebugEval2 eval2 = (ICorDebugEval2) m_eval;
- eval2.CreateValueForType(type.m_type, out val);
- return val==null?null:new CorValue (val);
- }
-
- public void NewParameterizedObject(CorFunction managedFunction, CorType[] argumentTypes, CorValue[] arguments)
- {
-
- ICorDebugType[] types = null;
- int typesLength = 0;
- ICorDebugValue[] values = null;
- int valuesLength = 0;
- ICorDebugEval2 eval2 = (ICorDebugEval2) m_eval;
-
- if (argumentTypes != null)
- {
- types = new ICorDebugType[argumentTypes.Length];
- for (int i = 0; i < argumentTypes.Length; i++)
- types[i] = argumentTypes[i].m_type;
- typesLength = types.Length;
- }
- if (arguments != null)
- {
- values = new ICorDebugValue[arguments.Length];
- for (int i = 0; i < arguments.Length; i++)
- values[i] = arguments[i].m_val;
- valuesLength = values.Length;
- }
- eval2.NewParameterizedObject(managedFunction.m_function, (uint)typesLength, types, (uint)valuesLength, values);
- }
-
- public void NewParameterizedObjectNoConstructor(CorClass managedClass, CorType[] argumentTypes)
- {
- ICorDebugType[] types = null;
- int typesLength=0;
- ICorDebugEval2 eval2 = (ICorDebugEval2) m_eval;
- if (argumentTypes != null)
- {
- types = new ICorDebugType[argumentTypes.Length];
- for (int i = 0; i < argumentTypes.Length; i++)
- types[i] = argumentTypes[i].m_type;
- typesLength = types.Length;
- }
- eval2.NewParameterizedObjectNoConstructor(managedClass.m_class, (uint)typesLength, types);
- }
-
- public void NewParameterizedArray(CorType type, int rank, int dims, int lowBounds)
- {
- ICorDebugEval2 eval2 = (ICorDebugEval2) m_eval;
- uint udims = (uint)dims;
- uint ulowBounds = (uint)lowBounds;
- eval2.NewParameterizedArray(type.m_type, (uint)rank, ref udims, ref ulowBounds);
- }
-
-
- /** Create an object w/o invoking its constructor. */
- public void NewObjectNoContstructor (CorClass c)
- {
- m_eval.NewObjectNoConstructor (c.m_class);
- }
-
- /** allocate a string w/ the given contents. */
- public void NewString (string value)
- {
- m_eval.NewString (value);
- }
-
- public void NewArray (CorElementType type, CorClass managedClass, int rank,
- int dimensions, int lowBounds)
- {
- uint udims = (uint)dimensions;
- uint ulowBounds = (uint)lowBounds;
- m_eval.NewArray (type, managedClass.m_class, (uint)rank, ref udims, ref ulowBounds);
- }
-
- /** Does the Eval have an active computation? */
- public bool IsActive ()
- {
- int r = 0;
- m_eval.IsActive (out r);
- return !(r==0);
- }
-
- /** Abort the current computation. */
- public void Abort ()
- {
- m_eval.Abort ();
- }
-
- /** Rude abort the current computation. */
- public void RudeAbort ()
- {
- ICorDebugEval2 eval2 = (ICorDebugEval2) m_eval;
- eval2.RudeAbort ();
- }
-
- /** Result of the evaluation. Valid only after the eval is complete. */
- public CorValue Result
- {
- get
- {
- ICorDebugValue v = null;
- m_eval.GetResult (out v);
- return (v==null)?null:new CorValue (v);
- }
- }
-
- /** The thread that this eval was created in. */
- public CorThread Thread
- {
- get
- {
- ICorDebugThread t = null;
- m_eval.GetThread (out t);
- return (t==null)?null:new CorThread (t);
- }
- }
-
- /** Create a Value to use it in a Function Evaluation. */
- public CorValue CreateValue (CorElementType type, CorClass managedClass)
- {
- ICorDebugValue v = null;
- m_eval.CreateValue (type, managedClass==null?null:managedClass.m_class, out v);
- return (v==null)?null:new CorValue (v);
- }
- } /* class Eval */
-} /* namespace */
diff --git a/main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/debug/FunctionBreakpoint.cs b/main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/debug/FunctionBreakpoint.cs deleted file mode 100644 index d3771b66b3..0000000000 --- a/main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/debug/FunctionBreakpoint.cs +++ /dev/null @@ -1,41 +0,0 @@ -//---------------------------------------------------------------------
-// This file is part of the CLR Managed Debugger (mdbg) Sample.
-//
-// Copyright (C) Microsoft Corporation. All rights reserved.
-//---------------------------------------------------------------------
-using System;
-
-using Microsoft.Samples.Debugging.CorDebug.NativeApi;
-
-namespace Microsoft.Samples.Debugging.CorDebug
-{
- public sealed class CorFunctionBreakpoint : CorBreakpoint
- {
- private ICorDebugFunctionBreakpoint m_breakpoint;
-
- internal CorFunctionBreakpoint (ICorDebugFunctionBreakpoint breakpoint) : base(breakpoint)
- {
- m_breakpoint = breakpoint;
- }
-
- public CorFunction Function
- {
- get
- {
- ICorDebugFunction f = null;
- m_breakpoint.GetFunction (out f);
- return new CorFunction (f);
- }
- }
-
- public int Offset
- {
- get
- {
- uint off = 0;
- m_breakpoint.GetOffset (out off);
- return (int) off;
- }
- }
- } /* class FunctionBreakpoint */
-} /* namespace */
diff --git a/main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/debug/HResultUtil.cs b/main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/debug/HResultUtil.cs deleted file mode 100644 index 95d342762b..0000000000 --- a/main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/debug/HResultUtil.cs +++ /dev/null @@ -1,16 +0,0 @@ -using System;
-using System.Runtime.InteropServices;
-
-namespace Microsoft.Samples.Debugging.CorDebug
-{
- public static class HResultUtil
- {
- public static THResult? ToHResult<THResult> (this ExternalException ex) where THResult : struct
- {
- if (Enum.IsDefined (typeof(THResult), ex.ErrorCode)) {
- return (THResult?) Enum.ToObject (typeof(THResult), ex.ErrorCode);
- }
- return null;
- }
- }
-}
\ No newline at end of file diff --git a/main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/debug/HResults.cs b/main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/debug/HResults.cs deleted file mode 100644 index 3afbad2dbe..0000000000 --- a/main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/debug/HResults.cs +++ /dev/null @@ -1,2225 +0,0 @@ -//---------------------------------------------------------------------
-// This file is part of the CLR Managed Debugger (mdbg) Sample.
-//
-// Copyright (C) Microsoft Corporation. All rights reserved.
-//---------------------------------------------------------------------
-
-namespace Microsoft.Samples.Debugging.CorDebug
-{
- public enum HResult
- {
- // Imported HRESULTs from WinError.h
- E_UNEXPECTED = unchecked((int)0x8000FFFF),
- E_NOTIMPL = unchecked((int)0x80004001),
- E_OUTOFMEMORY = unchecked((int)0x8007000E),
- E_INVALIDARG = unchecked((int)0x80070057),
- E_NOINTERFACE = unchecked((int)0x80004002),
- E_POINTER = unchecked((int)0x80004003),
- E_HANDLE = unchecked((int)0x80070006),
- E_ABORT = unchecked((int)0x80004004),
- E_FAIL = unchecked((int)0x80004005),
- E_ACCESSDENIED = unchecked((int)0x80070005),
- E_PENDING = unchecked((int)0x8000000A),
- CO_E_INIT_TLS = unchecked((int)0x80004006),
- CO_E_INIT_SHARED_ALLOCATOR = unchecked((int)0x80004007),
- CO_E_INIT_MEMORY_ALLOCATOR = unchecked((int)0x80004008),
- CO_E_INIT_CLASS_CACHE = unchecked((int)0x80004009),
- CO_E_INIT_RPC_CHANNEL = unchecked((int)0x8000400A),
- CO_E_INIT_TLS_SET_CHANNEL_CONTROL = unchecked((int)0x8000400B),
- CO_E_INIT_TLS_CHANNEL_CONTROL = unchecked((int)0x8000400C),
- CO_E_INIT_UNACCEPTED_USER_ALLOCATOR = unchecked((int)0x8000400D),
- CO_E_INIT_SCM_MUTEX_EXISTS = unchecked((int)0x8000400E),
- CO_E_INIT_SCM_FILE_MAPPING_EXISTS = unchecked((int)0x8000400F),
- CO_E_INIT_SCM_MAP_VIEW_OF_FILE = unchecked((int)0x80004010),
- CO_E_INIT_SCM_EXEC_FAILURE = unchecked((int)0x80004011),
- CO_E_INIT_ONLY_SINGLE_THREADED = unchecked((int)0x80004012),
- CO_E_CANT_REMOTE = unchecked((int)0x80004013),
- CO_E_BAD_SERVER_NAME = unchecked((int)0x80004014),
- CO_E_WRONG_SERVER_IDENTITY = unchecked((int)0x80004015),
- CO_E_OLE1DDE_DISABLED = unchecked((int)0x80004016),
- CO_E_RUNAS_SYNTAX = unchecked((int)0x80004017),
- CO_E_CREATEPROCESS_FAILURE = unchecked((int)0x80004018),
- CO_E_RUNAS_CREATEPROCESS_FAILURE = unchecked((int)0x80004019),
- CO_E_RUNAS_LOGON_FAILURE = unchecked((int)0x8000401A),
- CO_E_LAUNCH_PERMSSION_DENIED = unchecked((int)0x8000401B),
- CO_E_START_SERVICE_FAILURE = unchecked((int)0x8000401C),
- CO_E_REMOTE_COMMUNICATION_FAILURE = unchecked((int)0x8000401D),
- CO_E_SERVER_START_TIMEOUT = unchecked((int)0x8000401E),
- CO_E_CLSREG_INCONSISTENT = unchecked((int)0x8000401F),
- CO_E_IIDREG_INCONSISTENT = unchecked((int)0x80004020),
- CO_E_NOT_SUPPORTED = unchecked((int)0x80004021),
- CO_E_RELOAD_DLL = unchecked((int)0x80004022),
- CO_E_MSI_ERROR = unchecked((int)0x80004023),
- CO_E_ATTEMPT_TO_CREATE_OUTSIDE_CLIENT_CONTEXT = unchecked((int)0x80004024),
- CO_E_SERVER_PAUSED = unchecked((int)0x80004025),
- CO_E_SERVER_NOT_PAUSED = unchecked((int)0x80004026),
- CO_E_CLASS_DISABLED = unchecked((int)0x80004027),
- CO_E_CLRNOTAVAILABLE = unchecked((int)0x80004028),
- CO_E_ASYNC_WORK_REJECTED = unchecked((int)0x80004029),
- CO_E_SERVER_INIT_TIMEOUT = unchecked((int)0x8000402A),
- CO_E_NO_SECCTX_IN_ACTIVATE = unchecked((int)0x8000402B),
- CO_E_TRACKER_CONFIG = unchecked((int)0x80004030),
- CO_E_THREADPOOL_CONFIG = unchecked((int)0x80004031),
- CO_E_SXS_CONFIG = unchecked((int)0x80004032),
- CO_E_MALFORMED_SPN = unchecked((int)0x80004033),
- S_OK = unchecked((int)0x00000000),
- S_FALSE = unchecked((int)0x00000001),
- OLE_E_FIRST = unchecked((int)0x80040000),
- OLE_E_LAST = unchecked((int)0x800400FF),
- OLE_S_FIRST = unchecked((int)0x00040000),
- OLE_S_LAST = unchecked((int)0x000400FF),
- OLE_E_OLEVERB = unchecked((int)0x80040000),
- OLE_E_ADVF = unchecked((int)0x80040001),
- OLE_E_ENUM_NOMORE = unchecked((int)0x80040002),
- OLE_E_ADVISENOTSUPPORTED = unchecked((int)0x80040003),
- OLE_E_NOCONNECTION = unchecked((int)0x80040004),
- OLE_E_NOTRUNNING = unchecked((int)0x80040005),
- OLE_E_NOCACHE = unchecked((int)0x80040006),
- OLE_E_BLANK = unchecked((int)0x80040007),
- OLE_E_CLASSDIFF = unchecked((int)0x80040008),
- OLE_E_CANT_GETMONIKER = unchecked((int)0x80040009),
- OLE_E_CANT_BINDTOSOURCE = unchecked((int)0x8004000A),
- OLE_E_STATIC = unchecked((int)0x8004000B),
- OLE_E_PROMPTSAVECANCELLED = unchecked((int)0x8004000C),
- OLE_E_INVALIDRECT = unchecked((int)0x8004000D),
- OLE_E_WRONGCOMPOBJ = unchecked((int)0x8004000E),
- OLE_E_INVALIDHWND = unchecked((int)0x8004000F),
- OLE_E_NOT_INPLACEACTIVE = unchecked((int)0x80040010),
- OLE_E_CANTCONVERT = unchecked((int)0x80040011),
- OLE_E_NOSTORAGE = unchecked((int)0x80040012),
- DV_E_FORMATETC = unchecked((int)0x80040064),
- DV_E_DVTARGETDEVICE = unchecked((int)0x80040065),
- DV_E_STGMEDIUM = unchecked((int)0x80040066),
- DV_E_STATDATA = unchecked((int)0x80040067),
- DV_E_LINDEX = unchecked((int)0x80040068),
- DV_E_TYMED = unchecked((int)0x80040069),
- DV_E_CLIPFORMAT = unchecked((int)0x8004006A),
- DV_E_DVASPECT = unchecked((int)0x8004006B),
- DV_E_DVTARGETDEVICE_SIZE = unchecked((int)0x8004006C),
- DV_E_NOIVIEWOBJECT = unchecked((int)0x8004006D),
- DRAGDROP_E_FIRST = unchecked((int)0x80040100),
- DRAGDROP_E_LAST = unchecked((int)0x8004010F),
- DRAGDROP_S_FIRST = unchecked((int)0x00040100),
- DRAGDROP_S_LAST = unchecked((int)0x0004010F),
- DRAGDROP_E_NOTREGISTERED = unchecked((int)0x80040100),
- DRAGDROP_E_ALREADYREGISTERED = unchecked((int)0x80040101),
- DRAGDROP_E_INVALIDHWND = unchecked((int)0x80040102),
- CLASSFACTORY_E_FIRST = unchecked((int)0x80040110),
- CLASSFACTORY_E_LAST = unchecked((int)0x8004011F),
- CLASSFACTORY_S_FIRST = unchecked((int)0x00040110),
- CLASSFACTORY_S_LAST = unchecked((int)0x0004011F),
- CLASS_E_NOAGGREGATION = unchecked((int)0x80040110),
- CLASS_E_CLASSNOTAVAILABLE = unchecked((int)0x80040111),
- CLASS_E_NOTLICENSED = unchecked((int)0x80040112),
- MARSHAL_E_FIRST = unchecked((int)0x80040120),
- MARSHAL_E_LAST = unchecked((int)0x8004012F),
- MARSHAL_S_FIRST = unchecked((int)0x00040120),
- MARSHAL_S_LAST = unchecked((int)0x0004012F),
- DATA_E_FIRST = unchecked((int)0x80040130),
- DATA_E_LAST = unchecked((int)0x8004013F),
- DATA_S_FIRST = unchecked((int)0x00040130),
- DATA_S_LAST = unchecked((int)0x0004013F),
- VIEW_E_FIRST = unchecked((int)0x80040140),
- VIEW_E_LAST = unchecked((int)0x8004014F),
- VIEW_S_FIRST = unchecked((int)0x00040140),
- VIEW_S_LAST = unchecked((int)0x0004014F),
- VIEW_E_DRAW = unchecked((int)0x80040140),
- REGDB_E_FIRST = unchecked((int)0x80040150),
- REGDB_E_LAST = unchecked((int)0x8004015F),
- REGDB_S_FIRST = unchecked((int)0x00040150),
- REGDB_S_LAST = unchecked((int)0x0004015F),
- REGDB_E_READREGDB = unchecked((int)0x80040150),
- REGDB_E_WRITEREGDB = unchecked((int)0x80040151),
- REGDB_E_KEYMISSING = unchecked((int)0x80040152),
- REGDB_E_INVALIDVALUE = unchecked((int)0x80040153),
- REGDB_E_CLASSNOTREG = unchecked((int)0x80040154),
- REGDB_E_IIDNOTREG = unchecked((int)0x80040155),
- REGDB_E_BADTHREADINGMODEL = unchecked((int)0x80040156),
- CAT_E_FIRST = unchecked((int)0x80040160),
- CAT_E_LAST = unchecked((int)0x80040161),
- CAT_E_CATIDNOEXIST = unchecked((int)0x80040160),
- CAT_E_NODESCRIPTION = unchecked((int)0x80040161),
- CS_E_FIRST = unchecked((int)0x80040164),
- CS_E_LAST = unchecked((int)0x8004016F),
- CS_E_PACKAGE_NOTFOUND = unchecked((int)0x80040164),
- CS_E_NOT_DELETABLE = unchecked((int)0x80040165),
- CS_E_CLASS_NOTFOUND = unchecked((int)0x80040166),
- CS_E_INVALID_VERSION = unchecked((int)0x80040167),
- CS_E_NO_CLASSSTORE = unchecked((int)0x80040168),
- CS_E_OBJECT_NOTFOUND = unchecked((int)0x80040169),
- CS_E_OBJECT_ALREADY_EXISTS = unchecked((int)0x8004016A),
- CS_E_INVALID_PATH = unchecked((int)0x8004016B),
- CS_E_NETWORK_ERROR = unchecked((int)0x8004016C),
- CS_E_ADMIN_LIMIT_EXCEEDED = unchecked((int)0x8004016D),
- CS_E_SCHEMA_MISMATCH = unchecked((int)0x8004016E),
- CS_E_INTERNAL_ERROR = unchecked((int)0x8004016F),
- CACHE_E_FIRST = unchecked((int)0x80040170),
- CACHE_E_LAST = unchecked((int)0x8004017F),
- CACHE_S_FIRST = unchecked((int)0x00040170),
- CACHE_S_LAST = unchecked((int)0x0004017F),
- CACHE_E_NOCACHE_UPDATED = unchecked((int)0x80040170),
- OLEOBJ_E_FIRST = unchecked((int)0x80040180),
- OLEOBJ_E_LAST = unchecked((int)0x8004018F),
- OLEOBJ_S_FIRST = unchecked((int)0x00040180),
- OLEOBJ_S_LAST = unchecked((int)0x0004018F),
- OLEOBJ_E_NOVERBS = unchecked((int)0x80040180),
- OLEOBJ_E_INVALIDVERB = unchecked((int)0x80040181),
- CLIENTSITE_E_FIRST = unchecked((int)0x80040190),
- CLIENTSITE_E_LAST = unchecked((int)0x8004019F),
- CLIENTSITE_S_FIRST = unchecked((int)0x00040190),
- CLIENTSITE_S_LAST = unchecked((int)0x0004019F),
- INPLACE_E_NOTUNDOABLE = unchecked((int)0x800401A0),
- INPLACE_E_NOTOOLSPACE = unchecked((int)0x800401A1),
- INPLACE_E_FIRST = unchecked((int)0x800401A0),
- INPLACE_E_LAST = unchecked((int)0x800401AF),
- INPLACE_S_FIRST = unchecked((int)0x000401A0),
- INPLACE_S_LAST = unchecked((int)0x000401AF),
- ENUM_E_FIRST = unchecked((int)0x800401B0),
- ENUM_E_LAST = unchecked((int)0x800401BF),
- ENUM_S_FIRST = unchecked((int)0x000401B0),
- ENUM_S_LAST = unchecked((int)0x000401BF),
- CONVERT10_E_FIRST = unchecked((int)0x800401C0),
- CONVERT10_E_LAST = unchecked((int)0x800401CF),
- CONVERT10_S_FIRST = unchecked((int)0x000401C0),
- CONVERT10_S_LAST = unchecked((int)0x000401CF),
- CONVERT10_E_OLESTREAM_GET = unchecked((int)0x800401C0),
- CONVERT10_E_OLESTREAM_PUT = unchecked((int)0x800401C1),
- CONVERT10_E_OLESTREAM_FMT = unchecked((int)0x800401C2),
- CONVERT10_E_OLESTREAM_BITMAP_TO_DIB = unchecked((int)0x800401C3),
- CONVERT10_E_STG_FMT = unchecked((int)0x800401C4),
- CONVERT10_E_STG_NO_STD_STREAM = unchecked((int)0x800401C5),
- CONVERT10_E_STG_DIB_TO_BITMAP = unchecked((int)0x800401C6),
- CLIPBRD_E_FIRST = unchecked((int)0x800401D0),
- CLIPBRD_E_LAST = unchecked((int)0x800401DF),
- CLIPBRD_S_FIRST = unchecked((int)0x000401D0),
- CLIPBRD_S_LAST = unchecked((int)0x000401DF),
- CLIPBRD_E_CANT_OPEN = unchecked((int)0x800401D0),
- CLIPBRD_E_CANT_EMPTY = unchecked((int)0x800401D1),
- CLIPBRD_E_CANT_SET = unchecked((int)0x800401D2),
- CLIPBRD_E_BAD_DATA = unchecked((int)0x800401D3),
- CLIPBRD_E_CANT_CLOSE = unchecked((int)0x800401D4),
- MK_E_FIRST = unchecked((int)0x800401E0),
- MK_E_LAST = unchecked((int)0x800401EF),
- MK_S_FIRST = unchecked((int)0x000401E0),
- MK_S_LAST = unchecked((int)0x000401EF),
- MK_E_CONNECTMANUALLY = unchecked((int)0x800401E0),
- MK_E_EXCEEDEDDEADLINE = unchecked((int)0x800401E1),
- MK_E_NEEDGENERIC = unchecked((int)0x800401E2),
- MK_E_UNAVAILABLE = unchecked((int)0x800401E3),
- MK_E_SYNTAX = unchecked((int)0x800401E4),
- MK_E_NOOBJECT = unchecked((int)0x800401E5),
- MK_E_INVALIDEXTENSION = unchecked((int)0x800401E6),
- MK_E_INTERMEDIATEINTERFACENOTSUPPORTED = unchecked((int)0x800401E7),
- MK_E_NOTBINDABLE = unchecked((int)0x800401E8),
- MK_E_NOTBOUND = unchecked((int)0x800401E9),
- MK_E_CANTOPENFILE = unchecked((int)0x800401EA),
- MK_E_MUSTBOTHERUSER = unchecked((int)0x800401EB),
- MK_E_NOINVERSE = unchecked((int)0x800401EC),
- MK_E_NOSTORAGE = unchecked((int)0x800401ED),
- MK_E_NOPREFIX = unchecked((int)0x800401EE),
- MK_E_ENUMERATION_FAILED = unchecked((int)0x800401EF),
- CO_E_FIRST = unchecked((int)0x800401F0),
- CO_E_LAST = unchecked((int)0x800401FF),
- CO_S_FIRST = unchecked((int)0x000401F0),
- CO_S_LAST = unchecked((int)0x000401FF),
- CO_E_NOTINITIALIZED = unchecked((int)0x800401F0),
- CO_E_ALREADYINITIALIZED = unchecked((int)0x800401F1),
- CO_E_CANTDETERMINECLASS = unchecked((int)0x800401F2),
- CO_E_CLASSSTRING = unchecked((int)0x800401F3),
- CO_E_IIDSTRING = unchecked((int)0x800401F4),
- CO_E_APPNOTFOUND = unchecked((int)0x800401F5),
- CO_E_APPSINGLEUSE = unchecked((int)0x800401F6),
- CO_E_ERRORINAPP = unchecked((int)0x800401F7),
- CO_E_DLLNOTFOUND = unchecked((int)0x800401F8),
- CO_E_ERRORINDLL = unchecked((int)0x800401F9),
- CO_E_WRONGOSFORAPP = unchecked((int)0x800401FA),
- CO_E_OBJNOTREG = unchecked((int)0x800401FB),
- CO_E_OBJISREG = unchecked((int)0x800401FC),
- CO_E_OBJNOTCONNECTED = unchecked((int)0x800401FD),
- CO_E_APPDIDNTREG = unchecked((int)0x800401FE),
- CO_E_RELEASED = unchecked((int)0x800401FF),
- EVENT_E_FIRST = unchecked((int)0x80040200),
- EVENT_E_LAST = unchecked((int)0x8004021F),
- EVENT_S_FIRST = unchecked((int)0x00040200),
- EVENT_S_LAST = unchecked((int)0x0004021F),
- EVENT_S_SOME_SUBSCRIBERS_FAILED = unchecked((int)0x00040200),
- EVENT_E_ALL_SUBSCRIBERS_FAILED = unchecked((int)0x80040201),
- EVENT_S_NOSUBSCRIBERS = unchecked((int)0x00040202),
- EVENT_E_QUERYSYNTAX = unchecked((int)0x80040203),
- EVENT_E_QUERYFIELD = unchecked((int)0x80040204),
- EVENT_E_INTERNALEXCEPTION = unchecked((int)0x80040205),
- EVENT_E_INTERNALERROR = unchecked((int)0x80040206),
- EVENT_E_INVALID_PER_USER_SID = unchecked((int)0x80040207),
- EVENT_E_USER_EXCEPTION = unchecked((int)0x80040208),
- EVENT_E_TOO_MANY_METHODS = unchecked((int)0x80040209),
- EVENT_E_MISSING_EVENTCLASS = unchecked((int)0x8004020A),
- EVENT_E_NOT_ALL_REMOVED = unchecked((int)0x8004020B),
- EVENT_E_COMPLUS_NOT_INSTALLED = unchecked((int)0x8004020C),
- EVENT_E_CANT_MODIFY_OR_DELETE_UNCONFIGURED_OBJECT = unchecked((int)0x8004020D),
- EVENT_E_CANT_MODIFY_OR_DELETE_CONFIGURED_OBJECT = unchecked((int)0x8004020E),
- EVENT_E_INVALID_EVENT_CLASS_PARTITION = unchecked((int)0x8004020F),
- EVENT_E_PER_USER_SID_NOT_LOGGED_ON = unchecked((int)0x80040210),
- XACT_E_FIRST = unchecked((int)0x8004D000),
- XACT_E_LAST = unchecked((int)0x8004D029),
- XACT_S_FIRST = unchecked((int)0x0004D000),
- XACT_S_LAST = unchecked((int)0x0004D010),
- XACT_E_ALREADYOTHERSINGLEPHASE = unchecked((int)0x8004D000),
- XACT_E_CANTRETAIN = unchecked((int)0x8004D001),
- XACT_E_COMMITFAILED = unchecked((int)0x8004D002),
- XACT_E_COMMITPREVENTED = unchecked((int)0x8004D003),
- XACT_E_HEURISTICABORT = unchecked((int)0x8004D004),
- XACT_E_HEURISTICCOMMIT = unchecked((int)0x8004D005),
- XACT_E_HEURISTICDAMAGE = unchecked((int)0x8004D006),
- XACT_E_HEURISTICDANGER = unchecked((int)0x8004D007),
- XACT_E_ISOLATIONLEVEL = unchecked((int)0x8004D008),
- XACT_E_NOASYNC = unchecked((int)0x8004D009),
- XACT_E_NOENLIST = unchecked((int)0x8004D00A),
- XACT_E_NOISORETAIN = unchecked((int)0x8004D00B),
- XACT_E_NORESOURCE = unchecked((int)0x8004D00C),
- XACT_E_NOTCURRENT = unchecked((int)0x8004D00D),
- XACT_E_NOTRANSACTION = unchecked((int)0x8004D00E),
- XACT_E_NOTSUPPORTED = unchecked((int)0x8004D00F),
- XACT_E_UNKNOWNRMGRID = unchecked((int)0x8004D010),
- XACT_E_WRONGSTATE = unchecked((int)0x8004D011),
- XACT_E_WRONGUOW = unchecked((int)0x8004D012),
- XACT_E_XTIONEXISTS = unchecked((int)0x8004D013),
- XACT_E_NOIMPORTOBJECT = unchecked((int)0x8004D014),
- XACT_E_INVALIDCOOKIE = unchecked((int)0x8004D015),
- XACT_E_INDOUBT = unchecked((int)0x8004D016),
- XACT_E_NOTIMEOUT = unchecked((int)0x8004D017),
- XACT_E_ALREADYINPROGRESS = unchecked((int)0x8004D018),
- XACT_E_ABORTED = unchecked((int)0x8004D019),
- XACT_E_LOGFULL = unchecked((int)0x8004D01A),
- XACT_E_TMNOTAVAILABLE = unchecked((int)0x8004D01B),
- XACT_E_CONNECTION_DOWN = unchecked((int)0x8004D01C),
- XACT_E_CONNECTION_DENIED = unchecked((int)0x8004D01D),
- XACT_E_REENLISTTIMEOUT = unchecked((int)0x8004D01E),
- XACT_E_TIP_CONNECT_FAILED = unchecked((int)0x8004D01F),
- XACT_E_TIP_PROTOCOL_ERROR = unchecked((int)0x8004D020),
- XACT_E_TIP_PULL_FAILED = unchecked((int)0x8004D021),
- XACT_E_DEST_TMNOTAVAILABLE = unchecked((int)0x8004D022),
- XACT_E_TIP_DISABLED = unchecked((int)0x8004D023),
- XACT_E_NETWORK_TX_DISABLED = unchecked((int)0x8004D024),
- XACT_E_PARTNER_NETWORK_TX_DISABLED = unchecked((int)0x8004D025),
- XACT_E_XA_TX_DISABLED = unchecked((int)0x8004D026),
- XACT_E_UNABLE_TO_READ_DTC_CONFIG = unchecked((int)0x8004D027),
- XACT_E_UNABLE_TO_LOAD_DTC_PROXY = unchecked((int)0x8004D028),
- XACT_E_ABORTING = unchecked((int)0x8004D029),
- XACT_E_CLERKNOTFOUND = unchecked((int)0x8004D080),
- XACT_E_CLERKEXISTS = unchecked((int)0x8004D081),
- XACT_E_RECOVERYINPROGRESS = unchecked((int)0x8004D082),
- XACT_E_TRANSACTIONCLOSED = unchecked((int)0x8004D083),
- XACT_E_INVALIDLSN = unchecked((int)0x8004D084),
- XACT_E_REPLAYREQUEST = unchecked((int)0x8004D085),
- XACT_S_ASYNC = unchecked((int)0x0004D000),
- XACT_S_DEFECT = unchecked((int)0x0004D001),
- XACT_S_READONLY = unchecked((int)0x0004D002),
- XACT_S_SOMENORETAIN = unchecked((int)0x0004D003),
- XACT_S_OKINFORM = unchecked((int)0x0004D004),
- XACT_S_MADECHANGESCONTENT = unchecked((int)0x0004D005),
- XACT_S_MADECHANGESINFORM = unchecked((int)0x0004D006),
- XACT_S_ALLNORETAIN = unchecked((int)0x0004D007),
- XACT_S_ABORTING = unchecked((int)0x0004D008),
- XACT_S_SINGLEPHASE = unchecked((int)0x0004D009),
- XACT_S_LOCALLY_OK = unchecked((int)0x0004D00A),
- XACT_S_LASTRESOURCEMANAGER = unchecked((int)0x0004D010),
- CONTEXT_E_FIRST = unchecked((int)0x8004E000),
- CONTEXT_E_LAST = unchecked((int)0x8004E02F),
- CONTEXT_S_FIRST = unchecked((int)0x0004E000),
- CONTEXT_S_LAST = unchecked((int)0x0004E02F),
- CONTEXT_E_ABORTED = unchecked((int)0x8004E002),
- CONTEXT_E_ABORTING = unchecked((int)0x8004E003),
- CONTEXT_E_NOCONTEXT = unchecked((int)0x8004E004),
- CONTEXT_E_WOULD_DEADLOCK = unchecked((int)0x8004E005),
- CONTEXT_E_SYNCH_TIMEOUT = unchecked((int)0x8004E006),
- CONTEXT_E_OLDREF = unchecked((int)0x8004E007),
- CONTEXT_E_ROLENOTFOUND = unchecked((int)0x8004E00C),
- CONTEXT_E_TMNOTAVAILABLE = unchecked((int)0x8004E00F),
- CO_E_ACTIVATIONFAILED = unchecked((int)0x8004E021),
- CO_E_ACTIVATIONFAILED_EVENTLOGGED = unchecked((int)0x8004E022),
- CO_E_ACTIVATIONFAILED_CATALOGERROR = unchecked((int)0x8004E023),
- CO_E_ACTIVATIONFAILED_TIMEOUT = unchecked((int)0x8004E024),
- CO_E_INITIALIZATIONFAILED = unchecked((int)0x8004E025),
- CONTEXT_E_NOJIT = unchecked((int)0x8004E026),
- CONTEXT_E_NOTRANSACTION = unchecked((int)0x8004E027),
- CO_E_THREADINGMODEL_CHANGED = unchecked((int)0x8004E028),
- CO_E_NOIISINTRINSICS = unchecked((int)0x8004E029),
- CO_E_NOCOOKIES = unchecked((int)0x8004E02A),
- CO_E_DBERROR = unchecked((int)0x8004E02B),
- CO_E_NOTPOOLED = unchecked((int)0x8004E02C),
- CO_E_NOTCONSTRUCTED = unchecked((int)0x8004E02D),
- CO_E_NOSYNCHRONIZATION = unchecked((int)0x8004E02E),
- CO_E_ISOLEVELMISMATCH = unchecked((int)0x8004E02F),
- OLE_S_USEREG = unchecked((int)0x00040000),
- OLE_S_STATIC = unchecked((int)0x00040001),
- OLE_S_MAC_CLIPFORMAT = unchecked((int)0x00040002),
- DRAGDROP_S_DROP = unchecked((int)0x00040100),
- DRAGDROP_S_CANCEL = unchecked((int)0x00040101),
- DRAGDROP_S_USEDEFAULTCURSORS = unchecked((int)0x00040102),
- DATA_S_SAMEFORMATETC = unchecked((int)0x00040130),
- VIEW_S_ALREADY_FROZEN = unchecked((int)0x00040140),
- CACHE_S_FORMATETC_NOTSUPPORTED = unchecked((int)0x00040170),
- CACHE_S_SAMECACHE = unchecked((int)0x00040171),
- CACHE_S_SOMECACHES_NOTUPDATED = unchecked((int)0x00040172),
- OLEOBJ_S_INVALIDVERB = unchecked((int)0x00040180),
- OLEOBJ_S_CANNOT_DOVERB_NOW = unchecked((int)0x00040181),
- OLEOBJ_S_INVALIDHWND = unchecked((int)0x00040182),
- INPLACE_S_TRUNCATED = unchecked((int)0x000401A0),
- CONVERT10_S_NO_PRESENTATION = unchecked((int)0x000401C0),
- MK_S_REDUCED_TO_SELF = unchecked((int)0x000401E2),
- MK_S_ME = unchecked((int)0x000401E4),
- MK_S_HIM = unchecked((int)0x000401E5),
- MK_S_US = unchecked((int)0x000401E6),
- MK_S_MONIKERALREADYREGISTERED = unchecked((int)0x000401E7),
- SCHED_S_TASK_READY = unchecked((int)0x00041300),
- SCHED_S_TASK_RUNNING = unchecked((int)0x00041301),
- SCHED_S_TASK_DISABLED = unchecked((int)0x00041302),
- SCHED_S_TASK_HAS_NOT_RUN = unchecked((int)0x00041303),
- SCHED_S_TASK_NO_MORE_RUNS = unchecked((int)0x00041304),
- SCHED_S_TASK_NOT_SCHEDULED = unchecked((int)0x00041305),
- SCHED_S_TASK_TERMINATED = unchecked((int)0x00041306),
- SCHED_S_TASK_NO_VALID_TRIGGERS = unchecked((int)0x00041307),
- SCHED_S_EVENT_TRIGGER = unchecked((int)0x00041308),
- SCHED_E_TRIGGER_NOT_FOUND = unchecked((int)0x80041309),
- SCHED_E_TASK_NOT_READY = unchecked((int)0x8004130A),
- SCHED_E_TASK_NOT_RUNNING = unchecked((int)0x8004130B),
- SCHED_E_SERVICE_NOT_INSTALLED = unchecked((int)0x8004130C),
- SCHED_E_CANNOT_OPEN_TASK = unchecked((int)0x8004130D),
- SCHED_E_INVALID_TASK = unchecked((int)0x8004130E),
- SCHED_E_ACCOUNT_INFORMATION_NOT_SET = unchecked((int)0x8004130F),
- SCHED_E_ACCOUNT_NAME_NOT_FOUND = unchecked((int)0x80041310),
- SCHED_E_ACCOUNT_DBASE_CORRUPT = unchecked((int)0x80041311),
- SCHED_E_NO_SECURITY_SERVICES = unchecked((int)0x80041312),
- SCHED_E_UNKNOWN_OBJECT_VERSION = unchecked((int)0x80041313),
- SCHED_E_UNSUPPORTED_ACCOUNT_OPTION = unchecked((int)0x80041314),
- SCHED_E_SERVICE_NOT_RUNNING = unchecked((int)0x80041315),
- CO_E_CLASS_CREATE_FAILED = unchecked((int)0x80080001),
- CO_E_SCM_ERROR = unchecked((int)0x80080002),
- CO_E_SCM_RPC_FAILURE = unchecked((int)0x80080003),
- CO_E_BAD_PATH = unchecked((int)0x80080004),
- CO_E_SERVER_EXEC_FAILURE = unchecked((int)0x80080005),
- CO_E_OBJSRV_RPC_FAILURE = unchecked((int)0x80080006),
- MK_E_NO_NORMALIZED = unchecked((int)0x80080007),
- CO_E_SERVER_STOPPING = unchecked((int)0x80080008),
- MEM_E_INVALID_ROOT = unchecked((int)0x80080009),
- MEM_E_INVALID_LINK = unchecked((int)0x80080010),
- MEM_E_INVALID_SIZE = unchecked((int)0x80080011),
- CO_S_NOTALLINTERFACES = unchecked((int)0x00080012),
- CO_S_MACHINENAMENOTFOUND = unchecked((int)0x00080013),
- DISP_E_UNKNOWNINTERFACE = unchecked((int)0x80020001),
- DISP_E_MEMBERNOTFOUND = unchecked((int)0x80020003),
- DISP_E_PARAMNOTFOUND = unchecked((int)0x80020004),
- DISP_E_TYPEMISMATCH = unchecked((int)0x80020005),
- DISP_E_UNKNOWNNAME = unchecked((int)0x80020006),
- DISP_E_NONAMEDARGS = unchecked((int)0x80020007),
- DISP_E_BADVARTYPE = unchecked((int)0x80020008),
- DISP_E_EXCEPTION = unchecked((int)0x80020009),
- DISP_E_OVERFLOW = unchecked((int)0x8002000A),
- DISP_E_BADINDEX = unchecked((int)0x8002000B),
- DISP_E_UNKNOWNLCID = unchecked((int)0x8002000C),
- DISP_E_ARRAYISLOCKED = unchecked((int)0x8002000D),
- DISP_E_BADPARAMCOUNT = unchecked((int)0x8002000E),
- DISP_E_PARAMNOTOPTIONAL = unchecked((int)0x8002000F),
- DISP_E_BADCALLEE = unchecked((int)0x80020010),
- DISP_E_NOTACOLLECTION = unchecked((int)0x80020011),
- DISP_E_DIVBYZERO = unchecked((int)0x80020012),
- DISP_E_BUFFERTOOSMALL = unchecked((int)0x80020013),
- TYPE_E_BUFFERTOOSMALL = unchecked((int)0x80028016),
- TYPE_E_FIELDNOTFOUND = unchecked((int)0x80028017),
- TYPE_E_INVDATAREAD = unchecked((int)0x80028018),
- TYPE_E_UNSUPFORMAT = unchecked((int)0x80028019),
- TYPE_E_REGISTRYACCESS = unchecked((int)0x8002801C),
- TYPE_E_LIBNOTREGISTERED = unchecked((int)0x8002801D),
- TYPE_E_UNDEFINEDTYPE = unchecked((int)0x80028027),
- TYPE_E_QUALIFIEDNAMEDISALLOWED = unchecked((int)0x80028028),
- TYPE_E_INVALIDSTATE = unchecked((int)0x80028029),
- TYPE_E_WRONGTYPEKIND = unchecked((int)0x8002802A),
- TYPE_E_ELEMENTNOTFOUND = unchecked((int)0x8002802B),
- TYPE_E_AMBIGUOUSNAME = unchecked((int)0x8002802C),
- TYPE_E_NAMECONFLICT = unchecked((int)0x8002802D),
- TYPE_E_UNKNOWNLCID = unchecked((int)0x8002802E),
- TYPE_E_DLLFUNCTIONNOTFOUND = unchecked((int)0x8002802F),
- TYPE_E_BADMODULEKIND = unchecked((int)0x800288BD),
- TYPE_E_SIZETOOBIG = unchecked((int)0x800288C5),
- TYPE_E_DUPLICATEID = unchecked((int)0x800288C6),
- TYPE_E_INVALIDID = unchecked((int)0x800288CF),
- TYPE_E_TYPEMISMATCH = unchecked((int)0x80028CA0),
- TYPE_E_OUTOFBOUNDS = unchecked((int)0x80028CA1),
- TYPE_E_IOERROR = unchecked((int)0x80028CA2),
- TYPE_E_CANTCREATETMPFILE = unchecked((int)0x80028CA3),
- TYPE_E_CANTLOADLIBRARY = unchecked((int)0x80029C4A),
- TYPE_E_INCONSISTENTPROPFUNCS = unchecked((int)0x80029C83),
- TYPE_E_CIRCULARTYPE = unchecked((int)0x80029C84),
- STG_E_INVALIDFUNCTION = unchecked((int)0x80030001),
- STG_E_FILENOTFOUND = unchecked((int)0x80030002),
- STG_E_PATHNOTFOUND = unchecked((int)0x80030003),
- STG_E_TOOMANYOPENFILES = unchecked((int)0x80030004),
- STG_E_ACCESSDENIED = unchecked((int)0x80030005),
- STG_E_INVALIDHANDLE = unchecked((int)0x80030006),
- STG_E_INSUFFICIENTMEMORY = unchecked((int)0x80030008),
- STG_E_INVALIDPOINTER = unchecked((int)0x80030009),
- STG_E_NOMOREFILES = unchecked((int)0x80030012),
- STG_E_DISKISWRITEPROTECTED = unchecked((int)0x80030013),
- STG_E_SEEKERROR = unchecked((int)0x80030019),
- STG_E_WRITEFAULT = unchecked((int)0x8003001D),
- STG_E_READFAULT = unchecked((int)0x8003001E),
- STG_E_SHAREVIOLATION = unchecked((int)0x80030020),
- STG_E_LOCKVIOLATION = unchecked((int)0x80030021),
- STG_E_FILEALREADYEXISTS = unchecked((int)0x80030050),
- STG_E_INVALIDPARAMETER = unchecked((int)0x80030057),
- STG_E_MEDIUMFULL = unchecked((int)0x80030070),
- STG_E_PROPSETMISMATCHED = unchecked((int)0x800300F0),
- STG_E_ABNORMALAPIEXIT = unchecked((int)0x800300FA),
- STG_E_INVALIDHEADER = unchecked((int)0x800300FB),
- STG_E_INVALIDNAME = unchecked((int)0x800300FC),
- STG_E_UNKNOWN = unchecked((int)0x800300FD),
- STG_E_UNIMPLEMENTEDFUNCTION = unchecked((int)0x800300FE),
- STG_E_INVALIDFLAG = unchecked((int)0x800300FF),
- STG_E_INUSE = unchecked((int)0x80030100),
- STG_E_NOTCURRENT = unchecked((int)0x80030101),
- STG_E_REVERTED = unchecked((int)0x80030102),
- STG_E_CANTSAVE = unchecked((int)0x80030103),
- STG_E_OLDFORMAT = unchecked((int)0x80030104),
- STG_E_OLDDLL = unchecked((int)0x80030105),
- STG_E_SHAREREQUIRED = unchecked((int)0x80030106),
- STG_E_NOTFILEBASEDSTORAGE = unchecked((int)0x80030107),
- STG_E_EXTANTMARSHALLINGS = unchecked((int)0x80030108),
- STG_E_DOCFILECORRUPT = unchecked((int)0x80030109),
- STG_E_BADBASEADDRESS = unchecked((int)0x80030110),
- STG_E_DOCFILETOOLARGE = unchecked((int)0x80030111),
- STG_E_NOTSIMPLEFORMAT = unchecked((int)0x80030112),
- STG_E_INCOMPLETE = unchecked((int)0x80030201),
- STG_E_TERMINATED = unchecked((int)0x80030202),
- STG_S_CONVERTED = unchecked((int)0x00030200),
- STG_S_BLOCK = unchecked((int)0x00030201),
- STG_S_RETRYNOW = unchecked((int)0x00030202),
- STG_S_MONITORING = unchecked((int)0x00030203),
- STG_S_MULTIPLEOPENS = unchecked((int)0x00030204),
- STG_S_CONSOLIDATIONFAILED = unchecked((int)0x00030205),
- STG_S_CANNOTCONSOLIDATE = unchecked((int)0x00030206),
- STG_E_STATUS_COPY_PROTECTION_FAILURE = unchecked((int)0x80030305),
- STG_E_CSS_AUTHENTICATION_FAILURE = unchecked((int)0x80030306),
- STG_E_CSS_KEY_NOT_PRESENT = unchecked((int)0x80030307),
- STG_E_CSS_KEY_NOT_ESTABLISHED = unchecked((int)0x80030308),
- STG_E_CSS_SCRAMBLED_SECTOR = unchecked((int)0x80030309),
- STG_E_CSS_REGION_MISMATCH = unchecked((int)0x8003030A),
- STG_E_RESETS_EXHAUSTED = unchecked((int)0x8003030B),
- RPC_E_CALL_REJECTED = unchecked((int)0x80010001),
- RPC_E_CALL_CANCELED = unchecked((int)0x80010002),
- RPC_E_CANTPOST_INSENDCALL = unchecked((int)0x80010003),
- RPC_E_CANTCALLOUT_INASYNCCALL = unchecked((int)0x80010004),
- RPC_E_CANTCALLOUT_INEXTERNALCALL = unchecked((int)0x80010005),
- RPC_E_CONNECTION_TERMINATED = unchecked((int)0x80010006),
- RPC_E_SERVER_DIED = unchecked((int)0x80010007),
- RPC_E_CLIENT_DIED = unchecked((int)0x80010008),
- RPC_E_INVALID_DATAPACKET = unchecked((int)0x80010009),
- RPC_E_CANTTRANSMIT_CALL = unchecked((int)0x8001000A),
- RPC_E_CLIENT_CANTMARSHAL_DATA = unchecked((int)0x8001000B),
- RPC_E_CLIENT_CANTUNMARSHAL_DATA = unchecked((int)0x8001000C),
- RPC_E_SERVER_CANTMARSHAL_DATA = unchecked((int)0x8001000D),
- RPC_E_SERVER_CANTUNMARSHAL_DATA = unchecked((int)0x8001000E),
- RPC_E_INVALID_DATA = unchecked((int)0x8001000F),
- RPC_E_INVALID_PARAMETER = unchecked((int)0x80010010),
- RPC_E_CANTCALLOUT_AGAIN = unchecked((int)0x80010011),
- RPC_E_SERVER_DIED_DNE = unchecked((int)0x80010012),
- RPC_E_SYS_CALL_FAILED = unchecked((int)0x80010100),
- RPC_E_OUT_OF_RESOURCES = unchecked((int)0x80010101),
- RPC_E_ATTEMPTED_MULTITHREAD = unchecked((int)0x80010102),
- RPC_E_NOT_REGISTERED = unchecked((int)0x80010103),
- RPC_E_FAULT = unchecked((int)0x80010104),
- RPC_E_SERVERFAULT = unchecked((int)0x80010105),
- RPC_E_CHANGED_MODE = unchecked((int)0x80010106),
- RPC_E_INVALIDMETHOD = unchecked((int)0x80010107),
- RPC_E_DISCONNECTED = unchecked((int)0x80010108),
- RPC_E_RETRY = unchecked((int)0x80010109),
- RPC_E_SERVERCALL_RETRYLATER = unchecked((int)0x8001010A),
- RPC_E_SERVERCALL_REJECTED = unchecked((int)0x8001010B),
- RPC_E_INVALID_CALLDATA = unchecked((int)0x8001010C),
- RPC_E_CANTCALLOUT_ININPUTSYNCCALL = unchecked((int)0x8001010D),
- RPC_E_WRONG_THREAD = unchecked((int)0x8001010E),
- RPC_E_THREAD_NOT_INIT = unchecked((int)0x8001010F),
- RPC_E_VERSION_MISMATCH = unchecked((int)0x80010110),
- RPC_E_INVALID_HEADER = unchecked((int)0x80010111),
- RPC_E_INVALID_EXTENSION = unchecked((int)0x80010112),
- RPC_E_INVALID_IPID = unchecked((int)0x80010113),
- RPC_E_INVALID_OBJECT = unchecked((int)0x80010114),
- RPC_S_CALLPENDING = unchecked((int)0x80010115),
- RPC_S_WAITONTIMER = unchecked((int)0x80010116),
- RPC_E_CALL_COMPLETE = unchecked((int)0x80010117),
- RPC_E_UNSECURE_CALL = unchecked((int)0x80010118),
- RPC_E_TOO_LATE = unchecked((int)0x80010119),
- RPC_E_NO_GOOD_SECURITY_PACKAGES = unchecked((int)0x8001011A),
- RPC_E_ACCESS_DENIED = unchecked((int)0x8001011B),
- RPC_E_REMOTE_DISABLED = unchecked((int)0x8001011C),
- RPC_E_INVALID_OBJREF = unchecked((int)0x8001011D),
- RPC_E_NO_CONTEXT = unchecked((int)0x8001011E),
- RPC_E_TIMEOUT = unchecked((int)0x8001011F),
- RPC_E_NO_SYNC = unchecked((int)0x80010120),
- RPC_E_FULLSIC_REQUIRED = unchecked((int)0x80010121),
- RPC_E_INVALID_STD_NAME = unchecked((int)0x80010122),
- CO_E_FAILEDTOIMPERSONATE = unchecked((int)0x80010123),
- CO_E_FAILEDTOGETSECCTX = unchecked((int)0x80010124),
- CO_E_FAILEDTOOPENTHREADTOKEN = unchecked((int)0x80010125),
- CO_E_FAILEDTOGETTOKENINFO = unchecked((int)0x80010126),
- CO_E_TRUSTEEDOESNTMATCHCLIENT = unchecked((int)0x80010127),
- CO_E_FAILEDTOQUERYCLIENTBLANKET = unchecked((int)0x80010128),
- CO_E_FAILEDTOSETDACL = unchecked((int)0x80010129),
- CO_E_ACCESSCHECKFAILED = unchecked((int)0x8001012A),
- CO_E_NETACCESSAPIFAILED = unchecked((int)0x8001012B),
- CO_E_WRONGTRUSTEENAMESYNTAX = unchecked((int)0x8001012C),
- CO_E_INVALIDSID = unchecked((int)0x8001012D),
- CO_E_CONVERSIONFAILED = unchecked((int)0x8001012E),
- CO_E_NOMATCHINGSIDFOUND = unchecked((int)0x8001012F),
- CO_E_LOOKUPACCSIDFAILED = unchecked((int)0x80010130),
- CO_E_NOMATCHINGNAMEFOUND = unchecked((int)0x80010131),
- CO_E_LOOKUPACCNAMEFAILED = unchecked((int)0x80010132),
- CO_E_SETSERLHNDLFAILED = unchecked((int)0x80010133),
- CO_E_FAILEDTOGETWINDIR = unchecked((int)0x80010134),
- CO_E_PATHTOOLONG = unchecked((int)0x80010135),
- CO_E_FAILEDTOGENUUID = unchecked((int)0x80010136),
- CO_E_FAILEDTOCREATEFILE = unchecked((int)0x80010137),
- CO_E_FAILEDTOCLOSEHANDLE = unchecked((int)0x80010138),
- CO_E_EXCEEDSYSACLLIMIT = unchecked((int)0x80010139),
- CO_E_ACESINWRONGORDER = unchecked((int)0x8001013A),
- CO_E_INCOMPATIBLESTREAMVERSION = unchecked((int)0x8001013B),
- CO_E_FAILEDTOOPENPROCESSTOKEN = unchecked((int)0x8001013C),
- CO_E_DECODEFAILED = unchecked((int)0x8001013D),
- CO_E_ACNOTINITIALIZED = unchecked((int)0x8001013F),
- CO_E_CANCEL_DISABLED = unchecked((int)0x80010140),
- RPC_E_UNEXPECTED = unchecked((int)0x8001FFFF),
- ERROR_AUDITING_DISABLED = unchecked((int)0xC0090001),
- ERROR_ALL_SIDS_FILTERED = unchecked((int)0xC0090002),
- NTE_BAD_UID = unchecked((int)0x80090001),
- NTE_BAD_HASH = unchecked((int)0x80090002),
- NTE_BAD_KEY = unchecked((int)0x80090003),
- NTE_BAD_LEN = unchecked((int)0x80090004),
- NTE_BAD_DATA = unchecked((int)0x80090005),
- NTE_BAD_SIGNATURE = unchecked((int)0x80090006),
- NTE_BAD_VER = unchecked((int)0x80090007),
- NTE_BAD_ALGID = unchecked((int)0x80090008),
- NTE_BAD_FLAGS = unchecked((int)0x80090009),
- NTE_BAD_TYPE = unchecked((int)0x8009000A),
- NTE_BAD_KEY_STATE = unchecked((int)0x8009000B),
- NTE_BAD_HASH_STATE = unchecked((int)0x8009000C),
- NTE_NO_KEY = unchecked((int)0x8009000D),
- NTE_NO_MEMORY = unchecked((int)0x8009000E),
- NTE_EXISTS = unchecked((int)0x8009000F),
- NTE_PERM = unchecked((int)0x80090010),
- NTE_NOT_FOUND = unchecked((int)0x80090011),
- NTE_DOUBLE_ENCRYPT = unchecked((int)0x80090012),
- NTE_BAD_PROVIDER = unchecked((int)0x80090013),
- NTE_BAD_PROV_TYPE = unchecked((int)0x80090014),
- NTE_BAD_PUBLIC_KEY = unchecked((int)0x80090015),
- NTE_BAD_KEYSET = unchecked((int)0x80090016),
- NTE_PROV_TYPE_NOT_DEF = unchecked((int)0x80090017),
- NTE_PROV_TYPE_ENTRY_BAD = unchecked((int)0x80090018),
- NTE_KEYSET_NOT_DEF = unchecked((int)0x80090019),
- NTE_KEYSET_ENTRY_BAD = unchecked((int)0x8009001A),
- NTE_PROV_TYPE_NO_MATCH = unchecked((int)0x8009001B),
- NTE_SIGNATURE_FILE_BAD = unchecked((int)0x8009001C),
- NTE_PROVIDER_DLL_FAIL = unchecked((int)0x8009001D),
- NTE_PROV_DLL_NOT_FOUND = unchecked((int)0x8009001E),
- NTE_BAD_KEYSET_PARAM = unchecked((int)0x8009001F),
- NTE_FAIL = unchecked((int)0x80090020),
- NTE_SYS_ERR = unchecked((int)0x80090021),
- NTE_SILENT_CONTEXT = unchecked((int)0x80090022),
- NTE_TOKEN_KEYSET_STORAGE_FULL = unchecked((int)0x80090023),
- NTE_TEMPORARY_PROFILE = unchecked((int)0x80090024),
- NTE_FIXEDPARAMETER = unchecked((int)0x80090025),
- SEC_E_INSUFFICIENT_MEMORY = unchecked((int)0x80090300),
- SEC_E_INVALID_HANDLE = unchecked((int)0x80090301),
- SEC_E_UNSUPPORTED_FUNCTION = unchecked((int)0x80090302),
- SEC_E_TARGET_UNKNOWN = unchecked((int)0x80090303),
- SEC_E_INTERNAL_ERROR = unchecked((int)0x80090304),
- SEC_E_SECPKG_NOT_FOUND = unchecked((int)0x80090305),
- SEC_E_NOT_OWNER = unchecked((int)0x80090306),
- SEC_E_CANNOT_INSTALL = unchecked((int)0x80090307),
- SEC_E_INVALID_TOKEN = unchecked((int)0x80090308),
- SEC_E_CANNOT_PACK = unchecked((int)0x80090309),
- SEC_E_QOP_NOT_SUPPORTED = unchecked((int)0x8009030A),
- SEC_E_NO_IMPERSONATION = unchecked((int)0x8009030B),
- SEC_E_LOGON_DENIED = unchecked((int)0x8009030C),
- SEC_E_UNKNOWN_CREDENTIALS = unchecked((int)0x8009030D),
- SEC_E_NO_CREDENTIALS = unchecked((int)0x8009030E),
- SEC_E_MESSAGE_ALTERED = unchecked((int)0x8009030F),
- SEC_E_OUT_OF_SEQUENCE = unchecked((int)0x80090310),
- SEC_E_NO_AUTHENTICATING_AUTHORITY = unchecked((int)0x80090311),
- SEC_I_CONTINUE_NEEDED = unchecked((int)0x00090312),
- SEC_I_COMPLETE_NEEDED = unchecked((int)0x00090313),
- SEC_I_COMPLETE_AND_CONTINUE = unchecked((int)0x00090314),
- SEC_I_LOCAL_LOGON = unchecked((int)0x00090315),
- SEC_E_BAD_PKGID = unchecked((int)0x80090316),
- SEC_E_CONTEXT_EXPIRED = unchecked((int)0x80090317),
- SEC_I_CONTEXT_EXPIRED = unchecked((int)0x00090317),
- SEC_E_INCOMPLETE_MESSAGE = unchecked((int)0x80090318),
- SEC_E_INCOMPLETE_CREDENTIALS = unchecked((int)0x80090320),
- SEC_E_BUFFER_TOO_SMALL = unchecked((int)0x80090321),
- SEC_I_INCOMPLETE_CREDENTIALS = unchecked((int)0x00090320),
- SEC_I_RENEGOTIATE = unchecked((int)0x00090321),
- SEC_E_WRONG_PRINCIPAL = unchecked((int)0x80090322),
- SEC_I_NO_LSA_CONTEXT = unchecked((int)0x00090323),
- SEC_E_TIME_SKEW = unchecked((int)0x80090324),
- SEC_E_UNTRUSTED_ROOT = unchecked((int)0x80090325),
- SEC_E_ILLEGAL_MESSAGE = unchecked((int)0x80090326),
- SEC_E_CERT_UNKNOWN = unchecked((int)0x80090327),
- SEC_E_CERT_EXPIRED = unchecked((int)0x80090328),
- SEC_E_ENCRYPT_FAILURE = unchecked((int)0x80090329),
- SEC_E_DECRYPT_FAILURE = unchecked((int)0x80090330),
- SEC_E_ALGORITHM_MISMATCH = unchecked((int)0x80090331),
- SEC_E_SECURITY_QOS_FAILED = unchecked((int)0x80090332),
- SEC_E_UNFINISHED_CONTEXT_DELETED = unchecked((int)0x80090333),
- SEC_E_NO_TGT_REPLY = unchecked((int)0x80090334),
- SEC_E_NO_IP_ADDRESSES = unchecked((int)0x80090335),
- SEC_E_WRONG_CREDENTIAL_HANDLE = unchecked((int)0x80090336),
- SEC_E_CRYPTO_SYSTEM_INVALID = unchecked((int)0x80090337),
- SEC_E_MAX_REFERRALS_EXCEEDED = unchecked((int)0x80090338),
- SEC_E_MUST_BE_KDC = unchecked((int)0x80090339),
- SEC_E_STRONG_CRYPTO_NOT_SUPPORTED = unchecked((int)0x8009033A),
- SEC_E_TOO_MANY_PRINCIPALS = unchecked((int)0x8009033B),
- SEC_E_NO_PA_DATA = unchecked((int)0x8009033C),
- SEC_E_PKINIT_NAME_MISMATCH = unchecked((int)0x8009033D),
- SEC_E_SMARTCARD_LOGON_REQUIRED = unchecked((int)0x8009033E),
- SEC_E_SHUTDOWN_IN_PROGRESS = unchecked((int)0x8009033F),
- SEC_E_KDC_INVALID_REQUEST = unchecked((int)0x80090340),
- SEC_E_KDC_UNABLE_TO_REFER = unchecked((int)0x80090341),
- SEC_E_KDC_UNKNOWN_ETYPE = unchecked((int)0x80090342),
- SEC_E_UNSUPPORTED_PREAUTH = unchecked((int)0x80090343),
- SEC_E_DELEGATION_REQUIRED = unchecked((int)0x80090345),
- SEC_E_BAD_BINDINGS = unchecked((int)0x80090346),
- SEC_E_MULTIPLE_ACCOUNTS = unchecked((int)0x80090347),
- SEC_E_NO_KERB_KEY = unchecked((int)0x80090348),
- SEC_E_CERT_WRONG_USAGE = unchecked((int)0x80090349),
- SEC_E_DOWNGRADE_DETECTED = unchecked((int)0x80090350),
- SEC_E_SMARTCARD_CERT_REVOKED = unchecked((int)0x80090351),
- SEC_E_ISSUING_CA_UNTRUSTED = unchecked((int)0x80090352),
- SEC_E_REVOCATION_OFFLINE_C = unchecked((int)0x80090353),
- SEC_E_PKINIT_CLIENT_FAILURE = unchecked((int)0x80090354),
- SEC_E_SMARTCARD_CERT_EXPIRED = unchecked((int)0x80090355),
- SEC_E_NO_S4U_PROT_SUPPORT = unchecked((int)0x80090356),
- SEC_E_CROSSREALM_DELEGATION_FAILURE = unchecked((int)0x80090357),
- SEC_E_REVOCATION_OFFLINE_KDC = unchecked((int)0x80090358),
- SEC_E_ISSUING_CA_UNTRUSTED_KDC = unchecked((int)0x80090359),
- SEC_E_KDC_CERT_EXPIRED = unchecked((int)0x8009035A),
- SEC_E_KDC_CERT_REVOKED = unchecked((int)0x8009035B),
- CRYPT_E_MSG_ERROR = unchecked((int)0x80091001),
- CRYPT_E_UNKNOWN_ALGO = unchecked((int)0x80091002),
- CRYPT_E_OID_FORMAT = unchecked((int)0x80091003),
- CRYPT_E_INVALID_MSG_TYPE = unchecked((int)0x80091004),
- CRYPT_E_UNEXPECTED_ENCODING = unchecked((int)0x80091005),
- CRYPT_E_AUTH_ATTR_MISSING = unchecked((int)0x80091006),
- CRYPT_E_HASH_VALUE = unchecked((int)0x80091007),
- CRYPT_E_INVALID_INDEX = unchecked((int)0x80091008),
- CRYPT_E_ALREADY_DECRYPTED = unchecked((int)0x80091009),
- CRYPT_E_NOT_DECRYPTED = unchecked((int)0x8009100A),
- CRYPT_E_RECIPIENT_NOT_FOUND = unchecked((int)0x8009100B),
- CRYPT_E_CONTROL_TYPE = unchecked((int)0x8009100C),
- CRYPT_E_ISSUER_SERIALNUMBER = unchecked((int)0x8009100D),
- CRYPT_E_SIGNER_NOT_FOUND = unchecked((int)0x8009100E),
- CRYPT_E_ATTRIBUTES_MISSING = unchecked((int)0x8009100F),
- CRYPT_E_STREAM_MSG_NOT_READY = unchecked((int)0x80091010),
- CRYPT_E_STREAM_INSUFFICIENT_DATA = unchecked((int)0x80091011),
- CRYPT_I_NEW_PROTECTION_REQUIRED = unchecked((int)0x00091012),
- CRYPT_E_BAD_LEN = unchecked((int)0x80092001),
- CRYPT_E_BAD_ENCODE = unchecked((int)0x80092002),
- CRYPT_E_FILE_ERROR = unchecked((int)0x80092003),
- CRYPT_E_NOT_FOUND = unchecked((int)0x80092004),
- CRYPT_E_EXISTS = unchecked((int)0x80092005),
- CRYPT_E_NO_PROVIDER = unchecked((int)0x80092006),
- CRYPT_E_SELF_SIGNED = unchecked((int)0x80092007),
- CRYPT_E_DELETED_PREV = unchecked((int)0x80092008),
- CRYPT_E_NO_MATCH = unchecked((int)0x80092009),
- CRYPT_E_UNEXPECTED_MSG_TYPE = unchecked((int)0x8009200A),
- CRYPT_E_NO_KEY_PROPERTY = unchecked((int)0x8009200B),
- CRYPT_E_NO_DECRYPT_CERT = unchecked((int)0x8009200C),
- CRYPT_E_BAD_MSG = unchecked((int)0x8009200D),
- CRYPT_E_NO_SIGNER = unchecked((int)0x8009200E),
- CRYPT_E_PENDING_CLOSE = unchecked((int)0x8009200F),
- CRYPT_E_REVOKED = unchecked((int)0x80092010),
- CRYPT_E_NO_REVOCATION_DLL = unchecked((int)0x80092011),
- CRYPT_E_NO_REVOCATION_CHECK = unchecked((int)0x80092012),
- CRYPT_E_REVOCATION_OFFLINE = unchecked((int)0x80092013),
- CRYPT_E_NOT_IN_REVOCATION_DATABASE = unchecked((int)0x80092014),
- CRYPT_E_INVALID_NUMERIC_STRING = unchecked((int)0x80092020),
- CRYPT_E_INVALID_PRINTABLE_STRING = unchecked((int)0x80092021),
- CRYPT_E_INVALID_IA5_STRING = unchecked((int)0x80092022),
- CRYPT_E_INVALID_X500_STRING = unchecked((int)0x80092023),
- CRYPT_E_NOT_CHAR_STRING = unchecked((int)0x80092024),
- CRYPT_E_FILERESIZED = unchecked((int)0x80092025),
- CRYPT_E_SECURITY_SETTINGS = unchecked((int)0x80092026),
- CRYPT_E_NO_VERIFY_USAGE_DLL = unchecked((int)0x80092027),
- CRYPT_E_NO_VERIFY_USAGE_CHECK = unchecked((int)0x80092028),
- CRYPT_E_VERIFY_USAGE_OFFLINE = unchecked((int)0x80092029),
- CRYPT_E_NOT_IN_CTL = unchecked((int)0x8009202A),
- CRYPT_E_NO_TRUSTED_SIGNER = unchecked((int)0x8009202B),
- CRYPT_E_MISSING_PUBKEY_PARA = unchecked((int)0x8009202C),
- CRYPT_E_OSS_ERROR = unchecked((int)0x80093000),
- OSS_MORE_BUF = unchecked((int)0x80093001),
- OSS_NEGATIVE_UINTEGER = unchecked((int)0x80093002),
- OSS_PDU_RANGE = unchecked((int)0x80093003),
- OSS_MORE_INPUT = unchecked((int)0x80093004),
- OSS_DATA_ERROR = unchecked((int)0x80093005),
- OSS_BAD_ARG = unchecked((int)0x80093006),
- OSS_BAD_VERSION = unchecked((int)0x80093007),
- OSS_OUT_MEMORY = unchecked((int)0x80093008),
- OSS_PDU_MISMATCH = unchecked((int)0x80093009),
- OSS_LIMITED = unchecked((int)0x8009300A),
- OSS_BAD_PTR = unchecked((int)0x8009300B),
- OSS_BAD_TIME = unchecked((int)0x8009300C),
- OSS_INDEFINITE_NOT_SUPPORTED = unchecked((int)0x8009300D),
- OSS_MEM_ERROR = unchecked((int)0x8009300E),
- OSS_BAD_TABLE = unchecked((int)0x8009300F),
- OSS_TOO_LONG = unchecked((int)0x80093010),
- OSS_CONSTRAINT_VIOLATED = unchecked((int)0x80093011),
- OSS_FATAL_ERROR = unchecked((int)0x80093012),
- OSS_ACCESS_SERIALIZATION_ERROR = unchecked((int)0x80093013),
- OSS_NULL_TBL = unchecked((int)0x80093014),
- OSS_NULL_FCN = unchecked((int)0x80093015),
- OSS_BAD_ENCRULES = unchecked((int)0x80093016),
- OSS_UNAVAIL_ENCRULES = unchecked((int)0x80093017),
- OSS_CANT_OPEN_TRACE_WINDOW = unchecked((int)0x80093018),
- OSS_UNIMPLEMENTED = unchecked((int)0x80093019),
- OSS_OID_DLL_NOT_LINKED = unchecked((int)0x8009301A),
- OSS_CANT_OPEN_TRACE_FILE = unchecked((int)0x8009301B),
- OSS_TRACE_FILE_ALREADY_OPEN = unchecked((int)0x8009301C),
- OSS_TABLE_MISMATCH = unchecked((int)0x8009301D),
- OSS_TYPE_NOT_SUPPORTED = unchecked((int)0x8009301E),
- OSS_REAL_DLL_NOT_LINKED = unchecked((int)0x8009301F),
- OSS_REAL_CODE_NOT_LINKED = unchecked((int)0x80093020),
- OSS_OUT_OF_RANGE = unchecked((int)0x80093021),
- OSS_COPIER_DLL_NOT_LINKED = unchecked((int)0x80093022),
- OSS_CONSTRAINT_DLL_NOT_LINKED = unchecked((int)0x80093023),
- OSS_COMPARATOR_DLL_NOT_LINKED = unchecked((int)0x80093024),
- OSS_COMPARATOR_CODE_NOT_LINKED = unchecked((int)0x80093025),
- OSS_MEM_MGR_DLL_NOT_LINKED = unchecked((int)0x80093026),
- OSS_PDV_DLL_NOT_LINKED = unchecked((int)0x80093027),
- OSS_PDV_CODE_NOT_LINKED = unchecked((int)0x80093028),
- OSS_API_DLL_NOT_LINKED = unchecked((int)0x80093029),
- OSS_BERDER_DLL_NOT_LINKED = unchecked((int)0x8009302A),
- OSS_PER_DLL_NOT_LINKED = unchecked((int)0x8009302B),
- OSS_OPEN_TYPE_ERROR = unchecked((int)0x8009302C),
- OSS_MUTEX_NOT_CREATED = unchecked((int)0x8009302D),
- OSS_CANT_CLOSE_TRACE_FILE = unchecked((int)0x8009302E),
- CRYPT_E_ASN1_ERROR = unchecked((int)0x80093100),
- CRYPT_E_ASN1_INTERNAL = unchecked((int)0x80093101),
- CRYPT_E_ASN1_EOD = unchecked((int)0x80093102),
- CRYPT_E_ASN1_CORRUPT = unchecked((int)0x80093103),
- CRYPT_E_ASN1_LARGE = unchecked((int)0x80093104),
- CRYPT_E_ASN1_CONSTRAINT = unchecked((int)0x80093105),
- CRYPT_E_ASN1_MEMORY = unchecked((int)0x80093106),
- CRYPT_E_ASN1_OVERFLOW = unchecked((int)0x80093107),
- CRYPT_E_ASN1_BADPDU = unchecked((int)0x80093108),
- CRYPT_E_ASN1_BADARGS = unchecked((int)0x80093109),
- CRYPT_E_ASN1_BADREAL = unchecked((int)0x8009310A),
- CRYPT_E_ASN1_BADTAG = unchecked((int)0x8009310B),
- CRYPT_E_ASN1_CHOICE = unchecked((int)0x8009310C),
- CRYPT_E_ASN1_RULE = unchecked((int)0x8009310D),
- CRYPT_E_ASN1_UTF8 = unchecked((int)0x8009310E),
- CRYPT_E_ASN1_PDU_TYPE = unchecked((int)0x80093133),
- CRYPT_E_ASN1_NYI = unchecked((int)0x80093134),
- CRYPT_E_ASN1_EXTENDED = unchecked((int)0x80093201),
- CRYPT_E_ASN1_NOEOD = unchecked((int)0x80093202),
- CERTSRV_E_BAD_REQUESTSUBJECT = unchecked((int)0x80094001),
- CERTSRV_E_NO_REQUEST = unchecked((int)0x80094002),
- CERTSRV_E_BAD_REQUESTSTATUS = unchecked((int)0x80094003),
- CERTSRV_E_PROPERTY_EMPTY = unchecked((int)0x80094004),
- CERTSRV_E_INVALID_CA_CERTIFICATE = unchecked((int)0x80094005),
- CERTSRV_E_SERVER_SUSPENDED = unchecked((int)0x80094006),
- CERTSRV_E_ENCODING_LENGTH = unchecked((int)0x80094007),
- CERTSRV_E_ROLECONFLICT = unchecked((int)0x80094008),
- CERTSRV_E_RESTRICTEDOFFICER = unchecked((int)0x80094009),
- CERTSRV_E_KEY_ARCHIVAL_NOT_CONFIGURED = unchecked((int)0x8009400A),
- CERTSRV_E_NO_VALID_KRA = unchecked((int)0x8009400B),
- CERTSRV_E_BAD_REQUEST_KEY_ARCHIVAL = unchecked((int)0x8009400C),
- CERTSRV_E_NO_CAADMIN_DEFINED = unchecked((int)0x8009400D),
- CERTSRV_E_BAD_RENEWAL_CERT_ATTRIBUTE = unchecked((int)0x8009400E),
- CERTSRV_E_NO_DB_SESSIONS = unchecked((int)0x8009400F),
- CERTSRV_E_ALIGNMENT_FAULT = unchecked((int)0x80094010),
- CERTSRV_E_ENROLL_DENIED = unchecked((int)0x80094011),
- CERTSRV_E_TEMPLATE_DENIED = unchecked((int)0x80094012),
- CERTSRV_E_DOWNLEVEL_DC_SSL_OR_UPGRADE = unchecked((int)0x80094013),
- CERTSRV_E_UNSUPPORTED_CERT_TYPE = unchecked((int)0x80094800),
- CERTSRV_E_NO_CERT_TYPE = unchecked((int)0x80094801),
- CERTSRV_E_TEMPLATE_CONFLICT = unchecked((int)0x80094802),
- CERTSRV_E_SUBJECT_ALT_NAME_REQUIRED = unchecked((int)0x80094803),
- CERTSRV_E_ARCHIVED_KEY_REQUIRED = unchecked((int)0x80094804),
- CERTSRV_E_SMIME_REQUIRED = unchecked((int)0x80094805),
- CERTSRV_E_BAD_RENEWAL_SUBJECT = unchecked((int)0x80094806),
- CERTSRV_E_BAD_TEMPLATE_VERSION = unchecked((int)0x80094807),
- CERTSRV_E_TEMPLATE_POLICY_REQUIRED = unchecked((int)0x80094808),
- CERTSRV_E_SIGNATURE_POLICY_REQUIRED = unchecked((int)0x80094809),
- CERTSRV_E_SIGNATURE_COUNT = unchecked((int)0x8009480A),
- CERTSRV_E_SIGNATURE_REJECTED = unchecked((int)0x8009480B),
- CERTSRV_E_ISSUANCE_POLICY_REQUIRED = unchecked((int)0x8009480C),
- CERTSRV_E_SUBJECT_UPN_REQUIRED = unchecked((int)0x8009480D),
- CERTSRV_E_SUBJECT_DIRECTORY_GUID_REQUIRED = unchecked((int)0x8009480E),
- CERTSRV_E_SUBJECT_DNS_REQUIRED = unchecked((int)0x8009480F),
- CERTSRV_E_ARCHIVED_KEY_UNEXPECTED = unchecked((int)0x80094810),
- CERTSRV_E_KEY_LENGTH = unchecked((int)0x80094811),
- CERTSRV_E_SUBJECT_EMAIL_REQUIRED = unchecked((int)0x80094812),
- CERTSRV_E_UNKNOWN_CERT_TYPE = unchecked((int)0x80094813),
- CERTSRV_E_CERT_TYPE_OVERLAP = unchecked((int)0x80094814),
- XENROLL_E_KEY_NOT_EXPORTABLE = unchecked((int)0x80095000),
- XENROLL_E_CANNOT_ADD_ROOT_CERT = unchecked((int)0x80095001),
- XENROLL_E_RESPONSE_KA_HASH_NOT_FOUND = unchecked((int)0x80095002),
- XENROLL_E_RESPONSE_UNEXPECTED_KA_HASH = unchecked((int)0x80095003),
- XENROLL_E_RESPONSE_KA_HASH_MISMATCH = unchecked((int)0x80095004),
- XENROLL_E_KEYSPEC_SMIME_MISMATCH = unchecked((int)0x80095005),
- TRUST_E_SYSTEM_ERROR = unchecked((int)0x80096001),
- TRUST_E_NO_SIGNER_CERT = unchecked((int)0x80096002),
- TRUST_E_COUNTER_SIGNER = unchecked((int)0x80096003),
- TRUST_E_CERT_SIGNATURE = unchecked((int)0x80096004),
- TRUST_E_TIME_STAMP = unchecked((int)0x80096005),
- TRUST_E_BAD_DIGEST = unchecked((int)0x80096010),
- TRUST_E_BASIC_CONSTRAINTS = unchecked((int)0x80096019),
- TRUST_E_FINANCIAL_CRITERIA = unchecked((int)0x8009601E),
- MSSIPOTF_E_OUTOFMEMRANGE = unchecked((int)0x80097001),
- MSSIPOTF_E_CANTGETOBJECT = unchecked((int)0x80097002),
- MSSIPOTF_E_NOHEADTABLE = unchecked((int)0x80097003),
- MSSIPOTF_E_BAD_MAGICNUMBER = unchecked((int)0x80097004),
- MSSIPOTF_E_BAD_OFFSET_TABLE = unchecked((int)0x80097005),
- MSSIPOTF_E_TABLE_TAGORDER = unchecked((int)0x80097006),
- MSSIPOTF_E_TABLE_LONGWORD = unchecked((int)0x80097007),
- MSSIPOTF_E_BAD_FIRST_TABLE_PLACEMENT = unchecked((int)0x80097008),
- MSSIPOTF_E_TABLES_OVERLAP = unchecked((int)0x80097009),
- MSSIPOTF_E_TABLE_PADBYTES = unchecked((int)0x8009700A),
- MSSIPOTF_E_FILETOOSMALL = unchecked((int)0x8009700B),
- MSSIPOTF_E_TABLE_CHECKSUM = unchecked((int)0x8009700C),
- MSSIPOTF_E_FILE_CHECKSUM = unchecked((int)0x8009700D),
- MSSIPOTF_E_FAILED_POLICY = unchecked((int)0x80097010),
- MSSIPOTF_E_FAILED_HINTS_CHECK = unchecked((int)0x80097011),
- MSSIPOTF_E_NOT_OPENTYPE = unchecked((int)0x80097012),
- MSSIPOTF_E_FILE = unchecked((int)0x80097013),
- MSSIPOTF_E_CRYPT = unchecked((int)0x80097014),
- MSSIPOTF_E_BADVERSION = unchecked((int)0x80097015),
- MSSIPOTF_E_DSIG_STRUCTURE = unchecked((int)0x80097016),
- MSSIPOTF_E_PCONST_CHECK = unchecked((int)0x80097017),
- MSSIPOTF_E_STRUCTURE = unchecked((int)0x80097018),
- TRUST_E_PROVIDER_UNKNOWN = unchecked((int)0x800B0001),
- TRUST_E_ACTION_UNKNOWN = unchecked((int)0x800B0002),
- TRUST_E_SUBJECT_FORM_UNKNOWN = unchecked((int)0x800B0003),
- TRUST_E_SUBJECT_NOT_TRUSTED = unchecked((int)0x800B0004),
- DIGSIG_E_ENCODE = unchecked((int)0x800B0005),
- DIGSIG_E_DECODE = unchecked((int)0x800B0006),
- DIGSIG_E_EXTENSIBILITY = unchecked((int)0x800B0007),
- DIGSIG_E_CRYPTO = unchecked((int)0x800B0008),
- PERSIST_E_SIZEDEFINITE = unchecked((int)0x800B0009),
- PERSIST_E_SIZEINDEFINITE = unchecked((int)0x800B000A),
- PERSIST_E_NOTSELFSIZING = unchecked((int)0x800B000B),
- TRUST_E_NOSIGNATURE = unchecked((int)0x800B0100),
- CERT_E_EXPIRED = unchecked((int)0x800B0101),
- CERT_E_VALIDITYPERIODNESTING = unchecked((int)0x800B0102),
- CERT_E_ROLE = unchecked((int)0x800B0103),
- CERT_E_PATHLENCONST = unchecked((int)0x800B0104),
- CERT_E_CRITICAL = unchecked((int)0x800B0105),
- CERT_E_PURPOSE = unchecked((int)0x800B0106),
- CERT_E_ISSUERCHAINING = unchecked((int)0x800B0107),
- CERT_E_MALFORMED = unchecked((int)0x800B0108),
- CERT_E_UNTRUSTEDROOT = unchecked((int)0x800B0109),
- CERT_E_CHAINING = unchecked((int)0x800B010A),
- TRUST_E_FAIL = unchecked((int)0x800B010B),
- CERT_E_REVOKED = unchecked((int)0x800B010C),
- CERT_E_UNTRUSTEDTESTROOT = unchecked((int)0x800B010D),
- CERT_E_REVOCATION_FAILURE = unchecked((int)0x800B010E),
- CERT_E_CN_NO_MATCH = unchecked((int)0x800B010F),
- CERT_E_WRONG_USAGE = unchecked((int)0x800B0110),
- TRUST_E_EXPLICIT_DISTRUST = unchecked((int)0x800B0111),
- CERT_E_UNTRUSTEDCA = unchecked((int)0x800B0112),
- CERT_E_INVALID_POLICY = unchecked((int)0x800B0113),
- CERT_E_INVALID_NAME = unchecked((int)0x800B0114),
- SPAPI_E_EXPECTED_SECTION_NAME = unchecked((int)0x800F0000),
- SPAPI_E_BAD_SECTION_NAME_LINE = unchecked((int)0x800F0001),
- SPAPI_E_SECTION_NAME_TOO_LONG = unchecked((int)0x800F0002),
- SPAPI_E_GENERAL_SYNTAX = unchecked((int)0x800F0003),
- SPAPI_E_WRONG_INF_STYLE = unchecked((int)0x800F0100),
- SPAPI_E_SECTION_NOT_FOUND = unchecked((int)0x800F0101),
- SPAPI_E_LINE_NOT_FOUND = unchecked((int)0x800F0102),
- SPAPI_E_NO_BACKUP = unchecked((int)0x800F0103),
- SPAPI_E_NO_ASSOCIATED_CLASS = unchecked((int)0x800F0200),
- SPAPI_E_CLASS_MISMATCH = unchecked((int)0x800F0201),
- SPAPI_E_DUPLICATE_FOUND = unchecked((int)0x800F0202),
- SPAPI_E_NO_DRIVER_SELECTED = unchecked((int)0x800F0203),
- SPAPI_E_KEY_DOES_NOT_EXIST = unchecked((int)0x800F0204),
- SPAPI_E_INVALID_DEVINST_NAME = unchecked((int)0x800F0205),
- SPAPI_E_INVALID_CLASS = unchecked((int)0x800F0206),
- SPAPI_E_DEVINST_ALREADY_EXISTS = unchecked((int)0x800F0207),
- SPAPI_E_DEVINFO_NOT_REGISTERED = unchecked((int)0x800F0208),
- SPAPI_E_INVALID_REG_PROPERTY = unchecked((int)0x800F0209),
- SPAPI_E_NO_INF = unchecked((int)0x800F020A),
- SPAPI_E_NO_SUCH_DEVINST = unchecked((int)0x800F020B),
- SPAPI_E_CANT_LOAD_CLASS_ICON = unchecked((int)0x800F020C),
- SPAPI_E_INVALID_CLASS_INSTALLER = unchecked((int)0x800F020D),
- SPAPI_E_DI_DO_DEFAULT = unchecked((int)0x800F020E),
- SPAPI_E_DI_NOFILECOPY = unchecked((int)0x800F020F),
- SPAPI_E_INVALID_HWPROFILE = unchecked((int)0x800F0210),
- SPAPI_E_NO_DEVICE_SELECTED = unchecked((int)0x800F0211),
- SPAPI_E_DEVINFO_LIST_LOCKED = unchecked((int)0x800F0212),
- SPAPI_E_DEVINFO_DATA_LOCKED = unchecked((int)0x800F0213),
- SPAPI_E_DI_BAD_PATH = unchecked((int)0x800F0214),
- SPAPI_E_NO_CLASSINSTALL_PARAMS = unchecked((int)0x800F0215),
- SPAPI_E_FILEQUEUE_LOCKED = unchecked((int)0x800F0216),
- SPAPI_E_BAD_SERVICE_INSTALLSECT = unchecked((int)0x800F0217),
- SPAPI_E_NO_CLASS_DRIVER_LIST = unchecked((int)0x800F0218),
- SPAPI_E_NO_ASSOCIATED_SERVICE = unchecked((int)0x800F0219),
- SPAPI_E_NO_DEFAULT_DEVICE_INTERFACE = unchecked((int)0x800F021A),
- SPAPI_E_DEVICE_INTERFACE_ACTIVE = unchecked((int)0x800F021B),
- SPAPI_E_DEVICE_INTERFACE_REMOVED = unchecked((int)0x800F021C),
- SPAPI_E_BAD_INTERFACE_INSTALLSECT = unchecked((int)0x800F021D),
- SPAPI_E_NO_SUCH_INTERFACE_CLASS = unchecked((int)0x800F021E),
- SPAPI_E_INVALID_REFERENCE_STRING = unchecked((int)0x800F021F),
- SPAPI_E_INVALID_MACHINENAME = unchecked((int)0x800F0220),
- SPAPI_E_REMOTE_COMM_FAILURE = unchecked((int)0x800F0221),
- SPAPI_E_MACHINE_UNAVAILABLE = unchecked((int)0x800F0222),
- SPAPI_E_NO_CONFIGMGR_SERVICES = unchecked((int)0x800F0223),
- SPAPI_E_INVALID_PROPPAGE_PROVIDER = unchecked((int)0x800F0224),
- SPAPI_E_NO_SUCH_DEVICE_INTERFACE = unchecked((int)0x800F0225),
- SPAPI_E_DI_POSTPROCESSING_REQUIRED = unchecked((int)0x800F0226),
- SPAPI_E_INVALID_COINSTALLER = unchecked((int)0x800F0227),
- SPAPI_E_NO_COMPAT_DRIVERS = unchecked((int)0x800F0228),
- SPAPI_E_NO_DEVICE_ICON = unchecked((int)0x800F0229),
- SPAPI_E_INVALID_INF_LOGCONFIG = unchecked((int)0x800F022A),
- SPAPI_E_DI_DONT_INSTALL = unchecked((int)0x800F022B),
- SPAPI_E_INVALID_FILTER_DRIVER = unchecked((int)0x800F022C),
- SPAPI_E_NON_WINDOWS_NT_DRIVER = unchecked((int)0x800F022D),
- SPAPI_E_NON_WINDOWS_DRIVER = unchecked((int)0x800F022E),
- SPAPI_E_NO_CATALOG_FOR_OEM_INF = unchecked((int)0x800F022F),
- SPAPI_E_DEVINSTALL_QUEUE_NONNATIVE = unchecked((int)0x800F0230),
- SPAPI_E_NOT_DISABLEABLE = unchecked((int)0x800F0231),
- SPAPI_E_CANT_REMOVE_DEVINST = unchecked((int)0x800F0232),
- SPAPI_E_INVALID_TARGET = unchecked((int)0x800F0233),
- SPAPI_E_DRIVER_NONNATIVE = unchecked((int)0x800F0234),
- SPAPI_E_IN_WOW64 = unchecked((int)0x800F0235),
- SPAPI_E_SET_SYSTEM_RESTORE_POINT = unchecked((int)0x800F0236),
- SPAPI_E_INCORRECTLY_COPIED_INF = unchecked((int)0x800F0237),
- SPAPI_E_SCE_DISABLED = unchecked((int)0x800F0238),
- SPAPI_E_UNKNOWN_EXCEPTION = unchecked((int)0x800F0239),
- SPAPI_E_PNP_REGISTRY_ERROR = unchecked((int)0x800F023A),
- SPAPI_E_REMOTE_REQUEST_UNSUPPORTED = unchecked((int)0x800F023B),
- SPAPI_E_NOT_AN_INSTALLED_OEM_INF = unchecked((int)0x800F023C),
- SPAPI_E_INF_IN_USE_BY_DEVICES = unchecked((int)0x800F023D),
- SPAPI_E_DI_FUNCTION_OBSOLETE = unchecked((int)0x800F023E),
- SPAPI_E_NO_AUTHENTICODE_CATALOG = unchecked((int)0x800F023F),
- SPAPI_E_AUTHENTICODE_DISALLOWED = unchecked((int)0x800F0240),
- SPAPI_E_AUTHENTICODE_TRUSTED_PUBLISHER = unchecked((int)0x800F0241),
- SPAPI_E_AUTHENTICODE_TRUST_NOT_ESTABLISHED = unchecked((int)0x800F0242),
- SPAPI_E_AUTHENTICODE_PUBLISHER_NOT_TRUSTED = unchecked((int)0x800F0243),
- SPAPI_E_SIGNATURE_OSATTRIBUTE_MISMATCH = unchecked((int)0x800F0244),
- SPAPI_E_ONLY_VALIDATE_VIA_AUTHENTICODE = unchecked((int)0x800F0245),
- SPAPI_E_UNRECOVERABLE_STACK_OVERFLOW = unchecked((int)0x800F0300),
- SPAPI_E_ERROR_NOT_INSTALLED = unchecked((int)0x800F1000),
- SCARD_F_INTERNAL_ERROR = unchecked((int)0x80100001),
- SCARD_E_CANCELLED = unchecked((int)0x80100002),
- SCARD_E_INVALID_HANDLE = unchecked((int)0x80100003),
- SCARD_E_INVALID_PARAMETER = unchecked((int)0x80100004),
- SCARD_E_INVALID_TARGET = unchecked((int)0x80100005),
- SCARD_E_NO_MEMORY = unchecked((int)0x80100006),
- SCARD_F_WAITED_TOO_LONG = unchecked((int)0x80100007),
- SCARD_E_INSUFFICIENT_BUFFER = unchecked((int)0x80100008),
- SCARD_E_UNKNOWN_READER = unchecked((int)0x80100009),
- SCARD_E_TIMEOUT = unchecked((int)0x8010000A),
- SCARD_E_SHARING_VIOLATION = unchecked((int)0x8010000B),
- SCARD_E_NO_SMARTCARD = unchecked((int)0x8010000C),
- SCARD_E_UNKNOWN_CARD = unchecked((int)0x8010000D),
- SCARD_E_CANT_DISPOSE = unchecked((int)0x8010000E),
- SCARD_E_PROTO_MISMATCH = unchecked((int)0x8010000F),
- SCARD_E_NOT_READY = unchecked((int)0x80100010),
- SCARD_E_INVALID_VALUE = unchecked((int)0x80100011),
- SCARD_E_SYSTEM_CANCELLED = unchecked((int)0x80100012),
- SCARD_F_COMM_ERROR = unchecked((int)0x80100013),
- SCARD_F_UNKNOWN_ERROR = unchecked((int)0x80100014),
- SCARD_E_INVALID_ATR = unchecked((int)0x80100015),
- SCARD_E_NOT_TRANSACTED = unchecked((int)0x80100016),
- SCARD_E_READER_UNAVAILABLE = unchecked((int)0x80100017),
- SCARD_P_SHUTDOWN = unchecked((int)0x80100018),
- SCARD_E_PCI_TOO_SMALL = unchecked((int)0x80100019),
- SCARD_E_READER_UNSUPPORTED = unchecked((int)0x8010001A),
- SCARD_E_DUPLICATE_READER = unchecked((int)0x8010001B),
- SCARD_E_CARD_UNSUPPORTED = unchecked((int)0x8010001C),
- SCARD_E_NO_SERVICE = unchecked((int)0x8010001D),
- SCARD_E_SERVICE_STOPPED = unchecked((int)0x8010001E),
- SCARD_E_UNEXPECTED = unchecked((int)0x8010001F),
- SCARD_E_ICC_INSTALLATION = unchecked((int)0x80100020),
- SCARD_E_ICC_CREATEORDER = unchecked((int)0x80100021),
- SCARD_E_UNSUPPORTED_FEATURE = unchecked((int)0x80100022),
- SCARD_E_DIR_NOT_FOUND = unchecked((int)0x80100023),
- SCARD_E_FILE_NOT_FOUND = unchecked((int)0x80100024),
- SCARD_E_NO_DIR = unchecked((int)0x80100025),
- SCARD_E_NO_FILE = unchecked((int)0x80100026),
- SCARD_E_NO_ACCESS = unchecked((int)0x80100027),
- SCARD_E_WRITE_TOO_MANY = unchecked((int)0x80100028),
- SCARD_E_BAD_SEEK = unchecked((int)0x80100029),
- SCARD_E_INVALID_CHV = unchecked((int)0x8010002A),
- SCARD_E_UNKNOWN_RES_MNG = unchecked((int)0x8010002B),
- SCARD_E_NO_SUCH_CERTIFICATE = unchecked((int)0x8010002C),
- SCARD_E_CERTIFICATE_UNAVAILABLE = unchecked((int)0x8010002D),
- SCARD_E_NO_READERS_AVAILABLE = unchecked((int)0x8010002E),
- SCARD_E_COMM_DATA_LOST = unchecked((int)0x8010002F),
- SCARD_E_NO_KEY_CONTAINER = unchecked((int)0x80100030),
- SCARD_E_SERVER_TOO_BUSY = unchecked((int)0x80100031),
- SCARD_W_UNSUPPORTED_CARD = unchecked((int)0x80100065),
- SCARD_W_UNRESPONSIVE_CARD = unchecked((int)0x80100066),
- SCARD_W_UNPOWERED_CARD = unchecked((int)0x80100067),
- SCARD_W_RESET_CARD = unchecked((int)0x80100068),
- SCARD_W_REMOVED_CARD = unchecked((int)0x80100069),
- SCARD_W_SECURITY_VIOLATION = unchecked((int)0x8010006A),
- SCARD_W_WRONG_CHV = unchecked((int)0x8010006B),
- SCARD_W_CHV_BLOCKED = unchecked((int)0x8010006C),
- SCARD_W_EOF = unchecked((int)0x8010006D),
- SCARD_W_CANCELLED_BY_USER = unchecked((int)0x8010006E),
- SCARD_W_CARD_NOT_AUTHENTICATED = unchecked((int)0x8010006F),
- COMADMIN_E_OBJECTERRORS = unchecked((int)0x80110401),
- COMADMIN_E_OBJECTINVALID = unchecked((int)0x80110402),
- COMADMIN_E_KEYMISSING = unchecked((int)0x80110403),
- COMADMIN_E_ALREADYINSTALLED = unchecked((int)0x80110404),
- COMADMIN_E_APP_FILE_WRITEFAIL = unchecked((int)0x80110407),
- COMADMIN_E_APP_FILE_READFAIL = unchecked((int)0x80110408),
- COMADMIN_E_APP_FILE_VERSION = unchecked((int)0x80110409),
- COMADMIN_E_BADPATH = unchecked((int)0x8011040A),
- COMADMIN_E_APPLICATIONEXISTS = unchecked((int)0x8011040B),
- COMADMIN_E_ROLEEXISTS = unchecked((int)0x8011040C),
- COMADMIN_E_CANTCOPYFILE = unchecked((int)0x8011040D),
- COMADMIN_E_NOUSER = unchecked((int)0x8011040F),
- COMADMIN_E_INVALIDUSERIDS = unchecked((int)0x80110410),
- COMADMIN_E_NOREGISTRYCLSID = unchecked((int)0x80110411),
- COMADMIN_E_BADREGISTRYPROGID = unchecked((int)0x80110412),
- COMADMIN_E_AUTHENTICATIONLEVEL = unchecked((int)0x80110413),
- COMADMIN_E_USERPASSWDNOTVALID = unchecked((int)0x80110414),
- COMADMIN_E_CLSIDORIIDMISMATCH = unchecked((int)0x80110418),
- COMADMIN_E_REMOTEINTERFACE = unchecked((int)0x80110419),
- COMADMIN_E_DLLREGISTERSERVER = unchecked((int)0x8011041A),
- COMADMIN_E_NOSERVERSHARE = unchecked((int)0x8011041B),
- COMADMIN_E_DLLLOADFAILED = unchecked((int)0x8011041D),
- COMADMIN_E_BADREGISTRYLIBID = unchecked((int)0x8011041E),
- COMADMIN_E_APPDIRNOTFOUND = unchecked((int)0x8011041F),
- COMADMIN_E_REGISTRARFAILED = unchecked((int)0x80110423),
- COMADMIN_E_COMPFILE_DOESNOTEXIST = unchecked((int)0x80110424),
- COMADMIN_E_COMPFILE_LOADDLLFAIL = unchecked((int)0x80110425),
- COMADMIN_E_COMPFILE_GETCLASSOBJ = unchecked((int)0x80110426),
- COMADMIN_E_COMPFILE_CLASSNOTAVAIL = unchecked((int)0x80110427),
- COMADMIN_E_COMPFILE_BADTLB = unchecked((int)0x80110428),
- COMADMIN_E_COMPFILE_NOTINSTALLABLE = unchecked((int)0x80110429),
- COMADMIN_E_NOTCHANGEABLE = unchecked((int)0x8011042A),
- COMADMIN_E_NOTDELETEABLE = unchecked((int)0x8011042B),
- COMADMIN_E_SESSION = unchecked((int)0x8011042C),
- COMADMIN_E_COMP_MOVE_LOCKED = unchecked((int)0x8011042D),
- COMADMIN_E_COMP_MOVE_BAD_DEST = unchecked((int)0x8011042E),
- COMADMIN_E_REGISTERTLB = unchecked((int)0x80110430),
- COMADMIN_E_SYSTEMAPP = unchecked((int)0x80110433),
- COMADMIN_E_COMPFILE_NOREGISTRAR = unchecked((int)0x80110434),
- COMADMIN_E_COREQCOMPINSTALLED = unchecked((int)0x80110435),
- COMADMIN_E_SERVICENOTINSTALLED = unchecked((int)0x80110436),
- COMADMIN_E_PROPERTYSAVEFAILED = unchecked((int)0x80110437),
- COMADMIN_E_OBJECTEXISTS = unchecked((int)0x80110438),
- COMADMIN_E_COMPONENTEXISTS = unchecked((int)0x80110439),
- COMADMIN_E_REGFILE_CORRUPT = unchecked((int)0x8011043B),
- COMADMIN_E_PROPERTY_OVERFLOW = unchecked((int)0x8011043C),
- COMADMIN_E_NOTINREGISTRY = unchecked((int)0x8011043E),
- COMADMIN_E_OBJECTNOTPOOLABLE = unchecked((int)0x8011043F),
- COMADMIN_E_APPLID_MATCHES_CLSID = unchecked((int)0x80110446),
- COMADMIN_E_ROLE_DOES_NOT_EXIST = unchecked((int)0x80110447),
- COMADMIN_E_START_APP_NEEDS_COMPONENTS = unchecked((int)0x80110448),
- COMADMIN_E_REQUIRES_DIFFERENT_PLATFORM = unchecked((int)0x80110449),
- COMADMIN_E_CAN_NOT_EXPORT_APP_PROXY = unchecked((int)0x8011044A),
- COMADMIN_E_CAN_NOT_START_APP = unchecked((int)0x8011044B),
- COMADMIN_E_CAN_NOT_EXPORT_SYS_APP = unchecked((int)0x8011044C),
- COMADMIN_E_CANT_SUBSCRIBE_TO_COMPONENT = unchecked((int)0x8011044D),
- COMADMIN_E_EVENTCLASS_CANT_BE_SUBSCRIBER = unchecked((int)0x8011044E),
- COMADMIN_E_LIB_APP_PROXY_INCOMPATIBLE = unchecked((int)0x8011044F),
- COMADMIN_E_BASE_PARTITION_ONLY = unchecked((int)0x80110450),
- COMADMIN_E_START_APP_DISABLED = unchecked((int)0x80110451),
- COMADMIN_E_CAT_DUPLICATE_PARTITION_NAME = unchecked((int)0x80110457),
- COMADMIN_E_CAT_INVALID_PARTITION_NAME = unchecked((int)0x80110458),
- COMADMIN_E_CAT_PARTITION_IN_USE = unchecked((int)0x80110459),
- COMADMIN_E_FILE_PARTITION_DUPLICATE_FILES = unchecked((int)0x8011045A),
- COMADMIN_E_CAT_IMPORTED_COMPONENTS_NOT_ALLOWED = unchecked((int)0x8011045B),
- COMADMIN_E_AMBIGUOUS_APPLICATION_NAME = unchecked((int)0x8011045C),
- COMADMIN_E_AMBIGUOUS_PARTITION_NAME = unchecked((int)0x8011045D),
- COMADMIN_E_REGDB_NOTINITIALIZED = unchecked((int)0x80110472),
- COMADMIN_E_REGDB_NOTOPEN = unchecked((int)0x80110473),
- COMADMIN_E_REGDB_SYSTEMERR = unchecked((int)0x80110474),
- COMADMIN_E_REGDB_ALREADYRUNNING = unchecked((int)0x80110475),
- COMADMIN_E_MIG_VERSIONNOTSUPPORTED = unchecked((int)0x80110480),
- COMADMIN_E_MIG_SCHEMANOTFOUND = unchecked((int)0x80110481),
- COMADMIN_E_CAT_BITNESSMISMATCH = unchecked((int)0x80110482),
- COMADMIN_E_CAT_UNACCEPTABLEBITNESS = unchecked((int)0x80110483),
- COMADMIN_E_CAT_WRONGAPPBITNESS = unchecked((int)0x80110484),
- COMADMIN_E_CAT_PAUSE_RESUME_NOT_SUPPORTED = unchecked((int)0x80110485),
- COMADMIN_E_CAT_SERVERFAULT = unchecked((int)0x80110486),
- COMQC_E_APPLICATION_NOT_QUEUED = unchecked((int)0x80110600),
- COMQC_E_NO_QUEUEABLE_INTERFACES = unchecked((int)0x80110601),
- COMQC_E_QUEUING_SERVICE_NOT_AVAILABLE = unchecked((int)0x80110602),
- COMQC_E_NO_IPERSISTSTREAM = unchecked((int)0x80110603),
- COMQC_E_BAD_MESSAGE = unchecked((int)0x80110604),
- COMQC_E_UNAUTHENTICATED = unchecked((int)0x80110605),
- COMQC_E_UNTRUSTED_ENQUEUER = unchecked((int)0x80110606),
- MSDTC_E_DUPLICATE_RESOURCE = unchecked((int)0x80110701),
- COMADMIN_E_OBJECT_PARENT_MISSING = unchecked((int)0x80110808),
- COMADMIN_E_OBJECT_DOES_NOT_EXIST = unchecked((int)0x80110809),
- COMADMIN_E_APP_NOT_RUNNING = unchecked((int)0x8011080A),
- COMADMIN_E_INVALID_PARTITION = unchecked((int)0x8011080B),
- COMADMIN_E_SVCAPP_NOT_POOLABLE_OR_RECYCLABLE = unchecked((int)0x8011080D),
- COMADMIN_E_USER_IN_SET = unchecked((int)0x8011080E),
- COMADMIN_E_CANTRECYCLELIBRARYAPPS = unchecked((int)0x8011080F),
- COMADMIN_E_CANTRECYCLESERVICEAPPS = unchecked((int)0x80110811),
- COMADMIN_E_PROCESSALREADYRECYCLED = unchecked((int)0x80110812),
- COMADMIN_E_PAUSEDPROCESSMAYNOTBERECYCLED = unchecked((int)0x80110813),
- COMADMIN_E_CANTMAKEINPROCSERVICE = unchecked((int)0x80110814),
- COMADMIN_E_PROGIDINUSEBYCLSID = unchecked((int)0x80110815),
- COMADMIN_E_DEFAULT_PARTITION_NOT_IN_SET = unchecked((int)0x80110816),
- COMADMIN_E_RECYCLEDPROCESSMAYNOTBEPAUSED = unchecked((int)0x80110817),
- COMADMIN_E_PARTITION_ACCESSDENIED = unchecked((int)0x80110818),
- COMADMIN_E_PARTITION_MSI_ONLY = unchecked((int)0x80110819),
- COMADMIN_E_LEGACYCOMPS_NOT_ALLOWED_IN_1_0_FORMAT = unchecked((int)0x8011081A),
- COMADMIN_E_LEGACYCOMPS_NOT_ALLOWED_IN_NONBASE_PARTITIONS = unchecked((int)0x8011081B),
- COMADMIN_E_COMP_MOVE_SOURCE = unchecked((int)0x8011081C),
- COMADMIN_E_COMP_MOVE_DEST = unchecked((int)0x8011081D),
- COMADMIN_E_COMP_MOVE_PRIVATE = unchecked((int)0x8011081E),
- COMADMIN_E_BASEPARTITION_REQUIRED_IN_SET = unchecked((int)0x8011081F),
- COMADMIN_E_CANNOT_ALIAS_EVENTCLASS = unchecked((int)0x80110820),
- COMADMIN_E_PRIVATE_ACCESSDENIED = unchecked((int)0x80110821),
- COMADMIN_E_SAFERINVALID = unchecked((int)0x80110822),
- COMADMIN_E_REGISTRY_ACCESSDENIED = unchecked((int)0x80110823),
- COMADMIN_E_PARTITIONS_DISABLED = unchecked((int)0x80110824),
- // Imported HRESULTs from CorError.h
- CEE_E_ENTRYPOINT = unchecked((int)0x80131000),
- CEE_E_CVTRES_NOT_FOUND = unchecked((int)0x80131001),
- MSEE_E_LOADLIBFAILED = unchecked((int)0x80131010),
- MSEE_E_GETPROCFAILED = unchecked((int)0x80131011),
- MSEE_E_MULTCOPIESLOADED = unchecked((int)0x80131012),
- COR_E_APPDOMAINUNLOADED = unchecked((int)0x80131014),
- COR_E_CANNOTUNLOADAPPDOMAIN = unchecked((int)0x80131015),
- MSEE_E_ASSEMBLYLOADINPROGRESS = unchecked((int)0x80131016),
- MSEE_E_CANNOTCREATEAPPDOMAIN = unchecked((int)0x80131017),
- COR_E_FIXUPSINEXE = unchecked((int)0x80131019),
- COR_E_NO_LOADLIBRARY_ALLOWED = unchecked((int)0x8013101A),
- COR_E_NEWER_RUNTIME = unchecked((int)0x8013101B),
- HOST_E_DEADLOCK = unchecked((int)0x80131020),
- HOST_E_INTERRUPTED = unchecked((int)0x80131021),
- HOST_E_INVALIDOPERATION = unchecked((int)0x80131022),
- HOST_E_CLRNOTAVAILABLE = unchecked((int)0x80131023),
- HOST_E_TIMEOUT = unchecked((int)0x80131024),
- HOST_E_NOT_OWNER = unchecked((int)0x80131025),
- HOST_E_ABANDONED = unchecked((int)0x80131026),
- HOST_E_EXITPROCESS_THREADABORT = unchecked((int)0x80131027),
- HOST_E_EXITPROCESS_ADUNLOAD = unchecked((int)0x80131028),
- HOST_E_EXITPROCESS_TIMEOUT = unchecked((int)0x80131029),
- HOST_E_EXITPROCESS_OUTOFMEMORY = unchecked((int)0x8013102a),
- HOST_E_EXITPROCESS_STACKOVERFLOW = unchecked((int)0x8013102b),
- COR_E_MODULE_HASH_CHECK_FAILED = unchecked((int)0x80131039),
- FUSION_E_REF_DEF_MISMATCH = unchecked((int)0x80131040),
- FUSION_E_INVALID_PRIVATE_ASM_LOCATION = unchecked((int)0x80131041),
- FUSION_E_ASM_MODULE_MISSING = unchecked((int)0x80131042),
- FUSION_E_UNEXPECTED_MODULE_FOUND = unchecked((int)0x80131043),
- FUSION_E_PRIVATE_ASM_DISALLOWED = unchecked((int)0x80131044),
- FUSION_E_SIGNATURE_CHECK_FAILED = unchecked((int)0x80131045),
- FUSION_E_DATABASE_ERROR = unchecked((int)0x80131046),
- FUSION_E_INVALID_NAME = unchecked((int)0x80131047),
- FUSION_E_CODE_DOWNLOAD_DISABLED = unchecked((int)0x80131048),
- FUSION_E_UNINSTALL_DISALLOWED = unchecked((int)0x80131049),
- FUSION_E_HOST_GAC_ASM_MISMATCH = unchecked((int)0x80131050),
- CLDB_E_FILE_BADREAD = unchecked((int)0x80131100),
- CLDB_E_FILE_BADWRITE = unchecked((int)0x80131101),
- CLDB_E_FILE_READONLY = unchecked((int)0x80131103),
- CLDB_E_NAME_ERROR = unchecked((int)0x80131105),
- CLDB_S_TRUNCATION = unchecked((int)0x00131106),
- CLDB_E_TRUNCATION = unchecked((int)0x80131106),
- CLDB_E_FILE_OLDVER = unchecked((int)0x80131107),
- CLDB_E_RELOCATED = unchecked((int)0x80131108),
- CLDB_S_NULL = unchecked((int)0x00131109),
- CLDB_E_SMDUPLICATE = unchecked((int)0x8013110A),
- CLDB_E_NO_DATA = unchecked((int)0x8013110B),
- CLDB_E_READONLY = unchecked((int)0x8013110C),
- CLDB_E_INCOMPATIBLE = unchecked((int)0x8013110D),
- CLDB_E_FILE_CORRUPT = unchecked((int)0x8013110E),
- CLDB_E_SCHEMA_VERNOTFOUND = unchecked((int)0x8013110F),
- CLDB_E_BADUPDATEMODE = unchecked((int)0x80131110),
- CLDB_E_INDEX_NONULLKEYS = unchecked((int)0x80131121),
- CLDB_E_INDEX_DUPLICATE = unchecked((int)0x80131122),
- CLDB_E_INDEX_BADTYPE = unchecked((int)0x80131123),
- CLDB_E_INDEX_NOTFOUND = unchecked((int)0x80131124),
- CLDB_S_INDEX_TABLESCANREQUIRED = unchecked((int)0x00131125),
- CLDB_E_RECORD_NOTFOUND = unchecked((int)0x80131130),
- CLDB_E_RECORD_OVERFLOW = unchecked((int)0x80131131),
- CLDB_E_RECORD_DUPLICATE = unchecked((int)0x80131132),
- CLDB_E_RECORD_PKREQUIRED = unchecked((int)0x80131133),
- CLDB_E_RECORD_DELETED = unchecked((int)0x80131134),
- CLDB_E_RECORD_OUTOFORDER = unchecked((int)0x80131135),
- CLDB_E_COLUMN_OVERFLOW = unchecked((int)0x80131140),
- CLDB_E_COLUMN_READONLY = unchecked((int)0x80131141),
- CLDB_E_COLUMN_SPECIALCOL = unchecked((int)0x80131142),
- CLDB_E_COLUMN_PKNONULLS = unchecked((int)0x80131143),
- CLDB_E_TABLE_CANTDROP = unchecked((int)0x80131150),
- CLDB_E_OBJECT_NOTFOUND = unchecked((int)0x80131151),
- CLDB_E_OBJECT_COLNOTFOUND = unchecked((int)0x80131152),
- CLDB_E_VECTOR_BADINDEX = unchecked((int)0x80131153),
- CLDB_E_TOO_BIG = unchecked((int)0x80131154),
- META_E_INVALID_TOKEN_TYPE = unchecked((int)0x8013115f),
- TLBX_E_INVALID_TYPEINFO = unchecked((int)0x80131160),
- TLBX_E_INVALID_TYPEINFO_UNNAMED = unchecked((int)0x80131161),
- TLBX_E_CTX_NESTED = unchecked((int)0x80131162),
- TLBX_E_ERROR_MESSAGE = unchecked((int)0x80131163),
- TLBX_E_CANT_SAVE = unchecked((int)0x80131164),
- TLBX_W_LIBNOTREGISTERED = unchecked((int)0x80131165),
- TLBX_E_CANTLOADLIBRARY = unchecked((int)0x80131166),
- TLBX_E_BAD_VT_TYPE = unchecked((int)0x80131167),
- TLBX_E_NO_MSCOREE_TLB = unchecked((int)0x80131168),
- TLBX_E_BAD_MSCOREE_TLB = unchecked((int)0x80131169),
- TLBX_E_TLB_EXCEPTION = unchecked((int)0x8013116a),
- TLBX_E_MULTIPLE_LCIDS = unchecked((int)0x8013116b),
- TLBX_I_TYPEINFO_IMPORTED = unchecked((int)0x0013116c),
- TLBX_E_AMBIGUOUS_RETURN = unchecked((int)0x8013116d),
- TLBX_E_DUPLICATE_TYPE_NAME = unchecked((int)0x8013116e),
- TLBX_I_USEIUNKNOWN = unchecked((int)0x0013116f),
- TLBX_I_UNCONVERTABLE_ARGS = unchecked((int)0x00131170),
- TLBX_I_UNCONVERTABLE_FIELD = unchecked((int)0x00131171),
- TLBX_I_NONSEQUENTIALSTRUCT = unchecked((int)0x80131172),
- TLBX_W_WARNING_MESSAGE = unchecked((int)0x00131173),
- TLBX_I_RESOLVEREFFAILED = unchecked((int)0x80131174),
- TLBX_E_ASANY = unchecked((int)0x80131175),
- TLBX_E_INVALIDLCIDPARAM = unchecked((int)0x80131176),
- TLBX_E_LCIDONDISPONLYITF = unchecked((int)0x80131177),
- TLBX_E_NONPUBLIC_FIELD = unchecked((int)0x80131178),
- TLBX_I_TYPE_EXPORTED = unchecked((int)0x00131179),
- TLBX_I_DUPLICATE_DISPID = unchecked((int)0x0013117A),
- TLBX_E_BAD_NAMES = unchecked((int)0x8013117B),
- TLBX_I_REF_TYPE_AS_STRUCT = unchecked((int)0x0013117C),
- TLBX_E_GENERICINST_SIGNATURE = unchecked((int)0x8013117D),
- TLBX_E_GENERICPAR_SIGNATURE = unchecked((int)0x8013117E),
- TLBX_I_GENERIC_TYPE = unchecked((int)0x0013117F),
- META_E_DUPLICATE = unchecked((int)0x80131180),
- META_E_GUID_REQUIRED = unchecked((int)0x80131181),
- META_E_TYPEDEF_MISMATCH = unchecked((int)0x80131182),
- META_E_MERGE_COLLISION = unchecked((int)0x80131183),
- TLBX_W_NON_INTEGRAL_CA_TYPE = unchecked((int)0x00131184),
- TLBX_W_IENUM_CA_ON_IUNK = unchecked((int)0x00131185),
- TLBX_E_NO_SAFEHANDLE_ARRAYS = unchecked((int)0x80131186),
- META_E_METHD_NOT_FOUND = unchecked((int)0x80131187),
- META_E_FIELD_NOT_FOUND = unchecked((int)0x80131188),
- META_S_PARAM_MISMATCH = unchecked((int)0x00131189),
- META_E_PARAM_MISMATCH = unchecked((int)0x80131189),
- META_E_BADMETADATA = unchecked((int)0x8013118A),
- META_E_INTFCEIMPL_NOT_FOUND = unchecked((int)0x8013118B),
- TLBX_E_NO_CRITICALHANDLE_ARRAYS = unchecked((int)0x8013118C),
- META_E_CLASS_LAYOUT_INCONSISTENT = unchecked((int)0x8013118D),
- META_E_FIELD_MARSHAL_NOT_FOUND = unchecked((int)0x8013118E),
- META_E_METHODSEM_NOT_FOUND = unchecked((int)0x8013118F),
- META_E_EVENT_NOT_FOUND = unchecked((int)0x80131190),
- META_E_PROP_NOT_FOUND = unchecked((int)0x80131191),
- META_E_BAD_SIGNATURE = unchecked((int)0x80131192),
- META_E_BAD_INPUT_PARAMETER = unchecked((int)0x80131193),
- META_E_METHDIMPL_INCONSISTENT = unchecked((int)0x80131194),
- META_E_MD_INCONSISTENCY = unchecked((int)0x80131195),
- META_E_CANNOTRESOLVETYPEREF = unchecked((int)0x80131196),
- META_S_DUPLICATE = unchecked((int)0x00131197),
- META_E_STRINGSPACE_FULL = unchecked((int)0x80131198),
- META_E_UNEXPECTED_REMAP = unchecked((int)0x80131199),
- META_E_HAS_UNMARKALL = unchecked((int)0x8013119A),
- META_E_MUST_CALL_UNMARKALL = unchecked((int)0x8013119B),
- META_E_GENERICPARAM_INCONSISTENT = unchecked((int)0x8013119C),
- META_E_EVENT_COUNTS = unchecked((int)0x8013119D),
- META_E_PROPERTY_COUNTS = unchecked((int)0x8013119E),
- META_E_TYPEDEF_MISSING = unchecked((int)0x8013119F),
- TLBX_E_CANT_LOAD_MODULE = unchecked((int)0x801311A0),
- TLBX_E_CANT_LOAD_CLASS = unchecked((int)0x801311A1),
- TLBX_E_NULL_MODULE = unchecked((int)0x801311A2),
- TLBX_E_NO_CLSID_KEY = unchecked((int)0x801311A3),
- TLBX_E_CIRCULAR_EXPORT = unchecked((int)0x801311A4),
- TLBX_E_CIRCULAR_IMPORT = unchecked((int)0x801311A5),
- TLBX_E_BAD_NATIVETYPE = unchecked((int)0x801311A6),
- TLBX_E_BAD_VTABLE = unchecked((int)0x801311A7),
- TLBX_E_CRM_NON_STATIC = unchecked((int)0x801311A8),
- TLBX_E_CRM_INVALID_SIG = unchecked((int)0x801311A9),
- TLBX_E_CLASS_LOAD_EXCEPTION = unchecked((int)0x801311AA),
- TLBX_E_UNKNOWN_SIGNATURE = unchecked((int)0x801311AB),
- TLBX_E_REFERENCED_TYPELIB = unchecked((int)0x801311AC),
- TLBX_S_REFERENCED_TYPELIB = unchecked((int)0x001311AC),
- TLBX_E_INVALID_NAMESPACE = unchecked((int)0x801311AD),
- TLBX_E_LAYOUT_ERROR = unchecked((int)0x801311AE),
- TLBX_E_NOTIUNKNOWN = unchecked((int)0x801311AF),
- TLBX_E_NONVISIBLEVALUECLASS = unchecked((int)0x801311B0),
- TLBX_E_LPTSTR_NOT_ALLOWED = unchecked((int)0x801311B1),
- TLBX_E_AUTO_CS_NOT_ALLOWED = unchecked((int)0x801311B2),
- TLBX_S_NOSTDINTERFACE = unchecked((int)0x001311B3),
- TLBX_S_DUPLICATE_DISPID = unchecked((int)0x001311B4),
- TLBX_E_ENUM_VALUE_INVALID = unchecked((int)0x801311B5),
- TLBX_E_DUPLICATE_IID = unchecked((int)0x801311B6),
- TLBX_E_NO_NESTED_ARRAYS = unchecked((int)0x801311B7),
- TLBX_E_PARAM_ERROR_NAMED = unchecked((int)0x801311B8),
- TLBX_E_PARAM_ERROR_UNNAMED = unchecked((int)0x801311B9),
- TLBX_E_AGNOST_SIGNATURE = unchecked((int)0x801311BA),
- TLBX_E_CONVERT_FAIL = unchecked((int)0x801311BB),
- TLBX_W_DUAL_NOT_DISPATCH = unchecked((int)0x801311BC),
- TLBX_E_BAD_SIGNATURE = unchecked((int)0x801311BD),
- TLBX_E_ARRAY_NEEDS_NT_FIXED = unchecked((int)0x801311BE),
- TLBX_E_CLASS_NEEDS_NT_INTF = unchecked((int)0x801311BF),
- META_E_CA_INVALID_TARGET = unchecked((int)0x801311C0),
- META_E_CA_INVALID_VALUE = unchecked((int)0x801311C1),
- META_E_CA_INVALID_BLOB = unchecked((int)0x801311C2),
- META_E_CA_REPEATED_ARG = unchecked((int)0x801311C3),
- META_E_CA_UNKNOWN_ARGUMENT = unchecked((int)0x801311C4),
- META_E_CA_VARIANT_NYI = unchecked((int)0x801311C5),
- META_E_CA_ARRAY_NYI = unchecked((int)0x801311C6),
- META_E_CA_UNEXPECTED_TYPE = unchecked((int)0x801311C7),
- META_E_CA_INVALID_ARGTYPE = unchecked((int)0x801311C8),
- META_E_CA_INVALID_ARG_FOR_TYPE = unchecked((int)0x801311C9),
- META_E_CA_INVALID_UUID = unchecked((int)0x801311CA),
- META_E_CA_INVALID_MARSHALAS_FIELDS = unchecked((int)0x801311CB),
- META_E_CA_NT_FIELDONLY = unchecked((int)0x801311CC),
- META_E_CA_NEGATIVE_PARAMINDEX = unchecked((int)0x801311CD),
- META_E_CA_NEGATIVE_MULTIPLIER = unchecked((int)0x801311CE),
- META_E_CA_NEGATIVE_CONSTSIZE = unchecked((int)0x801311CF),
- META_E_CA_FIXEDSTR_SIZE_REQUIRED = unchecked((int)0x801311D0),
- META_E_CA_CUSTMARSH_TYPE_REQUIRED = unchecked((int)0x801311D1),
- META_E_CA_FILENAME_REQUIRED = unchecked((int)0x801311D2),
- TLBX_W_NO_PROPS_IN_EVENTS = unchecked((int)0x801311D3),
- META_E_NOT_IN_ENC_MODE = unchecked((int)0x801311D4),
- TLBX_W_ENUM_VALUE_TOOBIG = unchecked((int)0x001311D5),
- META_E_METHOD_COUNTS = unchecked((int)0x801311D6),
- META_E_FIELD_COUNTS = unchecked((int)0x801311D7),
- META_E_PARAM_COUNTS = unchecked((int)0x801311D8),
- TLBX_W_EXPORTING_AUTO_LAYOUT = unchecked((int)0x001311D9),
- TLBX_E_TYPED_REF = unchecked((int)0x801311DA),
- TLBX_W_DEFAULT_INTF_NOT_VISIBLE = unchecked((int)0x001311DB),
- TLBX_W_BAD_SAFEARRAYFIELD_NO_ELEMENTVT = unchecked((int)0x001311DE),
- TLBX_W_LAYOUTCLASS_AS_INTERFACE = unchecked((int)0x001311DF),
- TLBX_I_GENERIC_BASE_TYPE = unchecked((int)0x001311E0),
- TLBX_E_BITNESS_MISMATCH = unchecked((int)0x801311E1),
- VLDTR_S_WRN = unchecked((int)0x00131200),
- VLDTR_S_ERR = unchecked((int)0x00131201),
- VLDTR_S_WRNERR = unchecked((int)0x00131202),
- VLDTR_E_RID_OUTOFRANGE = unchecked((int)0x80131203),
- VLDTR_E_CDTKN_OUTOFRANGE = unchecked((int)0x80131204),
- VLDTR_E_CDRID_OUTOFRANGE = unchecked((int)0x80131205),
- VLDTR_E_STRING_INVALID = unchecked((int)0x80131206),
- VLDTR_E_GUID_INVALID = unchecked((int)0x80131207),
- VLDTR_E_BLOB_INVALID = unchecked((int)0x80131208),
- VLDTR_E_MOD_MULTI = unchecked((int)0x80131209),
- VLDTR_E_MOD_NULLMVID = unchecked((int)0x8013120A),
- VLDTR_E_TR_NAMENULL = unchecked((int)0x8013120B),
- VLDTR_E_TR_DUP = unchecked((int)0x8013120C),
- VLDTR_E_TD_NAMENULL = unchecked((int)0x8013120D),
- VLDTR_E_TD_DUPNAME = unchecked((int)0x8013120E),
- VLDTR_E_TD_DUPGUID = unchecked((int)0x8013120F),
- VLDTR_E_TD_NOTIFACEOBJEXTNULL = unchecked((int)0x80131210),
- VLDTR_E_TD_OBJEXTENDSNONNULL = unchecked((int)0x80131211),
- VLDTR_E_TD_EXTENDSSEALED = unchecked((int)0x80131212),
- VLDTR_E_TD_DLTNORTSPCL = unchecked((int)0x80131213),
- VLDTR_E_TD_RTSPCLNOTDLT = unchecked((int)0x80131214),
- VLDTR_E_MI_DECLPRIV = unchecked((int)0x80131215),
- VLDTR_E_AS_BADNAME = unchecked((int)0x80131216),
- VLDTR_E_FILE_SYSNAME = unchecked((int)0x80131217),
- VLDTR_E_MI_BODYSTATIC = unchecked((int)0x80131218),
- VLDTR_E_TD_IFACENOTABS = unchecked((int)0x80131219),
- VLDTR_E_TD_IFACEPARNOTNIL = unchecked((int)0x8013121A),
- VLDTR_E_TD_IFACEGUIDNULL = unchecked((int)0x8013121B),
- VLDTR_E_MI_DECLFINAL = unchecked((int)0x8013121C),
- VLDTR_E_TD_VTNOTSEAL = unchecked((int)0x8013121D),
- VLDTR_E_PD_BADFLAGS = unchecked((int)0x8013121E),
- VLDTR_E_IFACE_DUP = unchecked((int)0x8013121F),
- VLDTR_E_MR_NAMENULL = unchecked((int)0x80131220),
- VLDTR_E_MR_VTBLNAME = unchecked((int)0x80131221),
- VLDTR_E_MR_DELNAME = unchecked((int)0x80131222),
- VLDTR_E_MR_PARNIL = unchecked((int)0x80131223),
- VLDTR_E_MR_BADCALLINGCONV = unchecked((int)0x80131224),
- VLDTR_E_MR_NOTVARARG = unchecked((int)0x80131225),
- VLDTR_E_MR_NAMEDIFF = unchecked((int)0x80131226),
- VLDTR_E_MR_SIGDIFF = unchecked((int)0x80131227),
- VLDTR_E_MR_DUP = unchecked((int)0x80131228),
- VLDTR_E_CL_TDAUTO = unchecked((int)0x80131229),
- VLDTR_E_CL_BADPCKSZ = unchecked((int)0x8013122A),
- VLDTR_E_CL_DUP = unchecked((int)0x8013122B),
- VLDTR_E_FL_BADOFFSET = unchecked((int)0x8013122C),
- VLDTR_E_FL_TDNIL = unchecked((int)0x8013122D),
- VLDTR_E_FL_NOCL = unchecked((int)0x8013122E),
- VLDTR_E_FL_TDNOTEXPLCT = unchecked((int)0x8013122F),
- VLDTR_E_FL_FLDSTATIC = unchecked((int)0x80131230),
- VLDTR_E_FL_DUP = unchecked((int)0x80131231),
- VLDTR_E_MODREF_NAMENULL = unchecked((int)0x80131232),
- VLDTR_E_MODREF_DUP = unchecked((int)0x80131233),
- VLDTR_E_TR_BADSCOPE = unchecked((int)0x80131234),
- VLDTR_E_TD_NESTEDNOENCL = unchecked((int)0x80131235),
- VLDTR_E_TD_EXTTRRES = unchecked((int)0x80131236),
- VLDTR_E_SIGNULL = unchecked((int)0x80131237),
- VLDTR_E_SIGNODATA = unchecked((int)0x80131238),
- VLDTR_E_MD_BADCALLINGCONV = unchecked((int)0x80131239),
- VLDTR_E_MD_THISSTATIC = unchecked((int)0x8013123A),
- VLDTR_E_MD_NOTTHISNOTSTATIC = unchecked((int)0x8013123B),
- VLDTR_E_MD_NOARGCNT = unchecked((int)0x8013123C),
- VLDTR_E_SIG_MISSELTYPE = unchecked((int)0x8013123D),
- VLDTR_E_SIG_MISSTKN = unchecked((int)0x8013123E),
- VLDTR_E_SIG_TKNBAD = unchecked((int)0x8013123F),
- VLDTR_E_SIG_MISSFPTR = unchecked((int)0x80131240),
- VLDTR_E_SIG_MISSFPTRARGCNT = unchecked((int)0x80131241),
- VLDTR_E_SIG_MISSRANK = unchecked((int)0x80131242),
- VLDTR_E_SIG_MISSNSIZE = unchecked((int)0x80131243),
- VLDTR_E_SIG_MISSSIZE = unchecked((int)0x80131244),
- VLDTR_E_SIG_MISSNLBND = unchecked((int)0x80131245),
- VLDTR_E_SIG_MISSLBND = unchecked((int)0x80131246),
- VLDTR_E_SIG_BADELTYPE = unchecked((int)0x80131247),
- VLDTR_E_SIG_MISSVASIZE = unchecked((int)0x80131248),
- VLDTR_E_FD_BADCALLINGCONV = unchecked((int)0x80131249),
- VLDTR_E_MD_NAMENULL = unchecked((int)0x8013124A),
- VLDTR_E_MD_PARNIL = unchecked((int)0x8013124B),
- VLDTR_E_MD_DUP = unchecked((int)0x8013124C),
- VLDTR_E_FD_NAMENULL = unchecked((int)0x8013124D),
- VLDTR_E_FD_PARNIL = unchecked((int)0x8013124E),
- VLDTR_E_FD_DUP = unchecked((int)0x8013124F),
- VLDTR_E_AS_MULTI = unchecked((int)0x80131250),
- VLDTR_E_AS_NAMENULL = unchecked((int)0x80131251),
- VLDTR_E_SIG_TOKTYPEMISMATCH = unchecked((int)0x80131252),
- VLDTR_E_CL_TDINTF = unchecked((int)0x80131253),
- VLDTR_E_ASOS_OSPLTFRMIDINVAL = unchecked((int)0x80131254),
- VLDTR_E_AR_NAMENULL = unchecked((int)0x80131255),
- VLDTR_E_TD_ENCLNOTNESTED = unchecked((int)0x80131256),
- VLDTR_E_AROS_OSPLTFRMIDINVAL = unchecked((int)0x80131257),
- VLDTR_E_FILE_NAMENULL = unchecked((int)0x80131258),
- VLDTR_E_CT_NAMENULL = unchecked((int)0x80131259),
- VLDTR_E_TD_EXTENDSCHILD = unchecked((int)0x8013125A),
- VLDTR_E_MAR_NAMENULL = unchecked((int)0x8013125B),
- VLDTR_E_FILE_DUP = unchecked((int)0x8013125C),
- VLDTR_E_FILE_NAMEFULLQLFD = unchecked((int)0x8013125D),
- VLDTR_E_CT_DUP = unchecked((int)0x8013125E),
- VLDTR_E_MAR_DUP = unchecked((int)0x8013125F),
- VLDTR_E_MAR_NOTPUBPRIV = unchecked((int)0x80131260),
- VLDTR_E_TD_ENUMNOVALUE = unchecked((int)0x80131261),
- VLDTR_E_TD_ENUMVALSTATIC = unchecked((int)0x80131262),
- VLDTR_E_TD_ENUMVALNOTSN = unchecked((int)0x80131263),
- VLDTR_E_TD_ENUMFLDNOTST = unchecked((int)0x80131264),
- VLDTR_E_TD_ENUMFLDNOTLIT = unchecked((int)0x80131265),
- VLDTR_E_TD_ENUMNOLITFLDS = unchecked((int)0x80131266),
- VLDTR_E_TD_ENUMFLDSIGMISMATCH = unchecked((int)0x80131267),
- VLDTR_E_TD_ENUMVALNOT1ST = unchecked((int)0x80131268),
- VLDTR_E_FD_NOTVALUERTSN = unchecked((int)0x80131269),
- VLDTR_E_FD_VALUEPARNOTENUM = unchecked((int)0x8013126A),
- VLDTR_E_FD_INSTINIFACE = unchecked((int)0x8013126B),
- VLDTR_E_FD_NOTPUBINIFACE = unchecked((int)0x8013126C),
- VLDTR_E_FMD_GLOBALNOTPUBPRIVSC = unchecked((int)0x8013126D),
- VLDTR_E_FMD_GLOBALNOTSTATIC = unchecked((int)0x8013126E),
- VLDTR_E_FD_GLOBALNORVA = unchecked((int)0x8013126F),
- VLDTR_E_MD_CTORZERORVA = unchecked((int)0x80131270),
- VLDTR_E_FD_MARKEDNOMARSHAL = unchecked((int)0x80131271),
- VLDTR_E_FD_MARSHALNOTMARKED = unchecked((int)0x80131272),
- VLDTR_E_FD_MARKEDNODEFLT = unchecked((int)0x80131273),
- VLDTR_E_FD_DEFLTNOTMARKED = unchecked((int)0x80131274),
- VLDTR_E_FMD_MARKEDNOSECUR = unchecked((int)0x80131275),
- VLDTR_E_FMD_SECURNOTMARKED = unchecked((int)0x80131276),
- VLDTR_E_FMD_PINVOKENOTSTATIC = unchecked((int)0x80131277),
- VLDTR_E_FMD_MARKEDNOPINVOKE = unchecked((int)0x80131278),
- VLDTR_E_FMD_PINVOKENOTMARKED = unchecked((int)0x80131279),
- VLDTR_E_FMD_BADIMPLMAP = unchecked((int)0x8013127A),
- VLDTR_E_IMAP_BADMODREF = unchecked((int)0x8013127B),
- VLDTR_E_IMAP_BADMEMBER = unchecked((int)0x8013127C),
- VLDTR_E_IMAP_BADIMPORTNAME = unchecked((int)0x8013127D),
- VLDTR_E_IMAP_BADCALLCONV = unchecked((int)0x8013127E),
- VLDTR_E_FMD_BADACCESSFLAG = unchecked((int)0x8013127F),
- VLDTR_E_FD_INITONLYANDLITERAL = unchecked((int)0x80131280),
- VLDTR_E_FD_LITERALNOTSTATIC = unchecked((int)0x80131281),
- VLDTR_E_FMD_RTSNNOTSN = unchecked((int)0x80131282),
- VLDTR_E_MD_ABSTPARNOTABST = unchecked((int)0x80131283),
- VLDTR_E_MD_NOTSTATABSTININTF = unchecked((int)0x80131284),
- VLDTR_E_MD_NOTPUBININTF = unchecked((int)0x80131285),
- VLDTR_E_MD_CTORININTF = unchecked((int)0x80131286),
- VLDTR_E_MD_GLOBALCTORCCTOR = unchecked((int)0x80131287),
- VLDTR_E_MD_CTORSTATIC = unchecked((int)0x80131288),
- VLDTR_E_MD_CTORNOTSNRTSN = unchecked((int)0x80131289),
- VLDTR_E_MD_CTORVIRT = unchecked((int)0x8013128A),
- VLDTR_E_MD_CTORABST = unchecked((int)0x8013128B),
- VLDTR_E_MD_CCTORNOTSTATIC = unchecked((int)0x8013128C),
- VLDTR_E_MD_ZERORVA = unchecked((int)0x8013128D),
- VLDTR_E_MD_FINNOTVIRT = unchecked((int)0x8013128E),
- VLDTR_E_MD_STATANDFINORVIRT = unchecked((int)0x8013128F),
- VLDTR_E_MD_ABSTANDFINAL = unchecked((int)0x80131290),
- VLDTR_E_MD_ABSTANDIMPL = unchecked((int)0x80131291),
- VLDTR_E_MD_ABSTANDPINVOKE = unchecked((int)0x80131292),
- VLDTR_E_MD_ABSTNOTVIRT = unchecked((int)0x80131293),
- VLDTR_E_MD_NOTABSTNOTIMPL = unchecked((int)0x80131294),
- VLDTR_E_MD_NOTABSTBADFLAGSRVA = unchecked((int)0x80131295),
- VLDTR_E_MD_PRIVSCOPENORVA = unchecked((int)0x80131296),
- VLDTR_E_MD_GLOBALABSTORVIRT = unchecked((int)0x80131297),
- VLDTR_E_SIG_LONGFORM = unchecked((int)0x80131298),
- VLDTR_E_MD_MULTIPLESEMANTICS = unchecked((int)0x80131299),
- VLDTR_E_MD_INVALIDSEMANTICS = unchecked((int)0x8013129A),
- VLDTR_E_MD_SEMANTICSNOTEXIST = unchecked((int)0x8013129B),
- VLDTR_E_MI_DECLNOTVIRT = unchecked((int)0x8013129C),
- VLDTR_E_FMD_GLOBALITEM = unchecked((int)0x8013129D),
- VLDTR_E_MD_MULTSEMANTICFLAGS = unchecked((int)0x8013129E),
- VLDTR_E_MD_NOSEMANTICFLAGS = unchecked((int)0x8013129F),
- VLDTR_E_FD_FLDINIFACE = unchecked((int)0x801312A0),
- VLDTR_E_AS_HASHALGID = unchecked((int)0x801312A1),
- VLDTR_E_AS_PROCID = unchecked((int)0x801312A2),
- VLDTR_E_AR_PROCID = unchecked((int)0x801312A3),
- VLDTR_E_CN_PARENTRANGE = unchecked((int)0x801312A4),
- VLDTR_E_AS_BADFLAGS = unchecked((int)0x801312A5),
- VLDTR_E_TR_HASTYPEDEF = unchecked((int)0x801312A6),
- VLDTR_E_IFACE_BADIMPL = unchecked((int)0x801312A7),
- VLDTR_E_IFACE_BADIFACE = unchecked((int)0x801312A8),
- VLDTR_E_TD_SECURNOTMARKED = unchecked((int)0x801312A9),
- VLDTR_E_TD_MARKEDNOSECUR = unchecked((int)0x801312AA),
- VLDTR_E_MD_CCTORHASARGS = unchecked((int)0x801312AB),
- VLDTR_E_CT_BADIMPL = unchecked((int)0x801312AC),
- VLDTR_E_MI_ALIENBODY = unchecked((int)0x801312AD),
- VLDTR_E_MD_CCTORCALLCONV = unchecked((int)0x801312AE),
- VLDTR_E_MI_BADCLASS = unchecked((int)0x801312AF),
- VLDTR_E_MI_CLASSISINTF = unchecked((int)0x801312B0),
- VLDTR_E_MI_BADDECL = unchecked((int)0x801312B1),
- VLDTR_E_MI_BADBODY = unchecked((int)0x801312B2),
- VLDTR_E_MI_DUP = unchecked((int)0x801312B3),
- VLDTR_E_FD_BADPARENT = unchecked((int)0x801312B4),
- VLDTR_E_MD_PARAMOUTOFSEQ = unchecked((int)0x801312B5),
- VLDTR_E_MD_PARASEQTOOBIG = unchecked((int)0x801312B6),
- VLDTR_E_MD_PARMMARKEDNOMARSHAL = unchecked((int)0x801312B7),
- VLDTR_E_MD_PARMMARSHALNOTMARKED = unchecked((int)0x801312B8),
- VLDTR_E_MD_PARMMARKEDNODEFLT = unchecked((int)0x801312BA),
- VLDTR_E_MD_PARMDEFLTNOTMARKED = unchecked((int)0x801312BB),
- VLDTR_E_PR_BADSCOPE = unchecked((int)0x801312BC),
- VLDTR_E_PR_NONAME = unchecked((int)0x801312BD),
- VLDTR_E_PR_NOSIG = unchecked((int)0x801312BE),
- VLDTR_E_PR_DUP = unchecked((int)0x801312BF),
- VLDTR_E_PR_BADCALLINGCONV = unchecked((int)0x801312C0),
- VLDTR_E_PR_MARKEDNODEFLT = unchecked((int)0x801312C1),
- VLDTR_E_PR_DEFLTNOTMARKED = unchecked((int)0x801312C2),
- VLDTR_E_PR_BADSEMANTICS = unchecked((int)0x801312C3),
- VLDTR_E_PR_BADMETHOD = unchecked((int)0x801312C4),
- VLDTR_E_PR_ALIENMETHOD = unchecked((int)0x801312C5),
- VLDTR_E_CN_BLOBNOTNULL = unchecked((int)0x801312C6),
- VLDTR_E_CN_BLOBNULL = unchecked((int)0x801312C7),
- VLDTR_E_EV_BADSCOPE = unchecked((int)0x801312C8),
- VLDTR_E_EV_NONAME = unchecked((int)0x801312CA),
- VLDTR_E_EV_DUP = unchecked((int)0x801312CB),
- VLDTR_E_EV_BADEVTYPE = unchecked((int)0x801312CC),
- VLDTR_E_EV_EVTYPENOTCLASS = unchecked((int)0x801312CD),
- VLDTR_E_EV_BADSEMANTICS = unchecked((int)0x801312CE),
- VLDTR_E_EV_BADMETHOD = unchecked((int)0x801312CF),
- VLDTR_E_EV_ALIENMETHOD = unchecked((int)0x801312D0),
- VLDTR_E_EV_NOADDON = unchecked((int)0x801312D1),
- VLDTR_E_EV_NOREMOVEON = unchecked((int)0x801312D2),
- VLDTR_E_CT_DUPTDNAME = unchecked((int)0x801312D3),
- VLDTR_E_MAR_BADOFFSET = unchecked((int)0x801312D4),
- VLDTR_E_DS_BADOWNER = unchecked((int)0x801312D5),
- VLDTR_E_DS_BADFLAGS = unchecked((int)0x801312D6),
- VLDTR_E_DS_NOBLOB = unchecked((int)0x801312D7),
- VLDTR_E_MAR_BADIMPL = unchecked((int)0x801312D8),
- VLDTR_E_MR_VARARGCALLINGCONV = unchecked((int)0x801312DA),
- VLDTR_E_MD_CTORNOTVOID = unchecked((int)0x801312DB),
- VLDTR_E_EV_FIRENOTVOID = unchecked((int)0x801312DC),
- VLDTR_E_AS_BADLOCALE = unchecked((int)0x801312DD),
- VLDTR_E_CN_PARENTTYPE = unchecked((int)0x801312DE),
- VLDTR_E_SIG_SENTINMETHODDEF = unchecked((int)0x801312DF),
- VLDTR_E_SIG_SENTMUSTVARARG = unchecked((int)0x801312E0),
- VLDTR_E_SIG_MULTSENTINELS = unchecked((int)0x801312E1),
- VLDTR_E_SIG_LASTSENTINEL = unchecked((int)0x801312E2),
- VLDTR_E_SIG_MISSARG = unchecked((int)0x801312E3),
- VLDTR_E_SIG_BYREFINFIELD = unchecked((int)0x801312E4),
- VLDTR_E_MD_SYNCMETHODINVTYPE = unchecked((int)0x801312E5),
- VLDTR_E_TD_NAMETOOLONG = unchecked((int)0x801312E6),
- VLDTR_E_AS_PROCDUP = unchecked((int)0x801312E7),
- VLDTR_E_ASOS_DUP = unchecked((int)0x801312E8),
- VLDTR_E_MAR_BADFLAGS = unchecked((int)0x801312E9),
- VLDTR_E_CT_NOTYPEDEFID = unchecked((int)0x801312EA),
- VLDTR_E_FILE_BADFLAGS = unchecked((int)0x801312EB),
- VLDTR_E_FILE_NULLHASH = unchecked((int)0x801312EC),
- VLDTR_E_MOD_NONAME = unchecked((int)0x801312ED),
- VLDTR_E_MOD_NAMEFULLQLFD = unchecked((int)0x801312EE),
- VLDTR_E_TD_RTSPCLNOTSPCL = unchecked((int)0x801312EF),
- VLDTR_E_TD_EXTENDSIFACE = unchecked((int)0x801312F0),
- VLDTR_E_MD_CTORPINVOKE = unchecked((int)0x801312F1),
- VLDTR_E_TD_SYSENUMNOTCLASS = unchecked((int)0x801312F2),
- VLDTR_E_TD_SYSENUMNOTEXTVTYPE = unchecked((int)0x801312F3),
- VLDTR_E_MI_SIGMISMATCH = unchecked((int)0x801312F4),
- VLDTR_E_TD_ENUMHASMETHODS = unchecked((int)0x801312F5),
- VLDTR_E_TD_ENUMIMPLIFACE = unchecked((int)0x801312F6),
- VLDTR_E_TD_ENUMHASPROP = unchecked((int)0x801312F7),
- VLDTR_E_TD_ENUMHASEVENT = unchecked((int)0x801312F8),
- VLDTR_E_TD_BADMETHODLST = unchecked((int)0x801312F9),
- VLDTR_E_TD_BADFIELDLST = unchecked((int)0x801312FA),
- VLDTR_E_CN_BADTYPE = unchecked((int)0x801312FB),
- VLDTR_E_TD_ENUMNOINSTFLD = unchecked((int)0x801312FC),
- VLDTR_E_TD_ENUMMULINSTFLD = unchecked((int)0x801312FD),
- VLDTR_E_INTERRUPTED = unchecked((int)0x801312FE),
- VLDTR_E_NOTINIT = unchecked((int)0x801312FF),
- VLDTR_E_IFACE_NOTIFACE = unchecked((int)0x80131B00),
- VLDTR_E_FD_RVAHASNORVA = unchecked((int)0x80131B01),
- VLDTR_E_FD_RVAHASZERORVA = unchecked((int)0x80131B02),
- VLDTR_E_MD_RVAANDIMPLMAP = unchecked((int)0x80131B03),
- VLDTR_E_TD_EXTRAFLAGS = unchecked((int)0x80131B04),
- VLDTR_E_TD_EXTENDSITSELF = unchecked((int)0x80131B05),
- VLDTR_E_TD_SYSVTNOTEXTOBJ = unchecked((int)0x80131B06),
- VLDTR_E_TD_EXTTYPESPEC = unchecked((int)0x80131B07),
- VLDTR_E_TD_VTNOSIZE = unchecked((int)0x80131B09),
- VLDTR_E_TD_IFACESEALED = unchecked((int)0x80131B0A),
- VLDTR_E_NC_BADNESTED = unchecked((int)0x80131B0B),
- VLDTR_E_NC_BADENCLOSER = unchecked((int)0x80131B0C),
- VLDTR_E_NC_DUP = unchecked((int)0x80131B0D),
- VLDTR_E_NC_DUPENCLOSER = unchecked((int)0x80131B0E),
- VLDTR_E_FRVA_ZERORVA = unchecked((int)0x80131B0F),
- VLDTR_E_FRVA_BADFIELD = unchecked((int)0x80131B10),
- VLDTR_E_FRVA_DUPRVA = unchecked((int)0x80131B11),
- VLDTR_E_FRVA_DUPFIELD = unchecked((int)0x80131B12),
- VLDTR_E_EP_BADTOKEN = unchecked((int)0x80131B13),
- VLDTR_E_EP_INSTANCE = unchecked((int)0x80131B14),
- VLDTR_E_TD_ENUMFLDBADTYPE = unchecked((int)0x80131B15),
- VLDTR_E_MD_BADRVA = unchecked((int)0x80131B16),
- VLDTR_E_FD_LITERALNODEFAULT = unchecked((int)0x80131B17),
- VLDTR_E_IFACE_METHNOTIMPL = unchecked((int)0x80131B18),
- VLDTR_E_CA_BADPARENT = unchecked((int)0x80131B19),
- VLDTR_E_CA_BADTYPE = unchecked((int)0x80131B1A),
- VLDTR_E_CA_NOTCTOR = unchecked((int)0x80131B1B),
- VLDTR_E_CA_BADSIG = unchecked((int)0x80131B1C),
- VLDTR_E_CA_NOSIG = unchecked((int)0x80131B1D),
- VLDTR_E_CA_BADPROLOG = unchecked((int)0x80131B1E),
- VLDTR_E_MD_BADLOCALSIGTOK = unchecked((int)0x80131B1F),
- VLDTR_E_MD_BADHEADER = unchecked((int)0x80131B20),
- VLDTR_E_EP_TOOMANYARGS = unchecked((int)0x80131B21),
- VLDTR_E_EP_BADRET = unchecked((int)0x80131B22),
- VLDTR_E_EP_BADARG = unchecked((int)0x80131B23),
- VLDTR_E_SIG_BADVOID = unchecked((int)0x80131B24),
- VLDTR_E_IFACE_METHMULTIMPL = unchecked((int)0x80131B25),
- VLDTR_E_GP_NAMENULL = unchecked((int)0x80131B26),
- VLDTR_E_GP_OWNERNIL = unchecked((int)0x80131B27),
- VLDTR_E_GP_DUPNAME = unchecked((int)0x80131B28),
- VLDTR_E_GP_DUPNUMBER = unchecked((int)0x80131B29),
- VLDTR_E_GP_NONSEQ_BY_OWNER = unchecked((int)0x80131B2A),
- VLDTR_E_GP_NONSEQ_BY_NUMBER = unchecked((int)0x80131B2B),
- VLDTR_E_GP_UNEXPECTED_OWNER_FOR_VARIANT_VAR = unchecked((int)0x80131B2C),
- VLDTR_E_GP_ILLEGAL_VARIANT_MVAR = unchecked((int)0x80131B2D),
- VLDTR_E_GP_ILLEGAL_VARIANCE_FLAGS = unchecked((int)0x80131B2E),
- VLDTR_E_GP_REFANDVALUETYPE = unchecked((int)0x80131B2F),
- VLDTR_E_GPC_OWNERNIL = unchecked((int)0x80131B30),
- VLDTR_E_GPC_DUP = unchecked((int)0x80131B31),
- VLDTR_E_GPC_NONCONTIGUOUS = unchecked((int)0x80131B32),
- VLDTR_E_MS_METHODNIL = unchecked((int)0x80131B33),
- VLDTR_E_MS_DUP = unchecked((int)0x80131B34),
- VLDTR_E_MS_BADCALLINGCONV = unchecked((int)0x80131B35),
- VLDTR_E_MS_MISSARITY = unchecked((int)0x80131B36),
- VLDTR_E_MS_MISSARG = unchecked((int)0x80131B37),
- VLDTR_E_MS_ARITYMISMATCH = unchecked((int)0x80131B38),
- VLDTR_E_MS_METHODNOTGENERIC = unchecked((int)0x80131B39),
- VLDTR_E_SIG_MISSARITY = unchecked((int)0x80131B3A),
- VLDTR_E_SIG_ARITYMISMATCH = unchecked((int)0x80131B3B),
- VLDTR_E_MD_GENERIC_CCTOR = unchecked((int)0x80131B3C),
- VLDTR_E_MD_GENERIC_CTOR = unchecked((int)0x80131B3D),
- VLDTR_E_MD_GENERIC_IMPORT = unchecked((int)0x80131B3E),
- VLDTR_E_MD_GENERIC_BADCALLCONV = unchecked((int)0x80131B3F),
- VLDTR_E_MD_GENERIC_GLOBAL = unchecked((int)0x80131B40),
- VLDTR_E_EP_GENERIC_METHOD = unchecked((int)0x80131B41),
- VLDTR_E_MD_MISSARITY = unchecked((int)0x80131B42),
- VLDTR_E_MD_ARITYZERO = unchecked((int)0x80131B43),
- VLDTR_E_SIG_ARITYZERO = unchecked((int)0x80131B44),
- VLDTR_E_MS_ARITYZERO = unchecked((int)0x80131B45),
- VLDTR_E_MD_GPMISMATCH = unchecked((int)0x80131B46),
- VLDTR_E_EP_GENERIC_TYPE = unchecked((int)0x80131B47),
- VLDTR_E_MI_DECLNOTGENERIC = unchecked((int)0x80131B48),
- VLDTR_E_MI_IMPLNOTGENERIC = unchecked((int)0x80131B49),
- VLDTR_E_MI_ARITYMISMATCH = unchecked((int)0x80131B4A),
- VLDTR_E_TD_EXTBADTYPESPEC = unchecked((int)0x80131B4B),
- VLDTR_E_SIG_BYREFINST = unchecked((int)0x80131B4C),
- VLDTR_E_MS_BYREFINST = unchecked((int)0x80131B4D),
- VLDTR_E_TS_EMPTY = unchecked((int)0x80131B4E),
- VLDTR_E_TS_HASSENTINALS = unchecked((int)0x80131B4F),
- VLDTR_E_TD_GENERICHASEXPLAYOUT = unchecked((int)0x80131B50),
- VLDTR_E_SIG_BADTOKTYPE = unchecked((int)0x80131B51),
- VLDTR_E_IFACE_METHNOTIMPLTHISMOD = unchecked((int)0x80131B52),
- CORDBG_E_UNRECOVERABLE_ERROR = unchecked((int)0x80131300),
- CORDBG_E_PROCESS_TERMINATED = unchecked((int)0x80131301),
- CORDBG_E_PROCESS_NOT_SYNCHRONIZED = unchecked((int)0x80131302),
- CORDBG_E_CLASS_NOT_LOADED = unchecked((int)0x80131303),
- CORDBG_E_IL_VAR_NOT_AVAILABLE = unchecked((int)0x80131304),
- CORDBG_E_BAD_REFERENCE_VALUE = unchecked((int)0x80131305),
- CORDBG_E_FIELD_NOT_AVAILABLE = unchecked((int)0x80131306),
- CORDBG_E_NON_NATIVE_FRAME = unchecked((int)0x80131307),
- CORDBG_E_NONCONTINUABLE_EXCEPTION = unchecked((int)0x80131308),
- CORDBG_E_CODE_NOT_AVAILABLE = unchecked((int)0x80131309),
- CORDBG_E_FUNCTION_NOT_IL = unchecked((int)0x8013130A),
- CORDBG_S_BAD_START_SEQUENCE_POINT = unchecked((int)0x0013130B),
- CORDBG_S_BAD_END_SEQUENCE_POINT = unchecked((int)0x0013130C),
- CORDBG_S_INSUFFICIENT_INFO_FOR_SET_IP = unchecked((int)0x0013130D),
- CORDBG_E_CANT_SET_IP_INTO_FINALLY = unchecked((int)0x8013130E),
- CORDBG_E_CANT_SET_IP_OUT_OF_FINALLY = unchecked((int)0x8013130F),
- CORDBG_E_CANT_SET_IP_INTO_CATCH = unchecked((int)0x80131310),
- CORDBG_E_SET_IP_NOT_ALLOWED_ON_NONLEAF_FRAME = unchecked((int)0x80131311),
- CORDBG_E_SET_IP_IMPOSSIBLE = unchecked((int)0x80131312),
- CORDBG_E_FUNC_EVAL_BAD_START_POINT = unchecked((int)0x80131313),
- CORDBG_E_INVALID_OBJECT = unchecked((int)0x80131314),
- CORDBG_E_FUNC_EVAL_NOT_COMPLETE = unchecked((int)0x80131315),
- CORDBG_S_FUNC_EVAL_HAS_NO_RESULT = unchecked((int)0x00131316),
- CORDBG_S_VALUE_POINTS_TO_VOID = unchecked((int)0x00131317),
- CORDBG_E_INPROC_NOT_IMPL = unchecked((int)0x80131318),
- CORDBG_S_FUNC_EVAL_ABORTED = unchecked((int)0x00131319),
- CORDBG_E_STATIC_VAR_NOT_AVAILABLE = unchecked((int)0x8013131A),
- CORDBG_E_OBJECT_IS_NOT_COPYABLE_VALUE_CLASS = unchecked((int)0x8013131B),
- CORDBG_E_CANT_SETIP_INTO_OR_OUT_OF_FILTER = unchecked((int)0x8013131C),
- CORDBG_E_CANT_CHANGE_JIT_SETTING_FOR_ZAP_MODULE = unchecked((int)0x8013131D),
- CORDBG_E_CANT_SET_IP_OUT_OF_FINALLY_ON_WIN64 = unchecked((int)0x8013131E),
- CORDBG_E_CANT_SET_IP_OUT_OF_CATCH_ON_WIN64 = unchecked((int)0x8013131F),
- CORDBG_E_REMOTE_CONNECTION_CONN_RESET = unchecked((int)0x80131320),
- CORDBG_E_REMOTE_CONNECTION_KEEP_ALIVE = unchecked((int)0x80131321),
- CORDBG_E_REMOTE_CONNECTION_FATAL_ERROR = unchecked((int)0x80131322),
- CORDBG_E_CANT_SET_TO_JMC = unchecked((int)0x80131323),
- CORDBG_E_BAD_THREAD_STATE = unchecked((int)0x8013132d),
- CORDBG_E_DEBUGGER_ALREADY_ATTACHED = unchecked((int)0x8013132e),
- CORDBG_E_SUPERFLOUS_CONTINUE = unchecked((int)0x8013132f),
- CORDBG_E_SET_VALUE_NOT_ALLOWED_ON_NONLEAF_FRAME = unchecked((int)0x80131330),
- CORDBG_E_ENC_EH_MAX_NESTING_LEVEL_CANT_INCREASE = unchecked((int)0x80131331),
- CORDBG_E_ENC_MODULE_NOT_ENC_ENABLED = unchecked((int)0x80131332),
- CORDBG_E_SET_IP_NOT_ALLOWED_ON_EXCEPTION = unchecked((int)0x80131333),
- CORDBG_E_VARIABLE_IS_ACTUALLY_LITERAL = unchecked((int)0x80131334),
- CORDBG_E_PROCESS_DETACHED = unchecked((int)0x80131335),
- CORDBG_E_ENC_METHOD_SIG_CHANGED = unchecked((int)0x80131336),
- CORDBG_E_ENC_METHOD_NO_LOCAL_SIG = unchecked((int)0x80131337),
- CORDBG_E_ENC_CANT_ADD_FIELD_TO_VALUE_OR_LAYOUT_CLASS = unchecked((int)0x80131338),
- CORDBG_E_ENC_CANT_CHANGE_FIELD = unchecked((int)0x80131339),
- CORDBG_E_ENC_CANT_ADD_NON_PRIVATE_MEMBER = unchecked((int)0x8013133A),
- CORDBG_E_FIELD_NOT_STATIC = unchecked((int)0x8013133B),
- CORDBG_E_FIELD_NOT_INSTANCE = unchecked((int)0x8013133C),
- CORDBG_E_ENC_ZAPPED_WITHOUT_ENC = unchecked((int)0x8013133D),
- CORDBG_E_ENC_BAD_METHOD_INFO = unchecked((int)0x8013133E),
- CORDBG_E_ENC_JIT_CANT_UPDATE = unchecked((int)0x8013133F),
- CORDBG_E_ENC_MISSING_CLASS = unchecked((int)0x80131340),
- CORDBG_E_ENC_INTERNAL_ERROR = unchecked((int)0x80131341),
- CORDBG_E_ENC_HANGING_FIELD = unchecked((int)0x80131342),
- CORDBG_E_MODULE_NOT_LOADED = unchecked((int)0x80131343),
- CORDBG_E_ENC_CANT_CHANGE_SUPERCLASS = unchecked((int)0x80131344),
- CORDBG_E_UNABLE_TO_SET_BREAKPOINT = unchecked((int)0x80131345),
- CORDBG_E_DEBUGGING_NOT_POSSIBLE = unchecked((int)0x80131346),
- CORDBG_E_KERNEL_DEBUGGER_ENABLED = unchecked((int)0x80131347),
- CORDBG_E_KERNEL_DEBUGGER_PRESENT = unchecked((int)0x80131348),
- CORDBG_E_HELPER_THREAD_DEAD = unchecked((int)0x80131349),
- CORDBG_E_INTERFACE_INHERITANCE_CANT_CHANGE = unchecked((int)0x8013134A),
- CORDBG_E_INCOMPATIBLE_PROTOCOL = unchecked((int)0x8013134B),
- CORDBG_E_TOO_MANY_PROCESSES = unchecked((int)0x8013134C),
- CORDBG_E_INTEROP_NOT_SUPPORTED = unchecked((int)0x8013134D),
- CORDBG_E_NO_REMAP_BREAKPIONT = unchecked((int)0x8013134E),
- CORDBG_E_OBJECT_NEUTERED = unchecked((int)0x8013134F),
- CORPROF_E_FUNCTION_NOT_COMPILED = unchecked((int)0x80131350),
- CORPROF_E_DATAINCOMPLETE = unchecked((int)0x80131351),
- CORPROF_E_NOT_REJITABLE_METHODS = unchecked((int)0x80131352),
- CORPROF_E_CANNOT_UPDATE_METHOD = unchecked((int)0x80131353),
- CORPROF_E_FUNCTION_NOT_IL = unchecked((int)0x80131354),
- CORPROF_E_NOT_MANAGED_THREAD = unchecked((int)0x80131355),
- CORPROF_E_CALL_ONLY_FROM_INIT = unchecked((int)0x80131356),
- CORPROF_E_INPROC_NOT_ENABLED = unchecked((int)0x80131357),
- CORPROF_E_JITMAPS_NOT_ENABLED = unchecked((int)0x80131358),
- CORPROF_E_INPROC_ALREADY_BEGUN = unchecked((int)0x80131359),
- CORPROF_E_INPROC_NOT_AVAILABLE = unchecked((int)0x8013135A),
- CORPROF_E_NOT_YET_AVAILABLE = unchecked((int)0x8013135B),
- CORPROF_E_TYPE_IS_PARAMETERIZED = unchecked((int)0x8013135C),
- CORPROF_E_FUNCTION_IS_PARAMETERIZED = unchecked((int)0x8013135D),
- SECURITY_E_XML_TO_ASN_ENCODING = unchecked((int)0x80131400),
- SECURITY_E_INCOMPATIBLE_SHARE = unchecked((int)0x80131401),
- SECURITY_E_UNVERIFIABLE = unchecked((int)0x80131402),
- SECURITY_E_INCOMPATIBLE_EVIDENCE = unchecked((int)0x80131403),
- CLDB_E_INTERNALERROR = unchecked((int)0x80131fff),
- CORSEC_E_DECODE_SET = unchecked((int)0x80131410),
- CORSEC_E_ENCODE_SET = unchecked((int)0x80131411),
- CORSEC_E_UNSUPPORTED_FORMAT = unchecked((int)0x80131412),
- SN_CRYPTOAPI_CALL_FAILED = unchecked((int)0x80131413),
- CORSEC_E_CRYPTOAPI_CALL_FAILED = unchecked((int)0x80131413),
- SN_NO_SUITABLE_CSP = unchecked((int)0x80131414),
- CORSEC_E_NO_SUITABLE_CSP = unchecked((int)0x80131414),
- CORSEC_E_INVALID_ATTR = unchecked((int)0x80131415),
- CORSEC_E_POLICY_EXCEPTION = unchecked((int)0x80131416),
- CORSEC_E_MIN_GRANT_FAIL = unchecked((int)0x80131417),
- CORSEC_E_NO_EXEC_PERM = unchecked((int)0x80131418),
- CORSEC_E_XMLSYNTAX = unchecked((int)0x80131419),
- CORSEC_E_INVALID_STRONGNAME = unchecked((int)0x8013141a),
- CORSEC_E_MISSING_STRONGNAME = unchecked((int)0x8013141b),
- CORSEC_E_CONTAINER_NOT_FOUND = unchecked((int)0x8013141c),
- CORSEC_E_INVALID_IMAGE_FORMAT = unchecked((int)0x8013141d),
- CORSEC_E_INVALID_PUBLICKEY = unchecked((int)0x8013141e),
- CORSEC_E_SIGNATURE_MISMATCH = unchecked((int)0x80131420),
- CORSEC_E_CRYPTO = unchecked((int)0x80131430),
- CORSEC_E_CRYPTO_UNEX_OPER = unchecked((int)0x80131431),
- CORSECATTR_E_BAD_ATTRIBUTE = unchecked((int)0x8013143a),
- CORSECATTR_E_MISSING_CONSTRUCTOR = unchecked((int)0x8013143b),
- CORSECATTR_E_FAILED_TO_CREATE_PERM = unchecked((int)0x8013143c),
- CORSECATTR_E_BAD_ACTION_ASM = unchecked((int)0x8013143d),
- CORSECATTR_E_BAD_ACTION_OTHER = unchecked((int)0x8013143e),
- CORSECATTR_E_BAD_PARENT = unchecked((int)0x8013143f),
- CORSECATTR_E_TRUNCATED = unchecked((int)0x80131440),
- CORSECATTR_E_BAD_VERSION = unchecked((int)0x80131441),
- CORSECATTR_E_BAD_ACTION = unchecked((int)0x80131442),
- CORSECATTR_E_NO_SELF_REF = unchecked((int)0x80131443),
- CORSECATTR_E_BAD_NONCAS = unchecked((int)0x80131444),
- CORSECATTR_E_ASSEMBLY_LOAD_FAILED = unchecked((int)0x80131445),
- CORSECATTR_E_ASSEMBLY_LOAD_FAILED_EX = unchecked((int)0x80131446),
- CORSECATTR_E_TYPE_LOAD_FAILED = unchecked((int)0x80131447),
- CORSECATTR_E_TYPE_LOAD_FAILED_EX = unchecked((int)0x80131448),
- CORSECATTR_E_ABSTRACT = unchecked((int)0x80131449),
- CORSECATTR_E_UNSUPPORTED_TYPE = unchecked((int)0x8013144a),
- CORSECATTR_E_UNSUPPORTED_ENUM_TYPE = unchecked((int)0x8013144b),
- CORSECATTR_E_NO_FIELD = unchecked((int)0x8013144c),
- CORSECATTR_E_NO_PROPERTY = unchecked((int)0x8013144d),
- CORSECATTR_E_EXCEPTION = unchecked((int)0x8013144e),
- CORSECATTR_E_EXCEPTION_HR = unchecked((int)0x8013144f),
- ISS_E_ISOSTORE = unchecked((int)0x80131450),
- ISS_E_OPEN_STORE_FILE = unchecked((int)0x80131460),
- ISS_E_OPEN_FILE_MAPPING = unchecked((int)0x80131461),
- ISS_E_MAP_VIEW_OF_FILE = unchecked((int)0x80131462),
- ISS_E_GET_FILE_SIZE = unchecked((int)0x80131463),
- ISS_E_CREATE_MUTEX = unchecked((int)0x80131464),
- ISS_E_LOCK_FAILED = unchecked((int)0x80131465),
- ISS_E_FILE_WRITE = unchecked((int)0x80131466),
- ISS_E_SET_FILE_POINTER = unchecked((int)0x80131467),
- ISS_E_CREATE_DIR = unchecked((int)0x80131468),
- ISS_E_STORE_NOT_OPEN = unchecked((int)0x80131469),
- ISS_E_CORRUPTED_STORE_FILE = unchecked((int)0x80131480),
- ISS_E_STORE_VERSION = unchecked((int)0x80131481),
- ISS_E_FILE_NOT_MAPPED = unchecked((int)0x80131482),
- ISS_E_BLOCK_SIZE_TOO_SMALL = unchecked((int)0x80131483),
- ISS_E_ALLOC_TOO_LARGE = unchecked((int)0x80131484),
- ISS_E_USAGE_WILL_EXCEED_QUOTA = unchecked((int)0x80131485),
- ISS_E_TABLE_ROW_NOT_FOUND = unchecked((int)0x80131486),
- ISS_E_DEPRECATE = unchecked((int)0x801314A0),
- ISS_E_CALLER = unchecked((int)0x801314A1),
- ISS_E_PATH_LENGTH = unchecked((int)0x801314A2),
- ISS_E_MACHINE = unchecked((int)0x801314A3),
- ISS_E_MACHINE_DACL = unchecked((int)0x801314A4),
- ISS_E_ISOSTORE_START = unchecked((int)0x80131450),
- ISS_E_ISOSTORE_END = unchecked((int)0x801314FF),
- COR_E_APPLICATION = unchecked((int)0x80131600),
- COR_E_ARGUMENT = unchecked((int)0x80070057),
- COR_E_ARGUMENTOUTOFRANGE = unchecked((int)0x80131502),
- COR_E_ARITHMETIC = unchecked((int)0x80070216),
- COR_E_ARRAYTYPEMISMATCH = unchecked((int)0x80131503),
- COR_E_CONTEXTMARSHAL = unchecked((int)0x80131504),
- COR_E_TIMEOUT = unchecked((int)0x80131505),
- COR_E_KEYNOTFOUND = unchecked((int)0x80131577),
- COR_E_DEVICESNOTSUPPORTED = unchecked((int)0x80131540),
- COR_E_DIVIDEBYZERO = unchecked((int)0x80020012),
- COR_E_EXCEPTION = unchecked((int)0x80131500),
- COR_E_EXECUTIONENGINE = unchecked((int)0x80131506),
- COR_E_FIELDACCESS = unchecked((int)0x80131507),
- COR_E_FORMAT = unchecked((int)0x80131537),
- COR_E_BADIMAGEFORMAT = unchecked((int)0x8007000B),
- COR_E_ASSEMBLYEXPECTED = unchecked((int)0x80131018),
- COR_E_TYPEUNLOADED = unchecked((int)0x80131013),
- COR_E_INDEXOUTOFRANGE = unchecked((int)0x80131508),
- COR_E_INVALIDCAST = unchecked((int)0x80004002),
- COR_E_INVALIDOPERATION = unchecked((int)0x80131509),
- COR_E_INVALIDPROGRAM = unchecked((int)0x8013153A),
- COR_E_MEMBERACCESS = unchecked((int)0x8013151A),
- COR_E_METHODACCESS = unchecked((int)0x80131510),
- COR_E_MISSINGFIELD = unchecked((int)0x80131511),
- COR_E_MISSINGMANIFESTRESOURCE = unchecked((int)0x80131532),
- COR_E_MISSINGMEMBER = unchecked((int)0x80131512),
- COR_E_MISSINGMETHOD = unchecked((int)0x80131513),
- COR_E_MISSINGSATELLITEASSEMBLY = unchecked((int)0x80131536),
- COR_E_MULTICASTNOTSUPPORTED = unchecked((int)0x80131514),
- COR_E_NOTFINITENUMBER = unchecked((int)0x80131528),
- COR_E_DUPLICATEWAITOBJECT = unchecked((int)0x80131529),
- COR_E_PLATFORMNOTSUPPORTED = unchecked((int)0x80131539),
- COR_E_NOTSUPPORTED = unchecked((int)0x80131515),
- COR_E_NULLREFERENCE = unchecked((int)0x80004003),
- COR_E_OUTOFMEMORY = unchecked((int)0x8007000E),
- COR_E_OVERFLOW = unchecked((int)0x80131516),
- COR_E_RANK = unchecked((int)0x80131517),
- COR_E_REMOTING = unchecked((int)0x8013150B),
- COR_E_SERVER = unchecked((int)0x8013150E),
- COR_E_SERVICEDCOMPONENT = unchecked((int)0x8013150F),
- COR_E_SECURITY = unchecked((int)0x8013150A),
- COR_E_SERIALIZATION = unchecked((int)0x8013150C),
- COR_E_STACKOVERFLOW = unchecked((int)0x800703E9),
- COR_E_SYNCHRONIZATIONLOCK = unchecked((int)0x80131518),
- COR_E_SYSTEM = unchecked((int)0x80131501),
- COR_E_THREADABORTED = unchecked((int)0x80131530),
- COR_E_OPERATIONCANCELED = unchecked((int)0x8013153B),
- COR_E_NOTCANCELABLE = unchecked((int)0x8013153C),
- COR_E_THREADINTERRUPTED = unchecked((int)0x80131519),
- COR_E_THREADSTATE = unchecked((int)0x80131520),
- COR_E_THREADSTOP = unchecked((int)0x80131521),
- COR_E_TYPEINITIALIZATION = unchecked((int)0x80131534),
- COR_E_TYPELOAD = unchecked((int)0x80131522),
- COR_E_ENTRYPOINTNOTFOUND = unchecked((int)0x80131523),
- COR_E_DLLNOTFOUND = unchecked((int)0x80131524),
- COR_E_UNAUTHORIZEDACCESS = unchecked((int)0x80070005),
- COR_E_VERIFICATION = unchecked((int)0x8013150D),
- COR_E_INVALIDCOMOBJECT = unchecked((int)0x80131527),
- COR_E_COMOBJECTINUSE = unchecked((int)0x8013152A),
- COR_E_SEMAPHOREFULL = unchecked((int)0x8013152B),
- COR_E_WAITHANDLECANNOTBEOPENED = unchecked((int)0x8013152C),
- COR_E_ABANDONEDMUTEX = unchecked((int)0x8013152D),
- COR_E_MARSHALDIRECTIVE = unchecked((int)0x80131535),
- COR_E_INVALIDOLEVARIANTTYPE = unchecked((int)0x80131531),
- COR_E_SAFEARRAYTYPEMISMATCH = unchecked((int)0x80131533),
- COR_E_SAFEARRAYRANKMISMATCH = unchecked((int)0x80131538),
- COR_E_DATAMISALIGNED = unchecked((int)0x80131541),
- COR_E_TARGETPARAMCOUNT = unchecked((int)0x8002000E),
- COR_E_AMBIGUOUSMATCH = unchecked((int)0x8000211D),
- COR_E_INVALIDFILTERCRITERIA = unchecked((int)0x80131601),
- COR_E_REFLECTIONTYPELOAD = unchecked((int)0x80131602),
- COR_E_TARGET = unchecked((int)0x80131603),
- COR_E_TARGETINVOCATION = unchecked((int)0x80131604),
- COR_E_CUSTOMATTRIBUTEFORMAT = unchecked((int)0x80131605),
- COR_E_FILELOAD = unchecked((int)0x80131621),
- COR_E_IO = unchecked((int)0x80131620),
- COR_E_OBJECTDISPOSED = unchecked((int)0x80131622),
- COR_E_HOSTPROTECTION = unchecked((int)0x80131640),
- COR_E_FAILFAST = unchecked((int)0x80131623),
- CLR_E_SHIM_RUNTIMELOAD = unchecked((int)0x80131700),
- CLR_E_SHIM_RUNTIMEEXPORT = unchecked((int)0x80131701),
- CLR_E_SHIM_INSTALLROOT = unchecked((int)0x80131702),
- CLR_E_SHIM_INSTALLCOMP = unchecked((int)0x80131703),
- VER_E_HRESULT = unchecked((int)0x80131801),
- VER_E_OFFSET = unchecked((int)0x80131802),
- VER_E_OPCODE = unchecked((int)0x80131803),
- VER_E_OPERAND = unchecked((int)0x80131804),
- VER_E_TOKEN = unchecked((int)0x80131805),
- VER_E_EXCEPT = unchecked((int)0x80131806),
- VER_E_STACK_SLOT = unchecked((int)0x80131807),
- VER_E_LOC = unchecked((int)0x80131808),
- VER_E_ARG = unchecked((int)0x80131809),
- VER_E_FOUND = unchecked((int)0x8013180A),
- VER_E_EXPECTED = unchecked((int)0x8013180B),
- VER_E_LOC_BYNAME = unchecked((int)0x8013180C),
- VER_E_UNKNOWN_OPCODE = unchecked((int)0x80131810),
- VER_E_SIG_CALLCONV = unchecked((int)0x80131811),
- VER_E_SIG_ELEMTYPE = unchecked((int)0x80131812),
- VER_E_RET_SIG = unchecked((int)0x80131814),
- VER_E_FIELD_SIG = unchecked((int)0x80131815),
- VER_E_INTERNAL = unchecked((int)0x80131818),
- VER_E_STACK_TOO_LARGE = unchecked((int)0x80131819),
- VER_E_ARRAY_NAME_LONG = unchecked((int)0x8013181A),
- VER_E_FALLTHRU = unchecked((int)0x80131820),
- VER_E_TRY_GTEQ_END = unchecked((int)0x80131821),
- VER_E_TRYEND_GT_CS = unchecked((int)0x80131822),
- VER_E_HND_GTEQ_END = unchecked((int)0x80131823),
- VER_E_HNDEND_GT_CS = unchecked((int)0x80131824),
- VER_E_FLT_GTEQ_CS = unchecked((int)0x80131825),
- VER_E_TRY_START = unchecked((int)0x80131826),
- VER_E_HND_START = unchecked((int)0x80131827),
- VER_E_FLT_START = unchecked((int)0x80131828),
- VER_E_TRY_OVERLAP = unchecked((int)0x80131829),
- VER_E_TRY_EQ_HND_FIL = unchecked((int)0x8013182A),
- VER_E_TRY_SHARE_FIN_FAL = unchecked((int)0x8013182B),
- VER_E_HND_OVERLAP = unchecked((int)0x8013182C),
- VER_E_HND_EQ = unchecked((int)0x8013182D),
- VER_E_FIL_OVERLAP = unchecked((int)0x8013182E),
- VER_E_FIL_EQ = unchecked((int)0x8013182F),
- VER_E_FIL_CONT_TRY = unchecked((int)0x80131830),
- VER_E_FIL_CONT_HND = unchecked((int)0x80131831),
- VER_E_FIL_CONT_FIL = unchecked((int)0x80131832),
- VER_E_FIL_GTEQ_CS = unchecked((int)0x80131833),
- VER_E_FIL_START = unchecked((int)0x80131834),
- VER_E_FALLTHRU_EXCEP = unchecked((int)0x80131835),
- VER_E_FALLTHRU_INTO_HND = unchecked((int)0x80131836),
- VER_E_FALLTHRU_INTO_FIL = unchecked((int)0x80131837),
- VER_E_LEAVE = unchecked((int)0x80131838),
- VER_E_RETHROW = unchecked((int)0x80131839),
- VER_E_ENDFINALLY = unchecked((int)0x8013183A),
- VER_E_ENDFILTER = unchecked((int)0x8013183B),
- VER_E_ENDFILTER_MISSING = unchecked((int)0x8013183C),
- VER_E_BR_INTO_TRY = unchecked((int)0x8013183D),
- VER_E_BR_INTO_HND = unchecked((int)0x8013183E),
- VER_E_BR_INTO_FIL = unchecked((int)0x8013183F),
- VER_E_BR_OUTOF_TRY = unchecked((int)0x80131840),
- VER_E_BR_OUTOF_HND = unchecked((int)0x80131841),
- VER_E_BR_OUTOF_FIL = unchecked((int)0x80131842),
- VER_E_BR_OUTOF_FIN = unchecked((int)0x80131843),
- VER_E_RET_FROM_TRY = unchecked((int)0x80131844),
- VER_E_RET_FROM_HND = unchecked((int)0x80131845),
- VER_E_RET_FROM_FIL = unchecked((int)0x80131846),
- VER_E_BAD_JMP_TARGET = unchecked((int)0x80131847),
- VER_E_PATH_LOC = unchecked((int)0x80131848),
- VER_E_PATH_THIS = unchecked((int)0x80131849),
- VER_E_PATH_STACK = unchecked((int)0x8013184A),
- VER_E_PATH_STACK_DEPTH = unchecked((int)0x8013184B),
- VER_E_THIS = unchecked((int)0x8013184C),
- VER_E_THIS_UNINIT_EXCEP = unchecked((int)0x8013184D),
- VER_E_THIS_UNINIT_STORE = unchecked((int)0x8013184E),
- VER_E_THIS_UNINIT_RET = unchecked((int)0x8013184F),
- VER_E_THIS_UNINIT_V_RET = unchecked((int)0x80131850),
- VER_E_THIS_UNINIT_BR = unchecked((int)0x80131851),
- VER_E_LDFTN_CTOR = unchecked((int)0x80131852),
- VER_E_STACK_NOT_EQ = unchecked((int)0x80131853),
- VER_E_STACK_UNEXPECTED = unchecked((int)0x80131854),
- VER_E_STACK_EXCEPTION = unchecked((int)0x80131855),
- VER_E_STACK_OVERFLOW = unchecked((int)0x80131856),
- VER_E_STACK_UNDERFLOW = unchecked((int)0x80131857),
- VER_E_STACK_EMPTY = unchecked((int)0x80131858),
- VER_E_STACK_UNINIT = unchecked((int)0x80131859),
- VER_E_STACK_I_I4_I8 = unchecked((int)0x8013185A),
- VER_E_STACK_R_R4_R8 = unchecked((int)0x8013185B),
- VER_E_STACK_NO_R_I8 = unchecked((int)0x8013185C),
- VER_E_STACK_NUMERIC = unchecked((int)0x8013185D),
- VER_E_STACK_OBJREF = unchecked((int)0x8013185E),
- VER_E_STACK_P_OBJREF = unchecked((int)0x8013185F),
- VER_E_STACK_BYREF = unchecked((int)0x80131860),
- VER_E_STACK_METHOD = unchecked((int)0x80131861),
- VER_E_STACK_ARRAY_SD = unchecked((int)0x80131862),
- VER_E_STACK_VALCLASS = unchecked((int)0x80131863),
- VER_E_STACK_P_VALCLASS = unchecked((int)0x80131864),
- VER_E_STACK_NO_VALCLASS = unchecked((int)0x80131865),
- VER_E_LOC_DEAD = unchecked((int)0x80131866),
- VER_E_LOC_NUM = unchecked((int)0x80131867),
- VER_E_ARG_NUM = unchecked((int)0x80131868),
- VER_E_TOKEN_RESOLVE = unchecked((int)0x80131869),
- VER_E_TOKEN_TYPE = unchecked((int)0x8013186A),
- VER_E_TOKEN_TYPE_MEMBER = unchecked((int)0x8013186B),
- VER_E_TOKEN_TYPE_FIELD = unchecked((int)0x8013186C),
- VER_E_TOKEN_TYPE_SIG = unchecked((int)0x8013186D),
- VER_E_UNVERIFIABLE = unchecked((int)0x8013186E),
- VER_E_LDSTR_OPERAND = unchecked((int)0x8013186F),
- VER_E_RET_PTR_TO_STACK = unchecked((int)0x80131870),
- VER_E_RET_VOID = unchecked((int)0x80131871),
- VER_E_RET_MISSING = unchecked((int)0x80131872),
- VER_E_RET_EMPTY = unchecked((int)0x80131873),
- VER_E_RET_UNINIT = unchecked((int)0x80131874),
- VER_E_ARRAY_ACCESS = unchecked((int)0x80131875),
- VER_E_ARRAY_V_STORE = unchecked((int)0x80131876),
- VER_E_ARRAY_SD = unchecked((int)0x80131877),
- VER_E_ARRAY_SD_PTR = unchecked((int)0x80131878),
- VER_E_ARRAY_FIELD = unchecked((int)0x80131879),
- VER_E_ARGLIST = unchecked((int)0x8013187A),
- VER_E_VALCLASS = unchecked((int)0x8013187B),
- VER_E_METHOD_ACCESS = unchecked((int)0x8013187C),
- VER_E_FIELD_ACCESS = unchecked((int)0x8013187D),
- VER_E_DEAD = unchecked((int)0x8013187E),
- VER_E_FIELD_STATIC = unchecked((int)0x8013187F),
- VER_E_FIELD_NO_STATIC = unchecked((int)0x80131880),
- VER_E_ADDR = unchecked((int)0x80131881),
- VER_E_ADDR_BYREF = unchecked((int)0x80131882),
- VER_E_ADDR_LITERAL = unchecked((int)0x80131883),
- VER_E_INITONLY = unchecked((int)0x80131884),
- VER_E_THROW = unchecked((int)0x80131885),
- VER_E_CALLVIRT_VALCLASS = unchecked((int)0x80131886),
- VER_E_CALL_SIG = unchecked((int)0x80131887),
- VER_E_CALL_STATIC = unchecked((int)0x80131888),
- VER_E_CTOR = unchecked((int)0x80131889),
- VER_E_CTOR_VIRT = unchecked((int)0x8013188A),
- VER_E_CTOR_OR_SUPER = unchecked((int)0x8013188B),
- VER_E_CTOR_MUL_INIT = unchecked((int)0x8013188C),
- VER_E_SIG = unchecked((int)0x8013188D),
- VER_E_SIG_ARRAY = unchecked((int)0x8013188E),
- VER_E_SIG_ARRAY_PTR = unchecked((int)0x8013188F),
- VER_E_SIG_ARRAY_BYREF = unchecked((int)0x80131890),
- VER_E_SIG_ELEM_PTR = unchecked((int)0x80131891),
- VER_E_SIG_VARARG = unchecked((int)0x80131892),
- VER_E_SIG_VOID = unchecked((int)0x80131893),
- VER_E_SIG_BYREF_BYREF = unchecked((int)0x80131894),
- VER_E_CODE_SIZE_ZERO = unchecked((int)0x80131896),
- VER_E_BAD_VARARG = unchecked((int)0x80131897),
- VER_E_TAIL_CALL = unchecked((int)0x80131898),
- VER_E_TAIL_BYREF = unchecked((int)0x80131899),
- VER_E_TAIL_RET = unchecked((int)0x8013189A),
- VER_E_TAIL_RET_VOID = unchecked((int)0x8013189B),
- VER_E_TAIL_RET_TYPE = unchecked((int)0x8013189C),
- VER_E_TAIL_STACK_EMPTY = unchecked((int)0x8013189D),
- VER_E_METHOD_END = unchecked((int)0x8013189E),
- VER_E_BAD_BRANCH = unchecked((int)0x8013189F),
- VER_E_FIN_OVERLAP = unchecked((int)0x801318A0),
- VER_E_LEXICAL_NESTING = unchecked((int)0x801318A1),
- VER_E_VOLATILE = unchecked((int)0x801318A2),
- VER_E_UNALIGNED = unchecked((int)0x801318A3),
- VER_E_INNERMOST_FIRST = unchecked((int)0x801318A4),
- VER_E_CALLI_VIRTUAL = unchecked((int)0x801318A5),
- VER_E_CALL_ABSTRACT = unchecked((int)0x801318A6),
- VER_E_STACK_UNEXP_ARRAY = unchecked((int)0x801318A7),
- VER_E_NOT_IN_GC_HEAP = unchecked((int)0x801318A8),
- VER_E_TRY_N_EMPTY_STACK = unchecked((int)0x801318A9),
- VER_E_DLGT_CTOR = unchecked((int)0x801318AA),
- VER_E_DLGT_BB = unchecked((int)0x801318AB),
- VER_E_DLGT_PATTERN = unchecked((int)0x801318AC),
- VER_E_DLGT_LDFTN = unchecked((int)0x801318AD),
- VER_E_FTN_ABSTRACT = unchecked((int)0x801318AE),
- VER_E_SIG_C_VC = unchecked((int)0x801318AF),
- VER_E_SIG_VC_C = unchecked((int)0x801318B0),
- VER_E_BOX_PTR_TO_STACK = unchecked((int)0x801318B1),
- VER_E_SIG_BYREF_TB_AH = unchecked((int)0x801318B2),
- VER_E_SIG_ARRAY_TB_AH = unchecked((int)0x801318B3),
- VER_E_ENDFILTER_STACK = unchecked((int)0x801318B4),
- VER_E_DLGT_SIG_I = unchecked((int)0x801318B5),
- VER_E_DLGT_SIG_O = unchecked((int)0x801318B6),
- VER_E_RA_PTR_TO_STACK = unchecked((int)0x801318B7),
- VER_E_CATCH_VALUE_TYPE = unchecked((int)0x801318B8),
- VER_E_CATCH_BYREF = unchecked((int)0x801318B9),
- VER_E_FIL_PRECEED_HND = unchecked((int)0x801318BA),
- VER_E_LDVIRTFTN_STATIC = unchecked((int)0x801318BB),
- VER_E_CALLVIRT_STATIC = unchecked((int)0x801318BC),
- VER_E_INITLOCALS = unchecked((int)0x801318BD),
- VER_E_BR_TO_EXCEPTION = unchecked((int)0x801318BE),
- VER_E_CALL_CTOR = unchecked((int)0x801318BF),
- VER_E_VALCLASS_OBJREF_VAR = unchecked((int)0x801318C0),
- VER_E_STACK_P_VALCLASS_OBJREF_VAR = unchecked((int)0x801318C1),
- VER_E_SIG_VAR_PARAM = unchecked((int)0x801318C2),
- VER_E_SIG_MVAR_PARAM = unchecked((int)0x801318C3),
- VER_E_SIG_VAR_ARG = unchecked((int)0x801318C4),
- VER_E_SIG_MVAR_ARG = unchecked((int)0x801318C5),
- VER_E_SIG_GENERICINST = unchecked((int)0x801318C6),
- VER_E_SIG_METHOD_INST = unchecked((int)0x801318C7),
- VER_E_SIG_METHOD_PARENT_INST = unchecked((int)0x801318C8),
- VER_E_SIG_FIELD_PARENT_INST = unchecked((int)0x801318C9),
- VER_E_CALLCONV_NOT_GENERICINST = unchecked((int)0x801318CA),
- VER_E_TOKEN_BAD_METHOD_SPEC = unchecked((int)0x801318CB),
- VER_E_BAD_READONLY_PREFIX = unchecked((int)0x801318CC),
- VER_E_BAD_CONSTRAINED_PREFIX = unchecked((int)0x801318CD),
- VER_E_CIRCULAR_VAR_CONSTRAINTS = unchecked((int)0x801318CE),
- VER_E_CIRCULAR_MVAR_CONSTRAINTS = unchecked((int)0x801318CF),
- VER_E_UNSATISFIED_METHOD_INST = unchecked((int)0x801318D0),
- VER_E_UNSATISFIED_METHOD_PARENT_INST = unchecked((int)0x801318D1),
- VER_E_UNSATISFIED_FIELD_PARENT_INST = unchecked((int)0x801318D2),
- VER_E_UNSATISFIED_BOX_OPERAND = unchecked((int)0x801318D3),
- VER_E_CONSTRAINED_CALL_WITH_NON_BYREF_THIS = unchecked((int)0x801318D4),
- VER_E_CONSTRAINED_OF_NON_VARIABLE_TYPE = unchecked((int)0x801318D5),
- VER_E_READONLY_UNEXPECTED_CALLEE = unchecked((int)0x801318D6),
- VER_E_READONLY_ILLEGAL_WRITE = unchecked((int)0x801318D7),
- VER_E_READONLY_IN_MKREFANY = unchecked((int)0x801318D8),
- VER_E_UNALIGNED_ALIGNMENT = unchecked((int)0x801318D9),
- VER_E_TAILCALL_INSIDE_EH = unchecked((int)0x801318DA),
- VER_E_BACKWARD_BRANCH = unchecked((int)0x801318DB),
- VER_E_CALL_TO_VTYPE_BASE = unchecked((int)0x801318DC),
- VER_E_NEWOBJ_OF_ABSTRACT_CLASS = unchecked((int)0x801318DD),
- VER_E_FIELD_OVERLAP = unchecked((int)0x801318E0),
- VER_E_BAD_PE = unchecked((int)0x801318F0),
- VER_E_BAD_MD = unchecked((int)0x801318F1),
- VER_E_BAD_APPDOMAIN = unchecked((int)0x801318F2),
- VER_E_TYPELOAD = unchecked((int)0x801318F3),
- VER_E_PE_LOAD = unchecked((int)0x801318F4),
- VER_E_WRITE_RVA_STATIC = unchecked((int)0x801318F5),
- CORDBG_E_THREAD_NOT_SCHEDULED = unchecked((int)0x80131C00),
- CORDBG_E_HANDLE_HAS_BEEN_DISPOSED = unchecked((int)0x80131C01),
- CORDBG_E_NONINTERCEPTABLE_EXCEPTION = unchecked((int)0x80131C02),
- CORDBG_E_CANT_UNWIND_ABOVE_CALLBACK = unchecked((int)0x80131C03),
- CORDBG_E_INTERCEPT_FRAME_ALREADY_SET = unchecked((int)0x80131C04),
- CORDBG_E_NO_NATIVE_PATCH_AT_ADDR = unchecked((int)0x80131C05),
- CORDBG_E_MUST_BE_INTEROP_DEBUGGING = unchecked((int)0x80131C06),
- CORDBG_E_NATIVE_PATCH_ALREADY_AT_ADDR = unchecked((int)0x80131C07),
- CORDBG_E_TIMEOUT = unchecked((int)0x80131C08),
- CORDBG_E_CANT_CALL_ON_THIS_THREAD = unchecked((int)0x80131C09),
- CORDBG_E_ENC_INFOLESS_METHOD = unchecked((int)0x80131C0A),
- CORDBG_E_ENC_NESTED_HANLDERS = unchecked((int)0x80131C0B),
- CORDBG_E_ENC_IN_FUNCLET = unchecked((int)0x80131C0C),
- CORDBG_E_ENC_LOCALLOC = unchecked((int)0x80131C0D),
- CORDBG_E_ENC_EDIT_NOT_SUPPORTED = unchecked((int)0x80131C0E),
- CORDBG_E_FEABORT_DELAYED_UNTIL_THREAD_RESUMED = unchecked((int)0x80131C0F),
- CORDBG_E_NOTREADY = unchecked((int)0x80131C10),
- CORDBG_E_CANNOT_RESOLVE_ASSEMBLY = unchecked((int)0x80131c11),
- CORDBG_E_MUST_BE_IN_LOAD_MODULE = unchecked((int)0x80131C12),
- CORDBG_E_CANNOT_BE_ON_ATTACH = unchecked((int)0x80131C13),
- CORDBG_S_NOT_ALL_BITS_SET = unchecked((int)0x00131C13),
- CORDBG_E_NGEN_NOT_SUPPORTED = unchecked((int)0x80131C14),
- CORDBG_E_ILLEGAL_SHUTDOWN_ORDER = unchecked((int)0x80131C15),
- CORDBG_E_CANNOT_DEBUG_FIBER_PROCESS = unchecked((int)0x80131C16),
- CORDBG_E_MUST_BE_IN_CREATE_PROCESS = unchecked((int)0x80131C17),
- CORDBG_E_DETACH_FAILED_OUTSTANDING_EVALS = unchecked((int)0x80131C18),
- CORDBG_E_DETACH_FAILED_OUTSTANDING_STEPPERS = unchecked((int)0x80131C19),
- CORDBG_E_CANT_INTEROP_STEP_OUT = unchecked((int)0x80131C20),
- CORDBG_E_DETACH_FAILED_OUTSTANDING_BREAKPOINTS = unchecked((int)0x80131C21),
- CORDBG_E_ILLEGAL_IN_STACK_OVERFLOW = unchecked((int)0x80131c22),
- CORDBG_E_ILLEGAL_AT_GC_UNSAFE_POINT = unchecked((int)0x80131c23),
- CORDBG_E_ILLEGAL_IN_PROLOG = unchecked((int)0x80131c24),
- CORDBG_E_ILLEGAL_IN_NATIVE_CODE = unchecked((int)0x80131c25),
- CORDBG_E_ILLEGAL_IN_OPTIMIZED_CODE = unchecked((int)0x80131c26),
- PEFMT_E_NO_CONTENTS = unchecked((int)0x80131D00),
- PEFMT_E_NO_NTHEADERS = unchecked((int)0x80131D01),
- PEFMT_E_64BIT = unchecked((int)0x80131D02),
- PEFMT_E_NO_CORHEADER = unchecked((int)0x80131D03),
- PEFMT_E_NOT_ILONLY = unchecked((int)0x80131D04),
- PEFMT_E_IMPORT_DLLS = unchecked((int)0x80131D05),
- PEFMT_E_EXE_NOENTRYPOINT = unchecked((int)0x80131D06),
- PEFMT_E_BASE_RELOCS = unchecked((int)0x80131D07),
- PEFMT_E_ENTRYPOINT = unchecked((int)0x80131D08),
- PEFMT_E_ZERO_SIZEOFCODE = unchecked((int)0x80131D09),
- PEFMT_E_BAD_CORHEADER = unchecked((int)0x80131D0A),
-
-
- }
-}
diff --git a/main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/debug/Module.cs b/main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/debug/Module.cs deleted file mode 100644 index dbd89c481b..0000000000 --- a/main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/debug/Module.cs +++ /dev/null @@ -1,324 +0,0 @@ -//---------------------------------------------------------------------
-// This file is part of the CLR Managed Debugger (mdbg) Sample.
-//
-// Copyright (C) Microsoft Corporation. All rights reserved.
-//---------------------------------------------------------------------
-using System;
-using System.Diagnostics;
-using System.Runtime.InteropServices;
-
-using Microsoft.Samples.Debugging.CorDebug.NativeApi;
-using Microsoft.Samples.Debugging.CorMetadata.NativeApi;
-
-namespace Microsoft.Samples.Debugging.CorDebug
-{
- public sealed class CorMDA : WrapperBase
- {
- private ICorDebugMDA m_mda;
- internal CorMDA(ICorDebugMDA mda)
- :base(mda)
- {
- m_mda = mda;
- }
-
- public CorDebugMDAFlags Flags
- {
- get
- {
- CorDebugMDAFlags flags;
- m_mda.GetFlags(out flags);
- return flags;
- }
- }
-
- string m_cachedName = null;
- public string Name
- {
- get
- {
- // This is thread safe because even in a race, the loser will just do extra work.
- // but no harm done.
- if (m_cachedName == null)
- {
- uint len = 0;
- m_mda.GetName(0, out len, null);
-
- char[] name = new char[len];
- uint fetched = 0;
-
- m_mda.GetName ((uint) name.Length, out fetched, name);
- // ``fetched'' includes terminating null; String doesn't handle null, so we "forget" it.
- m_cachedName = new String (name, 0, (int) (fetched-1));
- }
- return m_cachedName;
- } // end get
- }
-
- public string XML
- {
- get
- {
- uint len = 0;
- m_mda.GetXML(0, out len, null);
-
- char[] name = new char[len];
- uint fetched = 0;
-
- m_mda.GetXML ((uint) name.Length, out fetched, name);
- // ``fetched'' includes terminating null; String doesn't handle null, so we "forget" it.
- return new String (name, 0, (int) (fetched-1));
- }
- }
-
- public string Description
- {
- get
- {
- uint len = 0;
- m_mda.GetDescription(0, out len, null);
-
- char[] name = new char[len];
- uint fetched = 0;
-
- m_mda.GetDescription((uint) name.Length, out fetched, name);
- // ``fetched'' includes terminating null; String doesn't handle null, so we "forget" it.
- return new String (name, 0, (int) (fetched-1));
- }
- }
-
- public int OsTid
- {
- get
- {
- uint tid;
- m_mda.GetOSThreadId(out tid);
- return (int) tid;
- }
- }
- } // end CorMDA
-
- public sealed class CorModule : WrapperBase
- {
- private ICorDebugModule m_module;
-
- internal CorModule (ICorDebugModule managedModule)
- :base(managedModule)
- {
- m_module = managedModule;
- }
-
-
- /** The process this module is in. */
- public CorProcess Process
- {
- get
- {
- ICorDebugProcess proc = null;
- m_module.GetProcess (out proc);
- return CorProcess.GetCorProcess (proc);
- }
- }
-
- /** The base address of this module */
- public long BaseAddress
- {
- get
- {
- ulong addr = 0;
- m_module.GetBaseAddress (out addr);
- return (long) addr;
- }
- }
-
- /** The assembly this module is in. */
- public CorAssembly Assembly
- {
- get
- {
- ICorDebugAssembly a = null;
- m_module.GetAssembly (out a);
- return new CorAssembly (a);
- }
- }
-
- /** The name of the module. */
- public String Name
- {
- get
- {
-
- char[] name = new Char[300];
- uint fetched = 0;
- m_module.GetName ((uint) name.Length, out fetched, name);
- // ``fetched'' includes terminating null; String doesn't handle null,
- // so we "forget" it.
- return new String (name, 0, (int) (fetched-1));
- }
- }
-
- /** These flags set things like TrackJitInfo, PreventOptimization, IgnorePDBs, and EnableEnC
- * The setter here will sometimes not successfully set the EnableEnc bit (0x4) when asked to, and
- * we have hidden this detail from users of this layer.
- * If you are interested in handling this case, simply use the getter to check what the new value is after setting it.
- * If they don't match and no exception was thrown, you may assume that's what happened
- */
- public CorDebugJITCompilerFlags JITCompilerFlags
- {
- get
- {
- uint retval = 0;
- (m_module as ICorDebugModule2).GetJITCompilerFlags(out retval);
- return (CorDebugJITCompilerFlags)retval;
- }
- set
- {
- // ICorDebugModule2.SetJITCompilerFlags can return successful HRESULTS other than S_OK.
- // Since we have asked the COMInterop layer to preservesig, we need to marshal any failing HRESULTS.
- Marshal.ThrowExceptionForHR((m_module as ICorDebugModule2).SetJITCompilerFlags((uint)value));
- }
- }
-
- /** This is Debugging support for Type Forwarding */
- public CorAssembly ResolveAssembly(int tkAssemblyRef)
- {
- ICorDebugAssembly assm = null;
- (m_module as ICorDebugModule2).ResolveAssembly((uint)tkAssemblyRef, out assm);
- return new CorAssembly(assm);
- }
-
- /**
- * should the jitter preserve debugging information for methods
- * in this module?
- */
- public void EnableJitDebugging (bool trackJitInfo, bool allowJitOpts)
- {
- m_module.EnableJITDebugging (trackJitInfo ? 1 : 0,
- allowJitOpts ? 1 : 0);
- }
-
- /** Are ClassLoad callbacks called for this module? */
- public void EnableClassLoadCallbacks (bool value)
- {
- m_module.EnableClassLoadCallbacks (value ? 1 : 0);
- }
-
- /** Get the function from the metadata info. */
- public CorFunction GetFunctionFromToken (int functionToken)
- {
- ICorDebugFunction corFunction;
- m_module.GetFunctionFromToken((uint)functionToken,out corFunction);
- return (corFunction==null?null:new CorFunction(corFunction));
- }
-
-
- /** get the class from metadata info. */
- public CorClass GetClassFromToken (int classToken)
- {
- ICorDebugClass c = null;
- m_module.GetClassFromToken ((uint)classToken, out c);
- return new CorClass (c);
- }
-
- /**
- * create a breakpoint which is triggered when code in the module
- * is executed.
- */
- public CorModuleBreakpoint CreateBreakpoint ()
- {
- ICorDebugModuleBreakpoint mbr = null;
- m_module.CreateBreakpoint (out mbr);
- return new CorModuleBreakpoint (mbr);
- }
-
-
- public object GetMetaDataInterface (Guid interfaceGuid)
- {
- IMetadataImport obj;
- m_module.GetMetaDataInterface(ref interfaceGuid,out obj);
- return obj;
- }
-
- /// <summary>
- /// Typesafe wrapper around GetMetaDataInterface.
- /// </summary>
- /// <typeparam name="T">type of interface to query for</typeparam>
- /// <returns>interface to the metadata</returns>
- public T GetMetaDataInterface<T>()
- {
- // Ideally, this would be declared as Object to match the unmanaged
- // CorDebug.idl definition; but the managed wrappers we build
- // on import it as an IMetadataImport, so we need to start with
- // that.
- IMetadataImport obj;
- Guid interfaceGuid = typeof(T).GUID;
- m_module.GetMetaDataInterface(ref interfaceGuid, out obj);
- return (T) obj;
- }
-
-
- /** Get the token for the module table entry of this object. */
- public int Token
- {
- get
- {
- uint t = 0;
- m_module.GetToken (out t);
- return (int) t;
- }
- }
-
- /** is this a dynamic module? */
- public bool IsDynamic
- {
- get
- {
- int b = 0;
- m_module.IsDynamic (out b);
- return !(b==0);
- }
- }
-
- /** is this an InMemory module? */
- public bool IsInMemory
- {
- get {
- int b = 0;
- m_module.IsInMemory (out b);
- return !(b==0);
- }
- }
-
-
- /** get the value object for the given global variable. */
- public CorValue GetGlobalVariableValue (int fieldToken)
- {
- ICorDebugValue v = null;
- m_module.GetGlobalVariableValue ((uint) fieldToken, out v);
- return new CorValue (v);
- }
-
-
- /** The size (in bytes) of the module. */
- public int Size
- {
- get
- {
- uint s = 0;
- m_module.GetSize (out s);
- return (int) s;
- }
- }
-
- public void ApplyChanges(byte[] deltaMetadata,byte[] deltaIL)
- {
- (m_module as ICorDebugModule2).ApplyChanges((uint)deltaMetadata.Length,deltaMetadata,(uint)deltaIL.Length,deltaIL);
- }
-
- public void SetJmcStatus(bool isJustMyCOde,int[] tokens)
- {
- Debug.Assert(tokens==null);
- uint i=0;
- (m_module as ICorDebugModule2).SetJMCStatus(isJustMyCOde?1:0,0,ref i);
- }
- } /* class Module */
-} /* namespace */
diff --git a/main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/debug/ModuleBreakpoint.cs b/main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/debug/ModuleBreakpoint.cs deleted file mode 100644 index 5e5ff9abe0..0000000000 --- a/main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/debug/ModuleBreakpoint.cs +++ /dev/null @@ -1,31 +0,0 @@ -//---------------------------------------------------------------------
-// This file is part of the CLR Managed Debugger (mdbg) Sample.
-//
-// Copyright (C) Microsoft Corporation. All rights reserved.
-//---------------------------------------------------------------------
-using System;
-
-using Microsoft.Samples.Debugging.CorDebug.NativeApi;
-
-namespace Microsoft.Samples.Debugging.CorDebug
-{
- public sealed class CorModuleBreakpoint : CorBreakpoint
- {
- private ICorDebugModuleBreakpoint m_br;
-
- internal CorModuleBreakpoint (ICorDebugModuleBreakpoint managedModule): base(managedModule)
- {
- m_br = managedModule;
- }
-
- public CorModule Module
- {
- get
- {
- ICorDebugModule m = null;
- m_br.GetModule (out m);
- return new CorModule (m);
- }
- }
- } /* class ModuleBreakpoint */
-} /* namespace */
diff --git a/main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/debug/ModuleEnumerator.cs b/main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/debug/ModuleEnumerator.cs deleted file mode 100644 index 8397a90b40..0000000000 --- a/main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/debug/ModuleEnumerator.cs +++ /dev/null @@ -1,71 +0,0 @@ -//---------------------------------------------------------------------
-// This file is part of the CLR Managed Debugger (mdbg) Sample.
-//
-// Copyright (C) Microsoft Corporation. All rights reserved.
-//---------------------------------------------------------------------
-using System;
-using System.Collections;
-
-using Microsoft.Samples.Debugging.CorDebug.NativeApi;
-
-namespace Microsoft.Samples.Debugging.CorDebug
-{
- /** Exposes an enumerator for Modules. */
- internal class CorModuleEnumerator : IEnumerable, IEnumerator, ICloneable
- {
- private ICorDebugModuleEnum m_enum;
- private CorModule m_mod;
-
- internal CorModuleEnumerator (ICorDebugModuleEnum moduleEnumerator)
- {
- m_enum = moduleEnumerator;
- }
-
- //
- // ICloneable interface
- //
- public Object Clone ()
- {
- ICorDebugEnum clone = null;
- m_enum.Clone (out clone);
- return new CorModuleEnumerator ((ICorDebugModuleEnum)clone);
- }
-
- //
- // IEnumerable interface
- //
- public IEnumerator GetEnumerator ()
- {
- return this;
- }
-
- //
- // IEnumerator interface
- //
- public bool MoveNext ()
- {
- ICorDebugModule[] a = new ICorDebugModule[1];
- uint c = 0;
- int r = m_enum.Next ((uint) a.Length, a, out c);
- if (r==0 && c==1) // S_OK && we got 1 new element
- m_mod = new CorModule (a[0]);
- else
- m_mod = null;
- return m_mod != null;
- }
-
- public void Reset ()
- {
- m_enum.Reset ();
- m_mod = null;
- }
-
- public Object Current
- {
- get
- {
- return m_mod;
- }
- }
- } /* class ModuleEnumerator */
-} /* namespace */
diff --git a/main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/debug/NativeMethods.cs b/main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/debug/NativeMethods.cs deleted file mode 100644 index 848c247bfb..0000000000 --- a/main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/debug/NativeMethods.cs +++ /dev/null @@ -1,92 +0,0 @@ -using System; -using System.Runtime.InteropServices; -using System.Text; -using Microsoft.Samples.Debugging.CorDebug.NativeApi; -using Microsoft.Samples.Debugging.CorPublish.Metahost; - -namespace Microsoft.Samples.Debugging.CorDebug -{ - internal static class NativeMethods - { - private const string Kernel32LibraryName = "kernel32.dll"; - private const string Ole32LibraryName = "ole32.dll"; - private const string ShimLibraryName = "mscoree.dll"; - - [ - System.Runtime.ConstrainedExecution.ReliabilityContract (System.Runtime.ConstrainedExecution.Consistency.WillNotCorruptState, System.Runtime.ConstrainedExecution.Cer.Success), - DllImport (Kernel32LibraryName) - ] - public static extern bool CloseHandle (IntPtr handle); - - - [ - DllImport (ShimLibraryName, CharSet = CharSet.Unicode, PreserveSig = false) - ] - public static extern ICorDebug CreateDebuggingInterfaceFromVersion (int iDebuggerVersion - , string szDebuggeeVersion); - - [ - DllImport (ShimLibraryName, CharSet = CharSet.Unicode) - ] - public static extern int GetCORVersion ([Out, MarshalAs (UnmanagedType.LPWStr)] StringBuilder szName - , Int32 cchBuffer - , out Int32 dwLength); - - [ - DllImport (ShimLibraryName, CharSet = CharSet.Unicode, PreserveSig = false) - ] - public static extern void GetVersionFromProcess (ProcessSafeHandle hProcess, StringBuilder versionString, - Int32 bufferSize, out Int32 dwLength); - - [DllImport ("mscoree.dll", CharSet = CharSet.Auto, SetLastError = true, PreserveSig = false)] - public static extern void CLRCreateInstance ( - ref Guid clsid, - ref Guid riid, - [MarshalAs (UnmanagedType.Interface)] out IClrMetaHost metahostInterface); - - public static Guid CLSID_CLRMetaHost = - new Guid ("9280188D-0E8E-4867-B30C-7FA83884E8DE"); - - public static Guid IID_ICLRMetaHost = - new Guid ("D332DB9E-B9B3-4125-8207-A14884F53216"); - - [ - DllImport (ShimLibraryName, CharSet = CharSet.Unicode, PreserveSig = false) - ] - public static extern void GetRequestedRuntimeVersion (string pExe, StringBuilder pVersion, - Int32 cchBuffer, out Int32 dwLength); - - public enum ProcessAccessOptions : int - { - PROCESS_TERMINATE = 0x0001, - PROCESS_CREATE_THREAD = 0x0002, - PROCESS_SET_SESSIONID = 0x0004, - PROCESS_VM_OPERATION = 0x0008, - PROCESS_VM_READ = 0x0010, - PROCESS_VM_WRITE = 0x0020, - PROCESS_DUP_HANDLE = 0x0040, - PROCESS_CREATE_PROCESS = 0x0080, - PROCESS_SET_QUOTA = 0x0100, - PROCESS_SET_INFORMATION = 0x0200, - PROCESS_QUERY_INFORMATION = 0x0400, - PROCESS_SUSPEND_RESUME = 0x0800, - SYNCHRONIZE = 0x100000, - } - - [ - DllImport (Kernel32LibraryName, PreserveSig = true) - ] - public static extern ProcessSafeHandle OpenProcess (Int32 dwDesiredAccess, bool bInheritHandle, Int32 dwProcessId); - - public static Guid IIDICorDebug = new Guid ("3d6f5f61-7538-11d3-8d5b-00104b35e7ef"); - - [ - DllImport (Ole32LibraryName, PreserveSig = false) - ] - public static extern void CoCreateInstance (ref Guid rclsid, IntPtr pUnkOuter, - Int32 dwClsContext, - ref Guid riid, // must be "ref NativeMethods.IIDICorDebug" - [MarshalAs (UnmanagedType.Interface)] out ICorDebug debuggingInterface - ); - } -}
\ No newline at end of file diff --git a/main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/debug/ObjectEnumerator.cs b/main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/debug/ObjectEnumerator.cs deleted file mode 100644 index f4a5a4678f..0000000000 --- a/main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/debug/ObjectEnumerator.cs +++ /dev/null @@ -1,81 +0,0 @@ -//---------------------------------------------------------------------
-// This file is part of the CLR Managed Debugger (mdbg) Sample.
-//
-// Copyright (C) Microsoft Corporation. All rights reserved.
-//---------------------------------------------------------------------
-using System;
-using System.Collections;
-
-using Microsoft.Samples.Debugging.CorDebug.NativeApi;
-
-namespace Microsoft.Samples.Debugging.CorDebug
-{
- /**
- * Exposes an enumerator for Objects.
- *
- * Apparently the "Object"'s this enumerator returns is the address of
- * each object, not a description of the object itself.
- *
- * At least, the ``Next'' method in the IDL returns a uint64, so there
- * isn't much else it could be returning...
- */
- internal class CorObjectEnumerator : IEnumerable, IEnumerator, ICloneable
- {
- private ICorDebugObjectEnum m_enum;
-
- private ulong m_obj;
-
- internal CorObjectEnumerator (ICorDebugObjectEnum objectEnumerator)
- {
- m_enum = objectEnumerator;
- }
-
- //
- // ICloneable interface
- //
- public Object Clone ()
- {
- ICorDebugEnum clone = null;
- m_enum.Clone (out clone);
- return new CorObjectEnumerator ((ICorDebugObjectEnum)clone);
- }
-
- //
- // IEnumerable interface
- //
- public IEnumerator GetEnumerator ()
- {
- return this;
- }
-
- //
- // IEnumerator interface
- //
- public bool MoveNext ()
- {
- ulong[] a = new ulong[1];
- uint c = 0;
- int r = m_enum.Next ((uint)a.Length, a, out c);
- if (r==0 && c==1) // S_OK && we got 1 new element
- {
- m_obj = a[0];
- return true;
- }
- return false;
- }
-
- public void Reset ()
- {
- m_enum.Reset ();
- m_obj = 0;
- }
-
- public Object Current
- {
- get
- {
- return m_obj;
- }
- }
- } /* class CorObjectEnumerator */
-} /* namespace */
diff --git a/main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/debug/PdbHResult.cs b/main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/debug/PdbHResult.cs deleted file mode 100644 index 96e0a38548..0000000000 --- a/main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/debug/PdbHResult.cs +++ /dev/null @@ -1,34 +0,0 @@ -namespace Microsoft.Samples.Debugging.CorDebug -{ - /// <summary> - /// Taken from https://github.com/crummel/dotnet_coreclr/blob/master/src/ToolBox/SOS/DacTableGen/diautil.cs - /// </summary> - public enum PdbHResult - { - E_PDB_OK = unchecked((int)0x806d0001), - E_PDB_USAGE , - E_PDB_OUT_OF_MEMORY , // not used, use E_OUTOFMEMORY - E_PDB_FILE_SYSTEM , - E_PDB_NOT_FOUND , - E_PDB_INVALID_SIG , - E_PDB_INVALID_AGE , - E_PDB_PRECOMP_REQUIRED , - E_PDB_OUT_OF_TI , - E_PDB_NOT_IMPLEMENTED , // use E_NOTIMPL - E_PDB_V1_PDB , - E_PDB_FORMAT , - E_PDB_LIMIT , - E_PDB_CORRUPT , - E_PDB_TI16 , - E_PDB_ACCESS_DENIED , // use E_ACCESSDENIED - E_PDB_ILLEGAL_TYPE_EDIT , - E_PDB_INVALID_EXECUTABLE , - E_PDB_DBG_NOT_FOUND , - E_PDB_NO_DEBUG_INFO , - E_PDB_INVALID_EXE_TIMESTAMP , - E_PDB_RESERVED , - E_PDB_DEBUG_INFO_NOT_IN_PDB , - E_PDB_SYMSRV_BAD_CACHE_PATH , - E_PDB_SYMSRV_CACHE_FULL , - E_PDB_MAX - }}
\ No newline at end of file diff --git a/main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/debug/Process.cs b/main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/debug/Process.cs deleted file mode 100644 index 5c9aa7a92e..0000000000 --- a/main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/debug/Process.cs +++ /dev/null @@ -1,393 +0,0 @@ -//---------------------------------------------------------------------
-// This file is part of the CLR Managed Debugger (mdbg) Sample.
-//
-// Copyright (C) Microsoft Corporation. All rights reserved.
-//---------------------------------------------------------------------
-using System;
-using System.Collections;
-using System.Collections.Generic;
-using System.Diagnostics;
-using System.Threading;
-
-using Microsoft.Samples.Debugging.CorDebug.NativeApi;
-
-namespace Microsoft.Samples.Debugging.CorDebug
-{
- /** A process running some managed code. */
- public sealed class CorProcess : CorController, IDisposable
- {
- [CLSCompliant(false)]
- public static CorProcess GetCorProcess(ICorDebugProcess process)
- {
- Debug.Assert(process!=null);
- lock(m_instances)
- {
- if(!m_instances.Contains(process))
- {
- CorProcess p = new CorProcess(process);
- m_instances.Add(process,p);
- return p;
- }
- return (CorProcess)m_instances[process];
- }
- }
-
- public void Dispose()
- {
- // Release event handlers. The event handlers are strong references and may keep
- // other high-level objects (such as things in the MdbgEngine layer) alive.
- m_callbacksArray = null;
-
- // Remove ourselves from instances hash.
- lock(m_instances)
- {
- m_instances.Remove(_p());
- }
- }
-
- private CorProcess (ICorDebugProcess process)
- : base (process)
- {
- InitCallbacks ();
- }
-
- private void InitCallbacks ()
- {
- m_callbacksArray = new Dictionary<ManagedCallbackType, DebugEventHandler<CorEventArgs>> {
- {ManagedCallbackType.OnBreakpoint, (sender, args) => OnBreakpoint (sender, (CorBreakpointEventArgs) args)},
- {ManagedCallbackType.OnStepComplete, (sender, args) => OnStepComplete (sender, (CorStepCompleteEventArgs) args)},
- {ManagedCallbackType.OnBreak, (sender, args) => OnBreak (sender, (CorThreadEventArgs) args)},
- {ManagedCallbackType.OnException, (sender, args) => OnException (sender, (CorExceptionEventArgs) args)},
- {ManagedCallbackType.OnEvalComplete, (sender, args) => OnEvalComplete (sender, (CorEvalEventArgs) args)},
- {ManagedCallbackType.OnEvalException, (sender, args) => OnEvalException (sender, (CorEvalEventArgs) args)},
- {ManagedCallbackType.OnCreateProcess, (sender, args) => OnCreateProcess (sender, (CorProcessEventArgs) args)},
- {ManagedCallbackType.OnProcessExit, (sender, args) => OnProcessExit (sender, (CorProcessEventArgs) args)},
- {ManagedCallbackType.OnCreateThread, (sender, args) => OnCreateThread (sender, (CorThreadEventArgs) args)},
- {ManagedCallbackType.OnThreadExit, (sender, args) => OnThreadExit (sender, (CorThreadEventArgs) args)},
- {ManagedCallbackType.OnModuleLoad, (sender, args) => OnModuleLoad (sender, (CorModuleEventArgs) args)},
- {ManagedCallbackType.OnModuleUnload, (sender, args) => OnModuleUnload (sender, (CorModuleEventArgs) args)},
- {ManagedCallbackType.OnClassLoad, (sender, args) => OnClassLoad (sender, (CorClassEventArgs) args)},
- {ManagedCallbackType.OnClassUnload, (sender, args) => OnClassUnload (sender, (CorClassEventArgs) args)},
- {ManagedCallbackType.OnDebuggerError, (sender, args) => OnDebuggerError (sender, (CorDebuggerErrorEventArgs) args)},
- {ManagedCallbackType.OnLogMessage, (sender, args) => OnLogMessage (sender, (CorLogMessageEventArgs) args)},
- {ManagedCallbackType.OnLogSwitch, (sender, args) => OnLogSwitch (sender, (CorLogSwitchEventArgs) args)},
- {ManagedCallbackType.OnCreateAppDomain, (sender, args) => OnCreateAppDomain (sender, (CorAppDomainEventArgs) args)},
- {ManagedCallbackType.OnAppDomainExit, (sender, args) => OnAppDomainExit (sender, (CorAppDomainEventArgs) args)},
- {ManagedCallbackType.OnAssemblyLoad, (sender, args) => OnAssemblyLoad (sender, (CorAssemblyEventArgs) args)},
- {ManagedCallbackType.OnAssemblyUnload, (sender, args) => OnAssemblyUnload (sender, (CorAssemblyEventArgs) args)},
- {ManagedCallbackType.OnControlCTrap, (sender, args) => OnControlCTrap (sender, (CorProcessEventArgs) args)},
- {ManagedCallbackType.OnNameChange, (sender, args) => OnNameChange (sender, (CorThreadEventArgs) args)},
- {ManagedCallbackType.OnUpdateModuleSymbols, (sender, args) => OnUpdateModuleSymbols (sender, (CorUpdateModuleSymbolsEventArgs) args)},
- {ManagedCallbackType.OnFunctionRemapOpportunity, (sender, args) => OnFunctionRemapOpportunity (sender, (CorFunctionRemapOpportunityEventArgs) args)},
- {ManagedCallbackType.OnFunctionRemapComplete, (sender, args) => OnFunctionRemapComplete (sender, (CorFunctionRemapCompleteEventArgs) args)},
- {ManagedCallbackType.OnBreakpointSetError, (sender, args) => OnBreakpointSetError (sender, (CorBreakpointEventArgs) args)},
- {ManagedCallbackType.OnException2, (sender, args) => OnException2 (sender, (CorException2EventArgs) args)},
- {ManagedCallbackType.OnExceptionUnwind2, (sender, args) => OnExceptionUnwind2 (sender, (CorExceptionUnwind2EventArgs) args)},
- {ManagedCallbackType.OnMDANotification, (sender, args) => OnMDANotification (sender, (CorMDAEventArgs) args)},
- {ManagedCallbackType.OnExceptionInCallback, (sender, args) => OnExceptionInCallback (sender, (CorExceptionInCallbackEventArgs) args)},
- };
- }
-
- private static Hashtable m_instances = new Hashtable();
-
- private ICorDebugProcess _p ()
- {
- return (ICorDebugProcess) GetController();
- }
-
-
-
- /** The OS ID of the process. */
- public int Id
- {
- get
- {
- uint id = 0;
- _p().GetID (out id);
- return (int) id;
- }
- }
-
- /** Returns a handle to the process. */
- public IntPtr Handle
- {
- get
- {
- IntPtr h = IntPtr.Zero;
- _p().GetHandle (out h);
- return h;
- }
- }
-
- public Version Version
- {
- get
- {
- _COR_VERSION cv;
- (_p() as ICorDebugProcess2).GetVersion(out cv);
- return new Version((int)cv.dwMajor,(int)cv.dwMinor,(int)cv.dwBuild,(int)cv.dwSubBuild);
- }
- }
-
- /** All managed objects in the process. */
- public IEnumerable Objects
- {
- get
- {
- ICorDebugObjectEnum eobj = null;
- _p().EnumerateObjects (out eobj);
- return new CorObjectEnumerator (eobj);
- }
- }
-
- /** Is the address inside a transition stub? */
- public bool IsTransitionStub (long address)
- {
- int y = 0;
- _p().IsTransitionStub ((ulong)address, out y);
- return !(y==0);
- }
-
- /** Has the thread been suspended? */
- public bool IsOSSuspended (int tid)
- {
- int y = 0;
- _p().IsOSSuspended ((uint) tid, out y);
- return !(y==0);
- }
-
- /** Gets managed thread for threadId.
- * Returns NULL if tid is not a managed thread. That's very common in interop-debugging cases.
- */
- public CorThread GetThread(int threadId)
- {
- ICorDebugThread thread = null;
- try
- {
- _p().GetThread((uint)threadId, out thread);
- }
- catch (ArgumentException)
- {
- }
- return (thread == null) ? null : (new CorThread(thread));
- }
-
- /* Get the context for the given thread. */
- // See WIN32_CONTEXT structure declared in context.il
- public void GetThreadContext ( int threadId, IntPtr contextPtr, int context_size )
- {
-
- _p().GetThreadContext( (uint)threadId, (uint) context_size, contextPtr );
- return;
- }
-
- /* Set the context for a given thread. */
- public void SetThreadContext (int threadId, IntPtr contextPtr, int context_size)
- {
- _p().SetThreadContext( (uint)threadId, (uint) context_size, contextPtr );
- }
-
- /** Read memory from the process. */
- public long ReadMemory (long address, byte[] buffer)
- {
- Debug.Assert(buffer!=null);
- IntPtr read = IntPtr.Zero;
- _p().ReadMemory ((ulong) address, (uint) buffer.Length, buffer, out read);
- return read.ToInt64();
- }
-
- /** Write memory in the process. */
- public long WriteMemory (long address, byte[] buffer)
- {
- IntPtr written = IntPtr.Zero;
- _p().WriteMemory ((ulong) address, (uint) buffer.Length, buffer, out written);
- return written.ToInt64();
- }
-
- /** Clear the current unmanaged exception on the given thread. */
- public void ClearCurrentException (int threadId)
- {
- _p().ClearCurrentException ((uint) threadId);
- }
-
- /** enable/disable sending of log messages to the debugger for logging. */
- public void EnableLogMessages (bool value)
- {
- _p().EnableLogMessages (value ? 1 : 0);
- }
-
- /** Modify the specified switches severity level */
- public void ModifyLogSwitch (String name, int level)
- {
- _p().ModifyLogSwitch (name,level);
- }
-
- /** All appdomains in the process. */
- public IEnumerable AppDomains
- {
- get
- {
- ICorDebugAppDomainEnum ead = null;
- _p().EnumerateAppDomains (out ead);
- return new CorAppDomainEnumerator (ead);
- }
- }
-
- /** Get the runtime proces object. */
- public CorValue ProcessVariable
- {
- get
- {
- ICorDebugValue v = null;
- _p().GetObject (out v);
- return new CorValue (v);
- }
- }
-
- /** These flags set things like TrackJitInfo, PreventOptimization, IgnorePDBs, and EnableEnC */
- /** Any combination of bits in this DWORD flag enum is ok, but if its not a valid set, you may get an error */
- public CorDebugJITCompilerFlags DesiredNGENCompilerFlags
- {
- get
- {
- uint retval = 0;
- ((ICorDebugProcess2)_p()).GetDesiredNGENCompilerFlags(out retval);
- return (CorDebugJITCompilerFlags)retval;
- }
- set
- {
- ((ICorDebugProcess2)_p()).SetDesiredNGENCompilerFlags((uint)value);
- }
- }
-
- public CorReferenceValue GetReferenceValueFromGCHandle(IntPtr gchandle)
- {
- ICorDebugProcess2 p2 = (ICorDebugProcess2)_p();
- ICorDebugReferenceValue retval;
- p2.GetReferenceValueFromGCHandle(gchandle, out retval);
- return new CorReferenceValue(retval);
- }
-
- /** get the thread for a cookie. */
- public CorThread ThreadForFiberCookie (int cookie)
- {
- ICorDebugThread thread = null;
- _p().ThreadForFiberCookie ((uint) cookie, out thread);
- return (thread==null)?null:(new CorThread (thread));
- }
-
- /** set a BP in native code */
- public byte[] SetUnmanagedBreakpoint( long address )
- {
- UInt32 outLen;
- byte[] ret = new Byte[1];
- ICorDebugProcess2 p2 = (ICorDebugProcess2)_p();
- p2.SetUnmanagedBreakpoint( (UInt64)address, 1, ret, out outLen );
- Debug.Assert( outLen == 1 );
- return ret;
- }
-
- /** clear a previously set BP in native code */
- public void ClearUnmanagedBreakpoint( long address )
- {
- ICorDebugProcess2 p2 = (ICorDebugProcess2)_p();
- p2.ClearUnmanagedBreakpoint( (UInt64)address );
- }
-
- public override void Stop (int timeout)
- {
- _p().Stop ((uint)timeout);
- }
-
- public override void Continue (bool outOfBand)
- {
- if( !outOfBand && // OOB event can arrive anytime (we just ignore them).
- (m_callbackAttachedEvent!=null) )
- {
- // first special call to "Continue" -- this fake continue will start delivering
- // callbacks.
- Debug.Assert( !outOfBand );
- ManualResetEvent ev = m_callbackAttachedEvent;
- // we set the m_callbackAttachedEvent to null first to prevent races.
- m_callbackAttachedEvent = null;
- ev.Set();
- }
- else
- base.Continue(outOfBand);
- }
-
- // when process is first created wait till callbacks are enabled.
- private ManualResetEvent m_callbackAttachedEvent = new ManualResetEvent(false);
-
- private Dictionary<ManagedCallbackType, DebugEventHandler<CorEventArgs>> m_callbacksArray;
-
-
- internal void DispatchEvent(ManagedCallbackType callback,CorEventArgs e)
- {
- try
- {
- if( m_callbackAttachedEvent!=null )
- m_callbackAttachedEvent.WaitOne(); // waits till callbacks are enabled
- var d = m_callbacksArray[callback];
- d(this,e);
- }
- catch(Exception ex)
- {
- CorExceptionInCallbackEventArgs e2 = new CorExceptionInCallbackEventArgs(e.Controller,ex);
- Debug.Assert(false,"Exception in callback: "+ex.ToString());
- try
- {
- // we need to dispatch the exceptin in callback error, but we cannot
- // use DispatchEvent since throwing exception in ExceptionInCallback
- // would lead to infinite recursion.
- Debug.Assert( m_callbackAttachedEvent==null);
- var d = m_callbacksArray[ManagedCallbackType.OnExceptionInCallback];
- d(this, e2);
- }
- catch(Exception ex2)
- {
- Debug.Assert(false,"Exception in Exception notification callback: "+ex2.ToString());
- // ignore it -- there is nothing we can do.
- }
- e.Continue = e2.Continue;
- }
- }
-
- public event DebugEventHandler<CorBreakpointEventArgs> OnBreakpoint = delegate { };
- public event DebugEventHandler<CorBreakpointEventArgs> OnBreakpointSetError = delegate { };
- public event DebugEventHandler<CorStepCompleteEventArgs> OnStepComplete = delegate { };
- public event DebugEventHandler<CorThreadEventArgs> OnBreak = delegate { };
- public event DebugEventHandler<CorExceptionEventArgs> OnException = delegate { };
- public event DebugEventHandler<CorEvalEventArgs> OnEvalComplete = delegate { };
- public event DebugEventHandler<CorEvalEventArgs> OnEvalException = delegate { };
- public event DebugEventHandler<CorProcessEventArgs> OnCreateProcess = delegate { };
- public event DebugEventHandler<CorProcessEventArgs> OnProcessExit = delegate { };
- public event DebugEventHandler<CorThreadEventArgs> OnCreateThread = delegate { };
- public event DebugEventHandler<CorThreadEventArgs> OnThreadExit = delegate { };
- public event DebugEventHandler<CorModuleEventArgs> OnModuleLoad = delegate { };
- public event DebugEventHandler<CorModuleEventArgs> OnModuleUnload = delegate { };
- public event DebugEventHandler<CorClassEventArgs> OnClassLoad = delegate { };
- public event DebugEventHandler<CorClassEventArgs> OnClassUnload = delegate { };
- public event DebugEventHandler<CorDebuggerErrorEventArgs> OnDebuggerError = delegate { };
- public event DebugEventHandler<CorMDAEventArgs> OnMDANotification = delegate { };
- public event DebugEventHandler<CorLogMessageEventArgs> OnLogMessage = delegate { };
- public event DebugEventHandler<CorLogSwitchEventArgs> OnLogSwitch = delegate { };
- public event DebugEventHandler<CorAppDomainEventArgs> OnCreateAppDomain = delegate { };
- public event DebugEventHandler<CorAppDomainEventArgs> OnAppDomainExit = delegate { };
- public event DebugEventHandler<CorAssemblyEventArgs> OnAssemblyLoad = delegate { };
- public event DebugEventHandler<CorAssemblyEventArgs> OnAssemblyUnload = delegate { };
- public event DebugEventHandler<CorProcessEventArgs> OnControlCTrap = delegate { };
- public event DebugEventHandler<CorThreadEventArgs> OnNameChange = delegate { };
- public event DebugEventHandler<CorUpdateModuleSymbolsEventArgs> OnUpdateModuleSymbols = delegate { };
- public event DebugEventHandler<CorFunctionRemapOpportunityEventArgs> OnFunctionRemapOpportunity = delegate { };
- public event DebugEventHandler<CorFunctionRemapCompleteEventArgs> OnFunctionRemapComplete = delegate { };
- public event DebugEventHandler<CorException2EventArgs> OnException2 = delegate { };
- public event DebugEventHandler<CorExceptionUnwind2EventArgs> OnExceptionUnwind2 = delegate { };
- public event DebugEventHandler<CorExceptionInCallbackEventArgs> OnExceptionInCallback = delegate { };
-
- }
-
- public delegate void DebugEventHandler<in TArgs> (Object sender, TArgs args) where TArgs : CorEventArgs;
-
-/* class Process */
-} /* namespace */
diff --git a/main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/debug/ProcessEnumerator.cs b/main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/debug/ProcessEnumerator.cs deleted file mode 100644 index 7418f130a1..0000000000 --- a/main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/debug/ProcessEnumerator.cs +++ /dev/null @@ -1,72 +0,0 @@ -//---------------------------------------------------------------------
-// This file is part of the CLR Managed Debugger (mdbg) Sample.
-//
-// Copyright (C) Microsoft Corporation. All rights reserved.
-//---------------------------------------------------------------------
-using System;
-using System.Collections;
-
-using Microsoft.Samples.Debugging.CorDebug.NativeApi;
-
-namespace Microsoft.Samples.Debugging.CorDebug
-{
- /** Exposes an enumerator for Processes. */
- internal class CorProcessEnumerator :
- IEnumerable, IEnumerator, ICloneable
- {
- private ICorDebugProcessEnum m_enum;
- private CorProcess m_proc;
-
- internal CorProcessEnumerator (ICorDebugProcessEnum processEnumerator)
- {
- m_enum = processEnumerator;
- }
-
- //
- // ICloneable interface
- //
- public Object Clone ()
- {
- ICorDebugEnum clone = null;
- m_enum.Clone (out clone);
- return new CorProcessEnumerator ((ICorDebugProcessEnum)clone);
- }
-
- //
- // IEnumerable interface
- //
- public IEnumerator GetEnumerator ()
- {
- return this;
- }
-
- //
- // IEnumerator interface
- //
- public bool MoveNext ()
- {
- ICorDebugProcess[] a = new ICorDebugProcess[1];
- uint c = 0;
- int r = m_enum.Next ((uint) a.Length, a, out c);
- if (r==0 && c==1) // S_OK && we got 1 new element
- m_proc = CorProcess.GetCorProcess(a[0]);
- else
- m_proc = null;
- return m_proc != null;
- }
-
- public void Reset ()
- {
- m_enum.Reset ();
- m_proc = null;
- }
-
- public Object Current
- {
- get
- {
- return m_proc;
- }
- }
- } /* class ProcessEnumerator */
-} /* namespace */
diff --git a/main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/debug/ProcessSafeHandle.cs b/main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/debug/ProcessSafeHandle.cs deleted file mode 100644 index 55946a8315..0000000000 --- a/main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/debug/ProcessSafeHandle.cs +++ /dev/null @@ -1,22 +0,0 @@ -using System; - -namespace Microsoft.Samples.Debugging.CorDebug -{ - public class ProcessSafeHandle : Win32.SafeHandles.SafeHandleZeroOrMinusOneIsInvalid - { - private ProcessSafeHandle () - : base (true) - { - } - - private ProcessSafeHandle (IntPtr handle, bool ownsHandle) : base (ownsHandle) - { - SetHandle (handle); - } - - override protected bool ReleaseHandle () - { - return NativeMethods.CloseHandle (handle); - } - } -}
\ No newline at end of file diff --git a/main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/debug/RegisterSet.cs b/main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/debug/RegisterSet.cs deleted file mode 100644 index 3622902a29..0000000000 --- a/main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/debug/RegisterSet.cs +++ /dev/null @@ -1,175 +0,0 @@ -//---------------------------------------------------------------------
-// This file is part of the CLR Managed Debugger (mdbg) Sample.
-//
-// Copyright (C) Microsoft Corporation. All rights reserved.
-//---------------------------------------------------------------------
-using System;
-using System.Collections;
-using System.Diagnostics;
-
-using Microsoft.Samples.Debugging.CorDebug.NativeApi;
-
-namespace Microsoft.Samples.Debugging.CorDebug
-{
- // This code needs to be kept in sync with CorDebug.idl
- public enum CorCorDebugRegister
- {
- Eip = 0, // REGISTER_X86_EIP = 0,
- Esp, // REGISTER_X86_ESP,
- Ebp, // REGISTER_X86_EBP,
-
- Eax, // REGISTER_X86_EAX,
- Ecx, // REGISTER_X86_ECX,
- Edx, // REGISTER_X86_EDX,
- Ebx, // REGISTER_X86_EBX,
-
- Esi, // REGISTER_X86_ESI,
- Edi, // REGISTER_X86_EDI,
-
- FPstack0, // REGISTER_X86_FPSTACK_0,
- FPstack1, // REGISTER_X86_FPSTACK_1,
- FPstack2, // REGISTER_X86_FPSTACK_2,
- FPstack3, // REGISTER_X86_FPSTACK_3,
- FPstack4, // REGISTER_X86_FPSTACK_4,
- FPstack5, // REGISTER_X86_FPSTACK_5,
- FPstack6, // REGISTER_X86_FPSTACK_6,
- FPstack7, // REGISTER_X86_FPSTACK_7,
-
- RegisterMax // this needs to be last enum!
- };
-
-
- public sealed class CorRegisterSet : WrapperBase
- {
- internal CorRegisterSet (ICorDebugRegisterSet registerSet)
- :base(registerSet)
- {
- m_rs = registerSet;
- }
-
-
- /*
- * GetRegistersAvailable returns a mask indicating which registers
- * are available in the given register set. Registers may be unavailable
- * if their value is undeterminable for the given situation. The returned
- * word contains a bit for each register (1 << register index), which will
- * be 1 if the register is available or 0 if it is not.
- */
- //HRESULT GetRegistersAvailable([out] ULONG64 *pAvailable);
-
- [CLSCompliant(false)]
- public UInt64 RegistersAvailable
- {
- get
- {
- UInt64 availableReg;
- m_rs.GetRegistersAvailable(out availableReg);
- return availableReg;
- }
- }
-
- /*
- * GetRegisters returns an array of register values corresponding
- * to the given mask. The registers which have their bit set in
- * the mask will be packed into the resulting array. (No room is
- * assigned in the array for registers whose mask bit is not set.)
- * Thus, the size of the array should be equal to the number of
- * 1's in the mask.
- *
- * If an unavailable register is indicated by the mask, an indeterminate
- * value will be returned for the corresponding register.
- *
- * registerBufferCount should indicate number of elements in the
- * buffer to receive the register values. If it is too small for
- * the number of registers indicated by the mask, the higher
- * numbered registers will be truncated from the set. Or, if it
- * is too large, the unused registerBuffer elements will be
- * unmodified. */
-
- //HRESULT GetRegisters([in] ULONG64 mask, [in] ULONG32 regCount,
- // [out, size_is(regCount), length_is(regCount)]
- // CORDB_REGISTER regBuffer[]);
- [CLSCompliant(false)]
- public UInt64[] GetRegisters(UInt64 mask)
- {
- int regsToGet=0;
- for(UInt64 m = mask;m!=0;m>>=1)
- if( (m&1) != 0 )
- regsToGet++;
-
- UInt64[] regs = new UInt64[regsToGet];
- m_rs.GetRegisters(mask,(uint)regs.Length,regs);
- return regs;
- }
-
- [CLSCompliant(false)]
- public UInt64 GetRegister(CorCorDebugRegister register)
- {
- UInt64 mask=1;
- mask<<=(int)register;
- UInt64[] regs = GetRegisters(mask);
- Debug.Assert(regs!=null && regs.Length==1);
- return regs[0];
- }
-
- /*
- * SetRegisters sets the value of the set registers corresponding
- * to the given mask. For each bit set in the mask, the
- * corresponding register will be set from the corresponding
- * element in the registerBuffer. (Note that the correlation is by
- * sequence, not by the position of the bit. That is,
- * registerBuffer is "packed"; there are no elements corresponding
- * to registers whose bit is not set.
- *
- * If an unavailable register is indicated by the mask, the
- * register will not be set (although a value for that register is
- * recognized from the registerBuffer.)
- *
- * registerBufferCount should indicate number of elements in the
- * buffer to be the register values. If it is too small for the
- * number of registers indicated by the mask, the higher numbered
- * registers will not be set. If it is too large, the extra
- * values will be ignored.
- *
- * Note that setting registers this way is inherently dangerous.
- * CorDebug makes no attempt to ensure that the runtime remains in
- * a valid state when register values are changed. (For example,
- * if the IP were set to point to non-managed code, who knows what
- * would happen.)
- *
- * Not Implemented In-Proc
- */
-
- // HRESULT SetRegisters([in] ULONG64 mask,
- // [in] ULONG32 regCount,
- // [in, size_is(regCount)] CORDB_REGISTER regBuffer[]);
- [CLSCompliant(false)]
- public void SetRegisters(UInt64 mask,UInt64[] registerValues)
- {
- m_rs.SetRegisters(mask,(uint)registerValues.Length,registerValues);
- }
-
- [CLSCompliant(false)]
- public void SetRegister(CorCorDebugRegister register,UInt64 value)
- {
- UInt64 mask = 1;
- mask<<=(int)register;
- SetRegisters(mask,new UInt64[]{value});
- }
-
-
- public void GetThreadContext ( IntPtr contextPtr, int contextSize )
- {
- m_rs.GetThreadContext( (uint)contextSize, contextPtr );
- }
-
- public void SetThreadContext ( IntPtr contextPtr, int contextSize )
- {
- m_rs.SetThreadContext( (uint)contextSize, contextPtr );
- }
-
- private ICorDebugRegisterSet m_rs;
- }
-}
-
-
diff --git a/main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/debug/Stepper.cs b/main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/debug/Stepper.cs deleted file mode 100644 index 62a3c0a98a..0000000000 --- a/main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/debug/Stepper.cs +++ /dev/null @@ -1,96 +0,0 @@ -//---------------------------------------------------------------------
-// This file is part of the CLR Managed Debugger (mdbg) Sample.
-//
-// Copyright (C) Microsoft Corporation. All rights reserved.
-//---------------------------------------------------------------------
-using System;
-
-using Microsoft.Samples.Debugging.CorDebug.NativeApi;
-
-namespace Microsoft.Samples.Debugging.CorDebug
-{
- /** Represents a stepping operation performed by the debugger. */
- public sealed class CorStepper : WrapperBase
- {
- internal CorStepper (ICorDebugStepper stepper)
- :base(stepper)
- {
- m_step = stepper;
- }
-
-
- /** Is the stepper active and stepping? */
- public bool IsActive ()
- {
- int a = 9;
- m_step.IsActive (out a);
- return !(a==0);
- }
-
- /** cancel the last stepping command received. */
- public void Deactivate ()
- {
- m_step.Deactivate ();
- }
-
- /** which intercept code will be stepped into by the debugger? */
- [CLSCompliant(false)]
- public void SetInterceptMask (CorDebugIntercept mask)
- {
- m_step.SetInterceptMask (mask);
- }
-
- /** Should the stepper stop in jitted code not mapped to IL? */
- [CLSCompliant(false)]
- public void SetUnmappedStopMask (CorDebugUnmappedStop mask)
- {
- m_step.SetUnmappedStopMask (mask);
- }
-
- /** single step the tread. */
- public void Step (bool into)
- {
- m_step.Step (into ? 1 : 0);
- }
-
- /** Step until code outside of the range is reached. */
- [CLSCompliant(false)]
- public void StepRange (bool stepInto, COR_DEBUG_STEP_RANGE[] stepRanges)
- {
- m_step.StepRange (stepInto ? 1 : 0, stepRanges, (uint) stepRanges.Length);
- }
-
- /*
- * Completes after the current frame is returned from normally & the
- * previous frame is reactivated.
- */
- public void StepOut ()
- {
- m_step.StepOut ();
- }
-
- /**
- * Set whether the ranges passed to StepRange are relative to the
- * IL code or the native code for the method being stepped in.
- */
- public void SetRangeIL (bool value)
- {
- m_step.SetRangeIL (value ? 1 : 0);
- }
-
- /// <summary>
- /// Enable Just-my-code stepping for this stepper. The default is 'false.
- /// </summary>
- /// <param name="isJustMyCode">true to make this a JMC-stepper, false to make it a traditional stepper.</param>
- public void SetJmcStatus(bool isJustMyCode)
- {
- ICorDebugStepper2 stepper2 = m_step as ICorDebugStepper2;
- if (stepper2 != null)
- {
- stepper2.SetJMC(isJustMyCode ? 1 : 0);
- }
- }
-
- private ICorDebugStepper m_step;
- } /* class Stepper */
-} /* namespace */
diff --git a/main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/debug/StepperEnumerator.cs b/main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/debug/StepperEnumerator.cs deleted file mode 100644 index dc29d12fd0..0000000000 --- a/main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/debug/StepperEnumerator.cs +++ /dev/null @@ -1,71 +0,0 @@ -//---------------------------------------------------------------------
-// This file is part of the CLR Managed Debugger (mdbg) Sample.
-//
-// Copyright (C) Microsoft Corporation. All rights reserved.
-//---------------------------------------------------------------------
-using System;
-using System.Collections;
-
-using Microsoft.Samples.Debugging.CorDebug.NativeApi;
-
-namespace Microsoft.Samples.Debugging.CorDebug
-{
- /** Exposes an enumerator for Steppers. */
- internal class CorStepperEnumerator : IEnumerable, IEnumerator, ICloneable
- {
- private ICorDebugStepperEnum m_enum;
- private CorStepper m_step;
-
- internal CorStepperEnumerator (ICorDebugStepperEnum stepEnumerator)
- {
- m_enum = stepEnumerator;
- }
-
- //
- // ICloneable interface
- //
- public Object Clone ()
- {
- ICorDebugEnum clone = null;
- m_enum.Clone (out clone);
- return new CorStepperEnumerator ((ICorDebugStepperEnum)clone);
- }
-
- //
- // IEnumerable interface
- //
- public IEnumerator GetEnumerator ()
- {
- return this;
- }
-
- //
- // IEnumerator interface
- //
- public bool MoveNext ()
- {
- ICorDebugStepper[] a = new ICorDebugStepper[1];
- uint c = 0;
- int r = m_enum.Next ((uint) a.Length, a, out c);
- if (r==0 && c==1) // S_OK && we got 1 new element
- m_step = new CorStepper (a[0]);
- else
- m_step = null;
- return m_step != null;
- }
-
- public void Reset ()
- {
- m_enum.Reset ();
- m_step= null;
- }
-
- public Object Current
- {
- get
- {
- return m_step;
- }
- }
- } /* class StepperEnumerator */
-} /* namespace */
diff --git a/main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/debug/Thread.cs b/main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/debug/Thread.cs deleted file mode 100644 index 7b702cd53e..0000000000 --- a/main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/debug/Thread.cs +++ /dev/null @@ -1,1162 +0,0 @@ -//---------------------------------------------------------------------
-// This file is part of the CLR Managed Debugger (mdbg) Sample.
-//
-// Copyright (C) Microsoft Corporation. All rights reserved.
-//---------------------------------------------------------------------
-using System;
-using System.Collections;
-using System.Diagnostics;
-
-using Microsoft.Samples.Debugging.CorDebug.NativeApi;
-using System.Runtime.Serialization;
-
-namespace Microsoft.Samples.Debugging.CorDebug
-{
-
- public struct CorActiveFunction
- {
- public int ILoffset
- {
- get
- {
- return m_ilOffset;
- }
- }
- private int m_ilOffset;
-
- public CorFunction Function
- {
- get
- {
- return m_function;
- }
- }
- private CorFunction m_function;
-
- public CorModule Module
- {
- get
- {
- return m_module;
- }
- }
- private CorModule m_module;
-
- internal CorActiveFunction(int ilOffset,CorFunction managedFunction,CorModule managedModule)
- {
- m_ilOffset = ilOffset;
- m_function = managedFunction;
- m_module = managedModule;
- }
- }
-
- public enum CorStackWalkType
- {
- PureV3StackWalk, // true representation of the V3 ICorDebugStackWalk API
- ExtendedV3StackWalk // V3 ICorDebugStackWalk API with internal frames interleaved
- }
-
- /** A thread in the debugged process. */
- public sealed class CorThread : WrapperBase
- {
- internal CorThread (ICorDebugThread thread)
- :base(thread)
- {
- m_th = thread;
- }
-
- internal ICorDebugThread GetInterface ()
- {
- return m_th;
- }
-
-
- /** The process that this thread is in. */
- public CorProcess Process
- {
- get
- {
- ICorDebugProcess p = null;
- m_th.GetProcess (out p);
- return CorProcess.GetCorProcess(p);
- }
- }
-
- /** the OS id of the thread. */
- public int Id
- {
- get
- {
- uint id = 0;
- m_th.GetID (out id);
- return (int) id;
- }
- }
-
- /** The handle of the active part of the thread. */
- public IntPtr Handle
- {
- get
- {
- IntPtr h = IntPtr.Zero;
- m_th.GetHandle (out h);
- return h;
- }
- }
-
- /** The AppDomain that owns the thread. */
- public CorAppDomain AppDomain
- {
- get
- {
- ICorDebugAppDomain ad = null;
- m_th.GetAppDomain (out ad);
- return new CorAppDomain (ad);
- }
- }
-
- /** Set the current debug state of the thread. */
- [CLSCompliant(false)]
- public CorDebugThreadState DebugState
- {
- get
- {
- CorDebugThreadState s = CorDebugThreadState.THREAD_RUN;
- m_th.GetDebugState (out s);
- return s;
- }
- set
- {
- m_th.SetDebugState (value);
- }
- }
-
- /** the user state. */
- [CLSCompliant(false)]
- public CorDebugUserState UserState
- {
- get
- {
- CorDebugUserState s = CorDebugUserState.USER_STOP_REQUESTED;
- m_th.GetUserState (out s);
- return s;
- }
- }
-
- /** the exception object which is currently being thrown by the thread. */
- public CorValue CurrentException
- {
- get
- {
- ICorDebugValue v = null;
- m_th.GetCurrentException (out v);
- return (v==null) ? null : new CorValue (v);
- }
- }
-
- /**
- * Clear the current exception object, preventing it from being thrown.
- */
- public void ClearCurrentException ()
- {
- m_th.ClearCurrentException ();
- }
-
- /**
- * Intercept the current exception.
- */
- public void InterceptCurrentException(CorFrame frame)
- {
- ICorDebugThread2 m_th2 = (ICorDebugThread2)m_th;
- m_th2.InterceptCurrentException(frame.m_frame);
- }
-
- /**
- * create a stepper object relative to the active frame in this thread.
- */
- public CorStepper CreateStepper ()
- {
- ICorDebugStepper s = null;
- m_th.CreateStepper (out s);
- return new CorStepper (s);
- }
-
- /** All stack chains in the thread. */
- public IEnumerable Chains
- {
- get
- {
- ICorDebugChainEnum ec = null;
- m_th.EnumerateChains (out ec);
- return (ec==null)?null:new CorChainEnumerator (ec);
- }
- }
-
- /** The most recent chain in the thread, if any. */
- public CorChain ActiveChain
- {
- get
- {
- ICorDebugChain ch = null;
- m_th.GetActiveChain (out ch);
- return ch == null ? null : new CorChain (ch);
- }
- }
-
- /** Get the active frame. */
- public CorFrame ActiveFrame
- {
- get
- {
- ICorDebugFrame f = null;
- m_th.GetActiveFrame (out f);
- return f==null ? null : new CorFrame (f);
- }
- }
-
- /** Get the register set for the active part of the thread. */
- public CorRegisterSet RegisterSet
- {
- get
- {
- ICorDebugRegisterSet r = null;
- m_th.GetRegisterSet (out r);
- return r==null?null:new CorRegisterSet (r);
- }
- }
-
- /** Creates an evaluation object. */
- public CorEval CreateEval ()
- {
- ICorDebugEval e = null;
- m_th.CreateEval (out e);
- return e==null?null:new CorEval (e);
- }
-
- /** Get the runtime thread object. */
- public CorValue ThreadVariable
- {
- get
- {
- ICorDebugValue v = null;
- m_th.GetObject (out v);
- return new CorValue (v);
- }
- }
-
- public CorActiveFunction[] GetActiveFunctions()
- {
- ICorDebugThread2 m_th2 = (ICorDebugThread2) m_th;
- UInt32 pcFunctions;
- m_th2.GetActiveFunctions(0,out pcFunctions,null);
- COR_ACTIVE_FUNCTION[] afunctions = new COR_ACTIVE_FUNCTION[pcFunctions];
- m_th2.GetActiveFunctions(pcFunctions,out pcFunctions,afunctions);
- CorActiveFunction[] caf = new CorActiveFunction[pcFunctions];
- for(int i=0;i<pcFunctions;++i)
- {
- caf[i] = new CorActiveFunction((int) afunctions[i].ilOffset,
- new CorFunction((ICorDebugFunction)afunctions[i].pFunction),
- afunctions[i].pModule==null?null:new CorModule(afunctions[i].pModule)
- );
- }
- return caf;
- }
- private ICorDebugThread m_th;
-
- } /* class Thread */
-
-
-
- public enum CorFrameType
- {
- ILFrame, NativeFrame, InternalFrame,
- }
-
-
- public sealed class CorFrame : WrapperBase
- {
- internal CorFrame(ICorDebugFrame frame)
- :base(frame)
- {
- m_frame = frame;
- }
-
-
- public CorStepper CreateStepper()
- {
- ICorDebugStepper istepper;
- m_frame.CreateStepper(out istepper);
- return ( istepper==null ? null : new CorStepper(istepper) );
- }
-
- public CorFrame Callee
- {
- get
- {
- ICorDebugFrame iframe;
- m_frame.GetCallee(out iframe);
- return ( iframe==null ? null : new CorFrame(iframe) );
- }
- }
-
- public CorFrame Caller
- {
- get
- {
- ICorDebugFrame iframe;
- m_frame.GetCaller(out iframe);
- return ( iframe==null ? null : new CorFrame(iframe) );
- }
- }
-
- public CorChain Chain
- {
- get
- {
- ICorDebugChain ichain;
- m_frame.GetChain(out ichain);
- return ( ichain==null ? null : new CorChain(ichain) );
- }
- }
-
- public CorCode Code
- {
- get
- {
- ICorDebugCode icode;
- m_frame.GetCode(out icode);
- return ( icode==null ? null : new CorCode(icode) );
- }
- }
-
- public CorFunction Function
- {
- get
- {
- ICorDebugFunction ifunction;
- m_frame.GetFunction(out ifunction);
- return ( ifunction==null ? null : new CorFunction(ifunction) );
- }
- }
-
- public int FunctionToken
- {
- get
- {
- uint token;
- m_frame.GetFunctionToken(out token);
- return (int)token;
- }
- }
-
- public CorFrameType FrameType
- {
- get
- {
- ICorDebugILFrame ilframe = GetILFrame();
- if (ilframe != null)
- return CorFrameType.ILFrame;
-
- ICorDebugInternalFrame iframe = GetInternalFrame();
- if (iframe != null)
- return CorFrameType.InternalFrame;
-
- return CorFrameType.NativeFrame;
- }
- }
-
- [CLSCompliant(false)]
- public CorDebugInternalFrameType InternalFrameType
- {
- get
- {
- ICorDebugInternalFrame iframe = GetInternalFrame();
- CorDebugInternalFrameType ft;
-
- if(iframe==null)
- throw new CorException("Cannot get frame type on non-internal frame");
-
- iframe.GetFrameType(out ft);
- return ft;
- }
- }
-
-
- [CLSCompliant(false)]
- public void GetStackRange(out UInt64 startOffset,out UInt64 endOffset)
- {
- m_frame.GetStackRange(out startOffset,out endOffset);
- }
-
- [CLSCompliant(false)]
- public void GetIP(out uint offset, out CorDebugMappingResult mappingResult)
- {
- ICorDebugILFrame ilframe = GetILFrame();
- if(ilframe==null)
- {
- offset = 0;
- mappingResult = CorDebugMappingResult.MAPPING_NO_INFO;
- }
- else
- ilframe.GetIP(out offset, out mappingResult);
- }
-
- public void SetIP(int offset)
- {
- ICorDebugILFrame ilframe = GetILFrame();
- if(ilframe==null)
- throw new CorException("Cannot set an IP on non-il frame");
- ilframe.SetIP((uint)offset);
- }
-
- public bool CanSetIP(int offset)
- {
- ICorDebugILFrame ilframe = GetILFrame();
- if( ilframe==null )
- return false;
- return (ilframe.CanSetIP((uint)offset)==(int)HResult.S_OK);
- }
-
- public bool CanSetIP(int offset, out int hresult)
- {
- ICorDebugILFrame ilframe = GetILFrame();
- if( ilframe==null )
- {
- hresult = (int)HResult.E_FAIL;
- return false;
- }
- hresult = ilframe.CanSetIP((uint)offset);
- return (hresult==(int)HResult.S_OK);
- }
-
- [CLSCompliant(false)]
- public void GetNativeIP(out uint offset)
- {
- ICorDebugNativeFrame nativeFrame = m_frame as ICorDebugNativeFrame;
- Debug.Assert( nativeFrame!=null );
- nativeFrame.GetIP(out offset);
- }
-
- public CorValue GetLocalVariable(int index)
- {
- ICorDebugILFrame ilframe = GetILFrame();
- if(ilframe==null)
- return null;
-
- ICorDebugValue value;
- try
- {
- ilframe.GetLocalVariable((uint)index,out value);
- }
- catch(System.Runtime.InteropServices.COMException e)
- {
- // If you are stopped in the Prolog, the variable may not be available.
- // CORDBG_E_IL_VAR_NOT_AVAILABLE is returned after dubugee triggers StackOverflowException
- if(e.ErrorCode == (int)HResult.CORDBG_E_IL_VAR_NOT_AVAILABLE)
- {
- return null;
- }
- else
- {
- throw;
- }
- }
- return (value==null)?null:new CorValue(value);
- }
-
- public int GetLocalVariablesCount()
- {
- ICorDebugILFrame ilframe = GetILFrame();
- if(ilframe==null)
- return -1;
-
- ICorDebugValueEnum ve;
- ilframe.EnumerateLocalVariables(out ve);
- uint count;
- ve.GetCount(out count);
- return (int)count;
- }
-
- public CorValue GetArgument(int index)
- {
- ICorDebugILFrame ilframe = GetILFrame();
- if(ilframe==null)
- return null;
-
-
- ICorDebugValue value;
- ilframe.GetArgument((uint)index,out value);
- return (value==null)?null:new CorValue(value);
- }
-
- public int GetArgumentCount()
- {
- ICorDebugILFrame ilframe = GetILFrame();
- if(ilframe==null)
- return -1;
-
- ICorDebugValueEnum ve;
- ilframe.EnumerateArguments(out ve);
- uint count;
- ve.GetCount(out count);
- return (int)count;
- }
-
- public void RemapFunction(int newILOffset)
- {
- ICorDebugILFrame ilframe = GetILFrame();
- if(ilframe==null)
- throw new CorException("Cannot remap on non-il frame.");
- ICorDebugILFrame2 ilframe2 = (ICorDebugILFrame2) ilframe;
- ilframe2.RemapFunction((uint)newILOffset);
- }
-
- private ICorDebugILFrame GetILFrame()
- {
- if(!m_ilFrameCached)
- {
- m_ilFrameCached = true;
- m_ilFrame = m_frame as ICorDebugILFrame;
-
- }
- return m_ilFrame;
- }
-
- private ICorDebugInternalFrame GetInternalFrame()
- {
- if(!m_iFrameCached)
- {
- m_iFrameCached = true;
-
- m_iFrame = m_frame as ICorDebugInternalFrame;
- }
- return m_iFrame;
- }
-
- // 'TypeParameters' returns an enumerator that goes yields generic args from
- // both the class and the method. To enumerate just the generic args on the
- // method, we need to skip past the class args. We have to get that skip value
- // from the metadata. This is a helper function to efficiently get an enumerator that skips
- // to a given spot (likely past the class generic args).
- public IEnumerable GetTypeParamEnumWithSkip(int skip)
- {
- if (skip < 0)
- {
- throw new ArgumentException("Skip parameter must be positive");
- }
- IEnumerable e = this.TypeParameters;
- Debug.Assert(e is CorTypeEnumerator);
-
- // Skip will throw if we try to skip the whole collection
- int total = (e as CorTypeEnumerator).Count;
- if (skip >= total)
- {
- return new CorTypeEnumerator(null); // empty.
- }
-
- (e as CorTypeEnumerator).Skip(skip);
- return e;
- }
-
- public IEnumerable TypeParameters
- {
- get
- {
- ICorDebugTypeEnum icdte = null;
- ICorDebugILFrame ilf = GetILFrame();
-
- (ilf as ICorDebugILFrame2).EnumerateTypeParameters(out icdte);
- return new CorTypeEnumerator(icdte); // icdte can be null, is handled by enumerator
- }
- }
-
-
-
- private ICorDebugILFrame m_ilFrame = null;
- private bool m_ilFrameCached = false;
-
- private ICorDebugInternalFrame m_iFrame = null;
- private bool m_iFrameCached = false;
-
- internal ICorDebugFrame m_frame;
- }
-
- public sealed class CorChain : WrapperBase
- {
- internal CorChain(ICorDebugChain chain)
- :base(chain)
- {
- m_chain = chain;
- }
-
-
- public CorFrame ActiveFrame
- {
- get
- {
- ICorDebugFrame iframe;
- m_chain.GetActiveFrame(out iframe);
- return ( iframe==null ? null : new CorFrame(iframe) );
- }
- }
-
- public CorChain Callee
- {
- get
- {
- ICorDebugChain ichain;
- m_chain.GetCallee(out ichain);
- return ( ichain==null ? null : new CorChain(ichain) );
- }
- }
-
- public CorChain Caller
- {
- get
- {
- ICorDebugChain ichain;
- m_chain.GetCaller(out ichain);
- return ( ichain==null ? null : new CorChain(ichain) );
- }
- }
-
- public CorContext Context
- {
- get
- {
- ICorDebugContext icontext;
- m_chain.GetContext(out icontext);
- return ( icontext==null ? null : new CorContext(icontext) );
- }
- }
-
- public CorChain Next
- {
- get
- {
- ICorDebugChain ichain;
- m_chain.GetNext(out ichain);
- return ( ichain==null ? null : new CorChain(ichain) );
- }
- }
-
- public CorChain Previous
- {
- get
- {
- ICorDebugChain ichain;
- m_chain.GetPrevious(out ichain);
- return ( ichain==null ? null : new CorChain(ichain) );
- }
- }
-
- [CLSCompliant(false)]
- public CorDebugChainReason Reason
- {
- get
- {
- CorDebugChainReason reason;
- m_chain.GetReason(out reason);
- return reason;
- }
- }
-
- public CorRegisterSet RegisterSet
- {
- get
- {
- ICorDebugRegisterSet r = null;
- m_chain.GetRegisterSet (out r);
- return r==null?null:new CorRegisterSet (r);
- }
- }
-
- public void GetStackRange(out Int64 pStart, out Int64 pEnd)
- {
- UInt64 start = 0;
- UInt64 end = 0;
- m_chain.GetStackRange(out start, out end);
- pStart = (Int64) start;
- pEnd = (Int64) end;
- }
-
- public CorThread Thread
- {
- get
- {
- ICorDebugThread ithread;
- m_chain.GetThread(out ithread);
- return ( ithread==null ? null : new CorThread(ithread) );
- }
- }
-
- public bool IsManaged
- {
- get
- {
- int managed;
- m_chain.IsManaged(out managed);
- return ( managed!=0 ? true : false );
- }
- }
-
- public IEnumerable Frames
- {
- get
- {
- ICorDebugFrameEnum ef = null;
- m_chain.EnumerateFrames (out ef);
- return (ef==null)?null:new CorFrameEnumerator (ef);
- }
- }
-
- private ICorDebugChain m_chain;
- }
-
- internal class CorFrameEnumerator : IEnumerable, IEnumerator, ICloneable
- {
- internal CorFrameEnumerator (ICorDebugFrameEnum frameEnumerator)
- {
- m_enum = frameEnumerator;
- }
-
- //
- // ICloneable interface
- //
- public Object Clone ()
- {
- ICorDebugEnum clone = null;
- m_enum.Clone (out clone);
- return new CorFrameEnumerator ((ICorDebugFrameEnum)clone);
- }
-
- //
- // IEnumerable interface
- //
- public IEnumerator GetEnumerator ()
- {
- return this;
- }
-
- //
- // IEnumerator interface
- //
- public bool MoveNext ()
- {
- ICorDebugFrame[] a = new ICorDebugFrame[1];
- uint c = 0;
- int r = m_enum.Next ((uint)a.Length, a, out c);
- if (r==0 && c==1) // S_OK && we got 1 new element
- m_frame = new CorFrame (a[0]);
- else
- m_frame = null;
- return m_frame != null;
- }
-
- public void Reset ()
- {
- m_enum.Reset ();
- m_frame = null;
- }
-
- public Object Current
- {
- get
- {
- return m_frame;
- }
- }
-
- private ICorDebugFrameEnum m_enum;
- private CorFrame m_frame;
- }
-
-
- public struct IL2NativeMap
- {
- public int IlOffset
- {
- get
- {
- return m_ilOffset;
- }
- }
- private int m_ilOffset;
-
- public int NativeStartOffset
- {
- get
- {
- return m_nativeStartOffset;
- }
- }
- private int m_nativeStartOffset;
-
- public int NativeEndOffset
- {
- get
- {
- return m_nativeEndOffset;
- }
- }
- private int m_nativeEndOffset;
-
- internal IL2NativeMap(int ilOffset, int nativeStartOffset, int nativeEndOffset)
- {
- m_ilOffset = ilOffset;
- m_nativeStartOffset = nativeStartOffset;
- m_nativeEndOffset = nativeEndOffset;
- }
- }
-
-
- public sealed class CorCode : WrapperBase
- {
- internal CorCode(ICorDebugCode code)
- :base(code)
- {
- m_code = code;
- }
-
-
- public CorFunctionBreakpoint CreateBreakpoint(int offset)
- {
- ICorDebugFunctionBreakpoint ibreakpoint;
- m_code.CreateBreakpoint((uint)offset,out ibreakpoint);
- return ( ibreakpoint==null ? null : new CorFunctionBreakpoint(ibreakpoint) );
- }
-
- [CLSCompliant(false)]
- public ulong Address
- {
- get
- {
- UInt64 start;
- m_code.GetAddress(out start);
- return start;
- }
- }
-
- public CorDebugJITCompilerFlags CompilerFlags
- {
- get
- {
- uint dwFlags;
- (m_code as ICorDebugCode2).GetCompilerFlags(out dwFlags);
- return (CorDebugJITCompilerFlags)dwFlags;
- }
- }
-
- public byte[] GetCode()
- {
- uint codeSize = (uint)this.Size;
-
- byte[] code = new byte[codeSize];
- uint returnedCode;
- m_code.GetCode(0,codeSize,codeSize,code,out returnedCode);
- Debug.Assert(returnedCode==codeSize);
- return code;
- }
-
- [CLSCompliant(false)]
- public _CodeChunkInfo[] GetCodeChunks()
- {
- UInt32 pcnumChunks;
- (m_code as ICorDebugCode2).GetCodeChunks(0, out pcnumChunks, null);
- if (pcnumChunks == 0)
- return new _CodeChunkInfo[0];
-
- _CodeChunkInfo[] chunks = new _CodeChunkInfo[pcnumChunks];
- (m_code as ICorDebugCode2).GetCodeChunks((uint)chunks.Length, out pcnumChunks, chunks);
- return chunks;
- }
-
- public CorFunction GetFunction()
- {
- ICorDebugFunction ifunction;
- m_code.GetFunction(out ifunction);
- return ( ifunction==null ? null : new CorFunction(ifunction) );
- }
-
- public IL2NativeMap[] GetILToNativeMapping()
- {
- UInt32 pcMap;
- m_code.GetILToNativeMapping(0,out pcMap,null);
- if(pcMap==0)
- return new IL2NativeMap[0];
-
- COR_DEBUG_IL_TO_NATIVE_MAP[] map = new COR_DEBUG_IL_TO_NATIVE_MAP[pcMap];
- m_code.GetILToNativeMapping((uint)map.Length,out pcMap,map);
-
- IL2NativeMap[] ret = new IL2NativeMap[map.Length];
- for(int i=0;i<map.Length;i++)
- {
- ret[i] = new IL2NativeMap((int) map[i].ilOffset,
- (int) map[i].nativeStartOffset,
- (int) map[i].nativeEndOffset
- );
- }
- return ret;
- }
-
- [CLSCompliant(false)]
- public int Size
- {
- get
- {
- UInt32 pcBytes;
- m_code.GetSize(out pcBytes);
- return (int)pcBytes;
- }
- }
-
- public int VersionNumber
- {
- get
- {
- UInt32 nVersion;
- m_code.GetVersionNumber(out nVersion);
- return (int)nVersion;
- }
- }
-
- public bool IsIL
- {
- get
- {
- Int32 pbIL;
- m_code.IsIL(out pbIL);
- return ( pbIL != 0 ? true : false );
- }
- }
-
- private ICorDebugCode m_code;
- }
-
- /** Exposes an enumerator for CodeEnum. */
- internal class CorCodeEnumerator : IEnumerable, IEnumerator, ICloneable
- {
- private ICorDebugCodeEnum m_enum;
- private CorCode m_c;
-
- internal CorCodeEnumerator (ICorDebugCodeEnum codeEnumerator)
- {
- m_enum = codeEnumerator;
- }
-
- //
- // ICloneable interface
- //
- public Object Clone ()
- {
- ICorDebugEnum clone = null;
- m_enum.Clone (out clone);
- return new CorCodeEnumerator ((ICorDebugCodeEnum)clone);
- }
-
- //
- // IEnumerable interface
- //
- public IEnumerator GetEnumerator ()
- {
- return this;
- }
-
- //
- // IEnumerator interface
- //
- public bool MoveNext ()
- {
- ICorDebugCode[] a = new ICorDebugCode[1];
- uint c = 0;
- int r = m_enum.Next ((uint) a.Length, a, out c);
- if (r==0 && c==1) // S_OK && we got 1 new element
- m_c = new CorCode (a[0]);
- else
- m_c = null;
- return m_c != null;
- }
-
- public void Skip (uint celt)
- {
- m_enum.Skip (celt);
- m_c = null;
- }
-
- public void Reset ()
- {
- m_enum.Reset ();
- m_c = null;
- }
-
- public Object Current
- {
- get
- {
- return m_c;
- }
- }
- } /* class CodeEnumerator */
-
- public sealed class CorFunction : WrapperBase
- {
- internal CorFunction(ICorDebugFunction managedFunction)
- :base(managedFunction)
- {
- m_function = managedFunction;
- }
-
-
- public CorFunctionBreakpoint CreateBreakpoint()
- {
- ICorDebugFunctionBreakpoint ifuncbreakpoint;
- m_function.CreateBreakpoint(out ifuncbreakpoint);
- return ( ifuncbreakpoint==null ? null : new CorFunctionBreakpoint(ifuncbreakpoint) );
- }
-
- public CorClass Class
- {
- get
- {
- ICorDebugClass iclass;
- m_function.GetClass(out iclass);
- return ( iclass==null ? null : new CorClass(iclass) );
- }
- }
-
-
- public CorCode ILCode
- {
- get
- {
- ICorDebugCode icode;
- m_function.GetILCode(out icode);
- return ( icode==null ? null : new CorCode(icode) );
- }
- }
-
- public CorCode NativeCode
- {
- get
- {
- ICorDebugCode icode;
- m_function.GetNativeCode(out icode);
- return ( icode==null ? null : new CorCode(icode) );
- }
- }
-
-
- public CorModule Module
- {
- get
- {
- ICorDebugModule imodule;
- m_function.GetModule(out imodule);
- return ( imodule==null ? null : new CorModule(imodule) );
- }
- }
-
- public int Token
- {
- get
- {
- UInt32 pMethodDef;
- m_function.GetToken(out pMethodDef);
- return (int)pMethodDef;
- }
- }
-
- public int Version
- {
- get
- {
- UInt32 pVersion;
- (m_function as ICorDebugFunction2).GetVersionNumber(out pVersion);
- return (int)pVersion;
- }
- }
-
- public bool JMCStatus
- {
- get
- {
- int status;
- (m_function as ICorDebugFunction2).GetJMCStatus(out status);
- return status!=0;
- }
- set
- {
- (m_function as ICorDebugFunction2).SetJMCStatus(value?1:0);
- }
- }
- internal ICorDebugFunction m_function;
- }
-
- public sealed class CorContext : WrapperBase
- {
- internal CorContext(ICorDebugContext context)
- :base(context)
- {
- m_context = context;
- }
-
-
-
- // Following functions are not implemented
- /*
- void CreateBreakpoint(ref CORDBLib.ICorDebugValueBreakpoint ppBreakpoint);
- void GetAddress(ref UInt64 pAddress);
- void GetClass(ref CORDBLib.ICorDebugClass ppClass);
- void GetContext(ref CORDBLib.ICorDebugContext ppContext);
- void GetFieldValue(CORDBLib.ICorDebugClass pClass, UInt32 fieldDef, ref CORDBLib.ICorDebugValue ppValue);
- void GetManagedCopy(ref Object ppObject);
- void GetSize(ref UInt32 pSize);
- void GetType(ref UInt32 pType);
- void GetVirtualMethod(UInt32 memberRef, ref CORDBLib.ICorDebugFunction ppFunction);
- void IsValueClass(ref Int32 pbIsValueClass);
- void SetFromManagedCopy(object pObject);
- */
- private ICorDebugContext m_context;
- }
-
- [Serializable]
- public class CorException : Exception
- {
- /// <summary>
- /// Initializes a new instance of the CorException.
- /// </summary>
- public CorException()
- {
- }
-
- /// <summary>
- /// Initializes a new instance of the CorException with the specified error message.
- /// </summary>
- /// <param name="message">The message that describes the error.</param>
- public CorException(string message)
- : base(message)
- {
- }
-
- /// <summary>
- /// Initializes a new instance of the CorException with the specified error message and inner Exception.
- /// </summary>
- /// <param name="message">The message that describes the error.</param>
- /// <param name="innerException">The exception that is the cause of the current exception.</param>
- public CorException(string message, Exception innerException)
- : base(message, innerException)
- {
- }
-
- /// <summary>
- /// Initializes a new instance of the CorException class with serialized data.
- /// </summary>
- /// <param name="info">The SerializationInfo that holds the serialized object data about the exception being thrown.</param>
- /// <param name="context">The StreamingContext that contains contextual information about the source or destination.</param>
- protected CorException(SerializationInfo info, StreamingContext context)
- : base(info,context)
- {
- }
- }
-
-} /* namespace */
diff --git a/main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/debug/ThreadEnumerator.cs b/main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/debug/ThreadEnumerator.cs deleted file mode 100644 index 29b043d94f..0000000000 --- a/main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/debug/ThreadEnumerator.cs +++ /dev/null @@ -1,71 +0,0 @@ -//---------------------------------------------------------------------
-// This file is part of the CLR Managed Debugger (mdbg) Sample.
-//
-// Copyright (C) Microsoft Corporation. All rights reserved.
-//---------------------------------------------------------------------
-using System;
-using System.Collections;
-
-using Microsoft.Samples.Debugging.CorDebug.NativeApi;
-
-namespace Microsoft.Samples.Debugging.CorDebug
-{
- /** Exposes an enumerator for Threads. */
- internal class CorThreadEnumerator : IEnumerable, IEnumerator, ICloneable
- {
- private ICorDebugThreadEnum m_enum;
- private CorThread m_th;
-
- internal CorThreadEnumerator (ICorDebugThreadEnum threadEnumerator)
- {
- m_enum = threadEnumerator;
- }
-
- //
- // ICloneable interface
- //
- public Object Clone ()
- {
- ICorDebugEnum clone = null;
- m_enum.Clone (out clone);
- return new CorThreadEnumerator ((ICorDebugThreadEnum)clone);
- }
-
- //
- // IEnumerable interface
- //
- public IEnumerator GetEnumerator ()
- {
- return this;
- }
-
- //
- // IEnumerator interface
- //
- public bool MoveNext ()
- {
- ICorDebugThread[] a = new ICorDebugThread[1];
- uint c = 0;
- int r = m_enum.Next ((uint) a.Length, a, out c);
- if (r==0 && c==1) // S_OK && we got 1 new element
- m_th = new CorThread (a[0]);
- else
- m_th = null;
- return m_th != null;
- }
-
- public void Reset ()
- {
- m_enum.Reset ();
- m_th = null;
- }
-
- public Object Current
- {
- get
- {
- return m_th;
- }
- }
- } /* class ThreadEnumerator */
-} /* namespace */
diff --git a/main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/debug/Type.cs b/main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/debug/Type.cs deleted file mode 100644 index d15b35b190..0000000000 --- a/main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/debug/Type.cs +++ /dev/null @@ -1,109 +0,0 @@ -//---------------------------------------------------------------------
-// This file is part of the CLR Managed Debugger (mdbg) Sample.
-//
-// Copyright (C) Microsoft Corporation. All rights reserved.
-//---------------------------------------------------------------------
-using System;
-using System.Collections;
-using System.Collections.Generic;
-
-using Microsoft.Samples.Debugging.CorDebug.NativeApi;
-
-namespace Microsoft.Samples.Debugging.CorDebug
-{
- public sealed class CorType : WrapperBase
- {
- internal ICorDebugType m_type;
-
- internal CorType (ICorDebugType type)
- : base(type)
- {
- m_type = type;
- }
-
- internal ICorDebugType GetInterface ()
- {
- return m_type;
- }
-
-
- /** Element type of the type. */
- public CorElementType Type
- {
- get
- {
- CorElementType type;
- m_type.GetType (out type);
- return type;
- }
- }
-
- /** Class of the type */
- public CorClass Class
- {
- get
- {
- ICorDebugClass c = null;
- m_type.GetClass(out c);
- return c==null?null:new CorClass (c);
- }
- }
-
- public int Rank
- {
- get
- {
- uint pRank= 0;
- m_type.GetRank (out pRank);
- return (int)pRank;
- }
- }
-
- // Provide the first CorType parameter in the TypeParameters collection.
- // This is a convenience operator.
- public CorType FirstTypeParameter
- {
- get
- {
- ICorDebugType dt = null;
- m_type.GetFirstTypeParameter(out dt);
- return dt==null?null:new CorType (dt);
- }
- }
-
- public CorType Base
- {
- get
- {
- ICorDebugType dt = null;
- m_type.GetBase(out dt);
- return dt==null?null:new CorType (dt);
- }
- }
-
- public CorValue GetStaticFieldValue(int fieldToken, CorFrame frame)
- {
- ICorDebugValue dv = null;
- m_type.GetStaticFieldValue((uint)fieldToken, frame.m_frame, out dv);
- return dv==null?null:new CorValue (dv);
- }
-
- // [Xamarin] Expression evaluator.
- // Expose IEnumerable, which can be used with for-each constructs.
- // This will provide an collection of CorType parameters.
- public CorType[] TypeParameters
- {
- get
- {
- List<CorType> list = new List<CorType> ();
- ICorDebugTypeEnum etp = null;
- m_type.EnumerateTypeParameters (out etp);
- if (etp==null) return null;
- foreach (CorType t in new CorTypeEnumerator (etp))
- list.Add (t);
- return list.ToArray ();
- //return new CorTypeEnumerator (etp);
- }
- }
- } /* class Type */
-} /* namespace */
diff --git a/main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/debug/TypeEnumerator.cs b/main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/debug/TypeEnumerator.cs deleted file mode 100644 index ab6b627aba..0000000000 --- a/main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/debug/TypeEnumerator.cs +++ /dev/null @@ -1,95 +0,0 @@ -//---------------------------------------------------------------------
-// This file is part of the CLR Managed Debugger (mdbg) Sample.
-//
-// Copyright (C) Microsoft Corporation. All rights reserved.
-//---------------------------------------------------------------------
-using System;
-using System.Collections;
-
-using Microsoft.Samples.Debugging.CorDebug.NativeApi;
-
-namespace Microsoft.Samples.Debugging.CorDebug
-{
- /** Exposes an enumerator for Types. */
- public class CorTypeEnumerator : IEnumerable, IEnumerator, ICloneable
- {
- private ICorDebugTypeEnum m_enum;
- private CorType m_ty;
-
- internal CorTypeEnumerator (ICorDebugTypeEnum typeEnumerator)
- {
- m_enum = typeEnumerator;
- }
-
- //
- // ICloneable interface
- //
- public Object Clone ()
- {
- ICorDebugEnum clone = null;
- if( m_enum!=null )
- m_enum.Clone (out clone);
- return new CorTypeEnumerator ((ICorDebugTypeEnum)clone);
- }
-
- //
- // IEnumerable interface
- //
- public IEnumerator GetEnumerator ()
- {
- return this;
- }
-
- //
- // IEnumerator interface
- //
- public bool MoveNext ()
- {
- if( m_enum==null )
- return false;
-
- ICorDebugType[] a = new ICorDebugType[1];
- uint c = 0;
- int r = m_enum.Next ((uint) a.Length, a, out c);
- if (r==0 && c==1) // S_OK && we got 1 new element
- m_ty = new CorType (a[0]);
- else
- m_ty = null;
- return m_ty != null;
- }
-
- public void Reset ()
- {
- if( m_enum!=null )
- m_enum.Reset ();
- m_ty = null;
- }
-
- public void Skip (int celt)
- {
- m_enum.Skip ((uint)celt);
- m_ty = null;
- }
-
- public Object Current
- {
- get
- {
- return m_ty;
- }
- }
-
- // Returns total elements in the collection.
- public int Count
- {
- get
- {
- if (m_enum == null) return 0;
- uint count = 0;
- m_enum.GetCount(out count);
- return (int) count;
-
- }
- }
- } /* class TypeEnumerator */
-} /* namespace */
diff --git a/main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/debug/Value.cs b/main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/debug/Value.cs deleted file mode 100644 index 4e288b0027..0000000000 --- a/main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/debug/Value.cs +++ /dev/null @@ -1,813 +0,0 @@ -//---------------------------------------------------------------------
-// This file is part of the CLR Managed Debugger (mdbg) Sample.
-//
-// Copyright (C) Microsoft Corporation. All rights reserved.
-//---------------------------------------------------------------------
-using System;
-using System.Text;
-using System.Diagnostics;
-
-using Microsoft.Samples.Debugging.CorDebug.NativeApi;
-
-namespace Microsoft.Samples.Debugging.CorDebug
-{
-
-
- /** A value in the remote process. */
- public class CorValue : WrapperBase
- {
- internal CorValue (ICorDebugValue value)
- :base(value)
- {
- m_val = value;
- }
-
- /** The simple type of the value. */
- public CorElementType Type
- {
- get
- {
- CorElementType varType;
- m_val.GetType(out varType);
- return varType;
- }
- }
-
- /** Full runtime type of the object . */
- public CorType ExactType
- {
- get
- {
- ICorDebugValue2 v2 = (ICorDebugValue2) m_val;
- ICorDebugType dt;
- v2.GetExactType(out dt);
- return new CorType (dt);
- }
- }
-
- /** size of the value (in bytes). */
- public int Size
- {
- get
- {
- uint s = 0;
- m_val.GetSize (out s);
- return (int) s;
- }
- }
-
- /** Address of the value in the debuggee process. */
- public long Address
- {
- get
- {
- ulong addr = 0;
- m_val.GetAddress (out addr);
- return (long) addr;
- }
- }
-
- /** Breakpoint triggered when the value is modified. */
- public CorValueBreakpoint CreateBreakpoint ()
- {
- ICorDebugValueBreakpoint bp = null;
- m_val.CreateBreakpoint (out bp);
- return new CorValueBreakpoint (bp);
- }
-
- // casting operations
- public CorReferenceValue CastToReferenceValue()
- {
- if(m_val is ICorDebugReferenceValue)
- return new CorReferenceValue((ICorDebugReferenceValue)m_val);
- else
- return null;
- }
-
- public CorHandleValue CastToHandleValue()
- {
- if(m_val is ICorDebugHandleValue)
- return new CorHandleValue((ICorDebugHandleValue)m_val);
- else
- return null;
- }
-
- public CorStringValue CastToStringValue()
- {
- return new CorStringValue((ICorDebugStringValue)m_val);
- }
-
- public CorObjectValue CastToObjectValue()
- {
- return new CorObjectValue((ICorDebugObjectValue)m_val);
- }
-
- public CorGenericValue CastToGenericValue()
- {
- if(m_val is ICorDebugGenericValue)
- return new CorGenericValue((ICorDebugGenericValue)m_val);
- else
- return null;
- }
-
- public CorBoxValue CastToBoxValue()
- {
- if(m_val is ICorDebugBoxValue)
- return new CorBoxValue((ICorDebugBoxValue)m_val);
- else
- return null;
- }
-
- public CorArrayValue CastToArrayValue()
- {
- if(m_val is ICorDebugArrayValue)
- return new CorArrayValue((ICorDebugArrayValue)m_val);
- else
- return null;
- }
-
- public CorHeapValue CastToHeapValue()
- {
- if(m_val is ICorDebugHeapValue)
- return new CorHeapValue((ICorDebugHeapValue)m_val);
- else
- return null;
- }
-
- internal ICorDebugValue m_val=null;
-
- } /* class Value */
-
-
- public class CorReferenceValue : CorValue
- {
-
- internal CorReferenceValue(ICorDebugReferenceValue referenceValue) : base(referenceValue)
- {
- m_refVal = referenceValue;
- }
-
- public Int64 Value
- {
- get
- {
- UInt64 v;
- m_refVal.GetValue(out v);
- return (Int64) v;
- }
- set
- {
- UInt64 v = (UInt64) value;
- m_refVal.SetValue(v);
- }
- }
-
- public bool IsNull
- {
- get
- {
- int bNull;
- m_refVal.IsNull(out bNull);
- return (bNull==0)?false:true;
- }
- }
-
- public CorValue Dereference()
- {
- ICorDebugValue v;
- m_refVal.Dereference(out v);
- return (v==null?null:new CorValue(v));
- }
-
- private ICorDebugReferenceValue m_refVal = null;
- }
-
-
- public sealed class CorHandleValue : CorReferenceValue, System.IDisposable
- {
-
- internal CorHandleValue(ICorDebugHandleValue handleValue) : base(handleValue)
- {
- m_handleVal = handleValue;
- }
-
- public void Dispose()
- {
- // The underlying ICorDebugHandle has a Dispose() method which will free
- // its resources (a GC handle). We call that now to free things sooner.
- // If we don't call it now, it will still get freed at some random point after
- // the final release (which the finalizer will call).
- try
- {
- // This is just a best-effort to cleanup resources early.
- // If it fails, just swallow and move on.
- // May throw if handle was already disposed, or if process is not stopped.
- m_handleVal.Dispose();
- }
- catch
- {
- // swallow all
- }
- }
-
- [CLSCompliant(false)]
- public CorDebugHandleType HandleType
- {
- get
- {
- CorDebugHandleType ht;
- m_handleVal.GetHandleType(out ht);
- return ht;
- }
- }
- private ICorDebugHandleValue m_handleVal = null;
- }
-
- public sealed class CorStringValue : CorValue
- {
-
- internal CorStringValue(ICorDebugStringValue stringValue) : base(stringValue)
- {
- m_strVal = stringValue;
- }
-
- public bool IsValid
- {
- get
- {
- int bValid;
- m_strVal.IsValid(out bValid);
- return (bValid==0)?false:true;
- }
- }
-
- public string String
- {
- get
- {
- uint stringSize;
- StringBuilder sb = new StringBuilder(Length+1); // we need one extra char for null
- m_strVal.GetString((uint)sb.Capacity,out stringSize,sb);
- return sb.ToString();
- }
- }
-
- public int Length
- {
- get
- {
- uint stringSize;
- m_strVal.GetLength(out stringSize);
- return (int)stringSize;
- }
- }
-
- private ICorDebugStringValue m_strVal = null;
- }
-
-
- public sealed class CorObjectValue : CorValue
- {
- internal CorObjectValue(ICorDebugObjectValue objectValue) : base(objectValue)
- {
- m_objVal = objectValue;
- }
-
- public CorClass Class
- {
- get
- {
- ICorDebugClass iclass;
- m_objVal.GetClass(out iclass);
- return (iclass==null)?null:new CorClass(iclass);
- }
- }
-
- public CorValue GetFieldValue(CorClass managedClass,int fieldToken)
- {
- ICorDebugValue val;
- m_objVal.GetFieldValue(managedClass.m_class,(uint)fieldToken,out val);
- return new CorValue(val);
- }
-
- public CorType GetVirtualMethodAndType(int memberToken, out CorFunction managedFunction)
- {
- ICorDebugType dt = null;
- ICorDebugFunction pfunc = null;
- (m_objVal as ICorDebugObjectValue2).GetVirtualMethodAndType((uint)memberToken, out pfunc, out dt);
- if (pfunc == null)
- managedFunction = null;
- else
- managedFunction = new CorFunction (pfunc);
- return dt==null?null:new CorType (dt);
- }
-
-
- public bool IsValueClass
- {
- get
- {
- int bIsValueClass;
- m_objVal.IsValueClass(out bIsValueClass);
- return bIsValueClass!=0;
- }
- }
-
- // public Object GetManagedCopy() -- deprecated, therefore we won't make it available at all.
- private ICorDebugObjectValue m_objVal = null;
- }
-
- public sealed class CorGenericValue : CorValue
- {
- internal CorGenericValue(ICorDebugGenericValue genericValue) : base(genericValue)
- {
- m_genVal = genericValue;
- }
-
- // Convert the supplied value to the type of this CorGenericValue using System.IConvertable.
- // Then store the value into this CorGenericValue. Any compatible type can be supplied.
- // For example, if you supply a string and the underlying type is ELEMENT_TYPE_BOOLEAN,
- // Convert.ToBoolean will attempt to match the string against "true" and "false".
- public void SetValue(object value)
- {
- try
- {
- switch (this.Type)
- {
- case CorElementType.ELEMENT_TYPE_BOOLEAN:
- bool v = Convert.ToBoolean( value );
- unsafe
- {
- SetValueInternal( new IntPtr( &v ) );
- }
- break;
-
- case CorElementType.ELEMENT_TYPE_I1:
- SByte sbv = Convert.ToSByte( value );
- unsafe
- {
- SetValueInternal( new IntPtr( &sbv ) );
- }
- break;
-
- case CorElementType.ELEMENT_TYPE_U1:
- Byte bv = Convert.ToByte( value );
- unsafe
- {
- SetValueInternal( new IntPtr( &bv ) );
- }
- break;
-
- case CorElementType.ELEMENT_TYPE_CHAR:
- Char cv = Convert.ToChar( value );
- unsafe
- {
- SetValueInternal( new IntPtr( &cv ) );
- }
- break;
-
- case CorElementType.ELEMENT_TYPE_I2:
- Int16 i16v = Convert.ToInt16( value );
- unsafe
- {
- SetValueInternal( new IntPtr( &i16v ) );
- }
- break;
-
- case CorElementType.ELEMENT_TYPE_U2:
- UInt16 u16v = Convert.ToUInt16( value );
- unsafe
- {
- SetValueInternal( new IntPtr( &u16v ) );
- }
- break;
-
- case CorElementType.ELEMENT_TYPE_I4:
- Int32 i32v = Convert.ToInt32( value );
- unsafe
- {
- SetValueInternal( new IntPtr( &i32v ) );
- }
- break;
-
- case CorElementType.ELEMENT_TYPE_U4:
- UInt32 u32v = Convert.ToUInt32( value );
- unsafe
- {
- SetValueInternal( new IntPtr( &u32v ) );
- }
- break;
-
- case CorElementType.ELEMENT_TYPE_I:
- Int64 ip64v = Convert.ToInt64( value );
- IntPtr ipv = new IntPtr( ip64v );
- unsafe
- {
- SetValueInternal( new IntPtr( &ipv ) );
- }
- break;
-
- case CorElementType.ELEMENT_TYPE_U:
- UInt64 ipu64v = Convert.ToUInt64( value );
- UIntPtr uipv = new UIntPtr( ipu64v );
- unsafe
- {
- SetValueInternal( new IntPtr( &uipv ) );
- }
- break;
-
- case CorElementType.ELEMENT_TYPE_I8:
- Int64 i64v = Convert.ToInt64( value );
- unsafe
- {
- SetValueInternal( new IntPtr( &i64v ) );
- }
- break;
-
- case CorElementType.ELEMENT_TYPE_U8:
- UInt64 u64v = Convert.ToUInt64( value );
- unsafe
- {
- SetValueInternal( new IntPtr( &u64v ) );
- }
- break;
-
- case CorElementType.ELEMENT_TYPE_R4:
- Single sv = Convert.ToSingle( value );
- unsafe
- {
- SetValueInternal( new IntPtr( &sv ) );
- }
- break;
-
- case CorElementType.ELEMENT_TYPE_R8:
- Double dv = Convert.ToDouble( value );
- unsafe
- {
- SetValueInternal( new IntPtr( &dv ) );
- }
- break;
-
- case CorElementType.ELEMENT_TYPE_VALUETYPE:
- byte[] bav = (byte[]) value;
- unsafe
- {
- fixed (byte* bufferPtr = &bav[0])
- {
- Debug.Assert(this.Size == bav.Length);
- m_genVal.SetValue(new IntPtr(bufferPtr));
- }
- }
- break;
-
- default:
- throw new InvalidOperationException("Type passed is not recognized.");
- }
- }
- catch (InvalidCastException e)
- {
- throw new InvalidOperationException("Wrong type used for SetValue command", e);
- }
- }
-
- public object GetValue()
- {
- return UnsafeGetValueAsType(this.Type);
- }
-
- /// <summary>
- /// Get the value as an array of IntPtrs.
- /// </summary>
- public IntPtr[] GetValueAsIntPtrArray()
- {
- int ptrsize=IntPtr.Size;
- int cElem = (this.Size + ptrsize-1) / ptrsize;
- IntPtr[] buffer = new IntPtr[cElem];
-
- unsafe
- {
- fixed (IntPtr* bufferPtr = &buffer[0])
- {
- this.GetValueInternal( new IntPtr(bufferPtr));
- }
- }
- return buffer;
- }
-
- public Object UnsafeGetValueAsType(CorElementType type)
- {
- switch(type)
- {
- case CorElementType.ELEMENT_TYPE_BOOLEAN:
- byte bValue=4; // just initialize to avoid compiler warnings
- unsafe
- {
- Debug.Assert(this.Size==sizeof(byte));
- this.GetValueInternal(new IntPtr(&bValue));
- }
- return (object) (bValue!=0);
-
- case CorElementType.ELEMENT_TYPE_CHAR:
- char cValue='a'; // initialize to avoid compiler warnings
- unsafe
- {
- Debug.Assert(this.Size==sizeof(char));
- this.GetValueInternal(new IntPtr(&cValue));
- }
- return (object) cValue;
-
- case CorElementType.ELEMENT_TYPE_I1:
- SByte i1Value=4;
- unsafe
- {
- Debug.Assert(this.Size==sizeof(SByte));
- this.GetValueInternal(new IntPtr(&i1Value));
- }
- return (object) i1Value;
-
- case CorElementType.ELEMENT_TYPE_U1:
- Byte u1Value=4;
- unsafe
- {
- Debug.Assert(this.Size==sizeof(Byte));
- this.GetValueInternal(new IntPtr(&u1Value));
- }
- return (object) u1Value;
-
- case CorElementType.ELEMENT_TYPE_I2:
- Int16 i2Value=4;
- unsafe
- {
- Debug.Assert(this.Size==sizeof(Int16));
- this.GetValueInternal(new IntPtr(&i2Value));
- }
- return (object) i2Value;
-
- case CorElementType.ELEMENT_TYPE_U2:
- UInt16 u2Value=4;
- unsafe
- {
- Debug.Assert(this.Size==sizeof(UInt16));
- this.GetValueInternal(new IntPtr(&u2Value));
- }
- return (object) u2Value;
-
- case CorElementType.ELEMENT_TYPE_I:
- IntPtr ipValue=IntPtr.Zero;
- unsafe
- {
- Debug.Assert(this.Size==sizeof(IntPtr));
- this.GetValueInternal(new IntPtr(&ipValue));
- }
- return (object) ipValue;
-
- case CorElementType.ELEMENT_TYPE_U:
- UIntPtr uipValue=UIntPtr.Zero;
- unsafe
- {
- Debug.Assert(this.Size==sizeof(UIntPtr));
- this.GetValueInternal(new IntPtr(&uipValue));
- }
- return (object) uipValue;
-
- case CorElementType.ELEMENT_TYPE_I4:
- Int32 i4Value=4;
- unsafe
- {
- Debug.Assert(this.Size==sizeof(Int32));
- this.GetValueInternal(new IntPtr(&i4Value));
- }
- return (object) i4Value;
-
- case CorElementType.ELEMENT_TYPE_U4:
- UInt32 u4Value=4;
- unsafe
- {
- Debug.Assert(this.Size==sizeof(UInt32));
- this.GetValueInternal(new IntPtr(&u4Value));
- }
- return (object) u4Value;
-
- case CorElementType.ELEMENT_TYPE_I8:
- Int64 i8Value=4;
- unsafe
- {
- Debug.Assert(this.Size==sizeof(Int64));
- this.GetValueInternal(new IntPtr(&i8Value));
- }
- return (object) i8Value;
-
- case CorElementType.ELEMENT_TYPE_U8:
- UInt64 u8Value=4;
- unsafe
- {
- Debug.Assert(this.Size==sizeof(UInt64));
- this.GetValueInternal(new IntPtr(&u8Value));
- }
- return (object) u8Value;
-
- case CorElementType.ELEMENT_TYPE_R4:
- Single r4Value=4;
- unsafe
- {
- Debug.Assert(this.Size==sizeof(Single));
- this.GetValueInternal(new IntPtr(&r4Value));
- }
- return (object) r4Value;
-
- case CorElementType.ELEMENT_TYPE_R8:
- Double r8Value=4;
- unsafe
- {
- Debug.Assert(this.Size==sizeof(Double));
- this.GetValueInternal(new IntPtr(&r8Value));
- }
- return (object) r8Value;
-
-
- case CorElementType.ELEMENT_TYPE_VALUETYPE:
- byte[] buffer = new byte[this.Size];
- unsafe
- {
- fixed (byte* bufferPtr = &buffer[0])
- {
- Debug.Assert(this.Size == buffer.Length);
- this.GetValueInternal( new IntPtr(bufferPtr));
- }
- }
- return buffer;
-
- default:
- Debug.Assert(false,"Generic value should not be of any other type");
- throw new NotSupportedException();
- }
- }
-
-
- private void SetValueInternal(IntPtr valPtr)
- {
- m_genVal.SetValue(valPtr);
- }
-
- private void GetValueInternal( IntPtr valPtr )
- {
- m_genVal.GetValue(valPtr);
- }
-
- private ICorDebugGenericValue m_genVal = null;
- }
-
- public sealed class CorBoxValue : CorValue
- {
- internal CorBoxValue(ICorDebugBoxValue boxedValue): base(boxedValue)
- {
- m_boxVal = boxedValue;
- }
-
- public CorObjectValue GetObject()
- {
- ICorDebugObjectValue ov;
- m_boxVal.GetObject(out ov);
- return (ov==null)?null:new CorObjectValue(ov);
- }
-
- private ICorDebugBoxValue m_boxVal = null;
- }
-
- public sealed class CorArrayValue : CorValue
- {
- internal CorArrayValue(ICorDebugArrayValue arrayValue): base(arrayValue)
- {
- m_arrayVal = arrayValue;
- }
-
- //void CreateRelocBreakpoint(ref CORDBLib.ICorDebugValueBreakpoint ppBreakpoint);
- //void GetBaseIndicies(UInt32 cdim, IntPtr indicies);
-
- public int Count
- {
- get
- {
- uint pnCount;
- m_arrayVal.GetCount(out pnCount);
- return (int) pnCount;
- }
- }
-
-
- public CorElementType ElementType
- {
- get
- {
- CorElementType type;
- m_arrayVal.GetElementType(out type);
- return type;
- }
- }
-
- public int Rank
- {
- get
- {
- uint pnRank;
- m_arrayVal.GetRank(out pnRank);
- return (int)pnRank;
- }
- }
-
- public bool HasBaseIndicies
- {
- get
- {
- int pbHasBaseIndicies;
- m_arrayVal.HasBaseIndicies(out pbHasBaseIndicies);
- return pbHasBaseIndicies==0?false:true;
- }
- }
-
- public bool IsValid
- {
- get
- {
- int pbValid;
- m_arrayVal.IsValid(out pbValid);
- return pbValid==0?false:true;
- }
- }
-
- public int[] GetDimensions()
- {
- Debug.Assert(Rank!=0);
- uint[] dims = new uint[Rank];
- m_arrayVal.GetDimensions((uint)dims.Length,dims);
-
- int[] sdims = Array.ConvertAll<uint,int>( dims, delegate(uint u) { return (int)u; } );
- return sdims;
- }
-
- public int[] GetBaseIndicies()
- {
- Debug.Assert(Rank!=0);
- uint[] baseIndicies = new uint[Rank];
- m_arrayVal.GetBaseIndicies((uint)baseIndicies.Length,baseIndicies);
-
- int[] sdims = Array.ConvertAll<uint,int>( baseIndicies, delegate(uint u) { return (int)u; } );
- return sdims;
- }
-
- public CorValue GetElement(int[] indices)
- {
- Debug.Assert(indices!=null);
- ICorDebugValue ppValue;
- m_arrayVal.GetElement((uint)indices.Length,indices,out ppValue);
- return ppValue==null?null:new CorValue(ppValue);
- }
-
- public CorValue GetElementAtPosition(int position)
- {
- ICorDebugValue ppValue;
- m_arrayVal.GetElementAtPosition((uint)position,out ppValue);
- return ppValue==null?null:new CorValue(ppValue);
- }
- private ICorDebugArrayValue m_arrayVal = null;
- }
-
- public sealed class CorHeapValue : CorValue
- {
- internal CorHeapValue(ICorDebugHeapValue heapValue): base(heapValue)
- {
- m_heapVal = heapValue;
- }
-
- //void CreateRelocBreakpoint(ref Microsoft.Samples.Debugging.CorDebug.NativeApi.ICorDebugValueBreakpoint ppBreakpoint);
- public CorValueBreakpoint CreateRelocBreakpoint()
- {
- ICorDebugValueBreakpoint bp = null;
- m_heapVal.CreateRelocBreakpoint (out bp);
- return new CorValueBreakpoint (bp);
- }
-
- //void IsValid(ref Int32 pbValid);
- public bool IsValid
- {
- get
- {
- int bValid;
- m_heapVal.IsValid(out bValid);
- return bValid!=0;
- }
- }
-
- [CLSCompliant(false)]
- public CorHandleValue CreateHandle(CorDebugHandleType type)
- {
- ICorDebugHandleValue handle;
- (m_heapVal as ICorDebugHeapValue2).CreateHandle(type,out handle);
- return handle==null?null:new CorHandleValue(handle);
- }
-
-
- private ICorDebugHeapValue m_heapVal = null;
- }
-
-} /* namespace */
diff --git a/main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/debug/ValueBreakpoint.cs b/main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/debug/ValueBreakpoint.cs deleted file mode 100644 index 00a4d3d0dd..0000000000 --- a/main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/debug/ValueBreakpoint.cs +++ /dev/null @@ -1,31 +0,0 @@ -//---------------------------------------------------------------------
-// This file is part of the CLR Managed Debugger (mdbg) Sample.
-//
-// Copyright (C) Microsoft Corporation. All rights reserved.
-//---------------------------------------------------------------------
-using System;
-
-using Microsoft.Samples.Debugging.CorDebug.NativeApi;
-
-namespace Microsoft.Samples.Debugging.CorDebug
-{
- public sealed class CorValueBreakpoint : CorBreakpoint
- {
- private ICorDebugValueBreakpoint m_br;
-
- internal CorValueBreakpoint (ICorDebugValueBreakpoint breakpoint) : base(breakpoint)
- {
- m_br = breakpoint;
- }
-
- public CorValue Value
- {
- get
- {
- ICorDebugValue m = null;
- m_br.GetValue (out m);
- return new CorValue (m);
- }
- }
- } /* class ValueBreakpoint */
-} /* namespace */
diff --git a/main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/debug/WrapperBase.cs b/main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/debug/WrapperBase.cs deleted file mode 100644 index 7339507439..0000000000 --- a/main/src/addins/MonoDevelop.Debugger.Win32/CorApi2/debug/WrapperBase.cs +++ /dev/null @@ -1,86 +0,0 @@ -//---------------------------------------------------------------------
-// This file is part of the CLR Managed Debugger (mdbg) Sample.
-//
-// Copyright (C) Microsoft Corporation. All rights reserved.
-//---------------------------------------------------------------------
-using System;
-using System.Diagnostics;
-
-namespace Microsoft.Samples.Debugging.CorDebug
-{
- /* This class is base class for all the wrapper classes we have.
- * We overload equivalance operators, so that we can figure out,
- * compare object.
- *
- * The reason why we have to have this is described here:
- * Suppose we have a Wrapper WX for COM object X. We create an object WX
- * with operator new. The wrapper will create in it's constructor real
- * instance of native object X.
- * Now suppose that some oter native object Y have callback with an argument
- * X. We create a wrapper for it WY, which will implment the
- * callback that way that it converts argument X to WX and calls some event
- * defined in WY OnXXX. The conversion from X to WX is usually done by
- * creating new wrapper WX and attaching it to X.
- *
- * But now we cannot determine if the object WX returned from callback in WY
- * is the same as the one we have a reference to. We cannot use == operator
- * becuase we have two different wrappers.
- *
- * This class WrapperBase overloads ==,GetHashCode and Equals classes that
- * way that they operate on the inner pointers to native interfaces rather
- * than on wrapper object themselves.
- *
- * Also note that the COMobject is of type Object. This will actually cast
- * an object to IUnknown, which is the only realiable way to compare two
- * COM objects
- *
- * An alternative to the design of overloading == opeartor would be to have
- * a hash table of X=>WX and on each callback instead of creating new
- * wrapper, lookup an existing wrapper for an object.
- * I didn't use this technique here, because the debugger interfaces are
- * havily based on callbacks an looking up something in hashtable is more
- * expansive operation than creating new wrapper. Further the wrappers are
- * really light-weight -- they generally contain only pointer to the COM
- * obejct.
- */
-
- public abstract class WrapperBase : MarshalByRefObject
- {
- protected WrapperBase(Object value)
- {
- Debug.Assert(value!=null);
- m_comObject = value;
- }
-
- public override bool Equals(Object value)
- {
- if(!(value is WrapperBase))
- return false;
- return ((value as WrapperBase).m_comObject == this.m_comObject);
- }
-
- public override int GetHashCode()
- {
- return m_comObject.GetHashCode();
- }
-
- public static bool operator ==( WrapperBase operand,WrapperBase operand2)
- {
- if(Object.ReferenceEquals(operand,operand2))
- return true;
-
- if(Object.ReferenceEquals(operand, null)) // this means that operand==null && operand2 is not null
- return false;
-
- return operand.Equals(operand2);
- }
-
- public static bool operator !=( WrapperBase operand,WrapperBase operand2)
- {
- return !(operand==operand2);
- }
-
- private Object m_comObject;
- }
-
-} /* namespace */
diff --git a/main/src/addins/MonoDevelop.Debugger.Win32/Mono.Debugging.Win32.sln b/main/src/addins/MonoDevelop.Debugger.Win32/Mono.Debugging.Win32.sln deleted file mode 100644 index 9bfe1ee53e..0000000000 --- a/main/src/addins/MonoDevelop.Debugger.Win32/Mono.Debugging.Win32.sln +++ /dev/null @@ -1,40 +0,0 @@ -
-Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio 2013
-VisualStudioVersion = 12.0.40629.0
-MinimumVisualStudioVersion = 10.0.40219.1
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Mono.Debugging.Win32", "Mono.Debugging.Win32\Mono.Debugging.Win32.csproj", "{74704C00-5861-4F86-920C-865148A175C5}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CorApi2", "CorApi2\CorApi2.csproj", "{69136056-BFD3-4CEC-BB41-D9991C79593C}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CorApi", "CorApi\CorApi.csproj", "{9FBCC262-10DC-4E84-A5C4-17230BBF8862}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Mono.Debugging", "..\..\..\external\debugger-libs\Mono.Debugging\Mono.Debugging.csproj", "{90C99ADB-7D4B-4EB4-98C2-40BD1B14C7D2}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|Any CPU = Debug|Any CPU
- Release|Any CPU = Release|Any CPU
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {74704C00-5861-4F86-920C-865148A175C5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {74704C00-5861-4F86-920C-865148A175C5}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {74704C00-5861-4F86-920C-865148A175C5}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {74704C00-5861-4F86-920C-865148A175C5}.Release|Any CPU.Build.0 = Release|Any CPU
- {69136056-BFD3-4CEC-BB41-D9991C79593C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {69136056-BFD3-4CEC-BB41-D9991C79593C}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {69136056-BFD3-4CEC-BB41-D9991C79593C}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {69136056-BFD3-4CEC-BB41-D9991C79593C}.Release|Any CPU.Build.0 = Release|Any CPU
- {9FBCC262-10DC-4E84-A5C4-17230BBF8862}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {9FBCC262-10DC-4E84-A5C4-17230BBF8862}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {9FBCC262-10DC-4E84-A5C4-17230BBF8862}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {9FBCC262-10DC-4E84-A5C4-17230BBF8862}.Release|Any CPU.Build.0 = Release|Any CPU
- {90C99ADB-7D4B-4EB4-98C2-40BD1B14C7D2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {90C99ADB-7D4B-4EB4-98C2-40BD1B14C7D2}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {90C99ADB-7D4B-4EB4-98C2-40BD1B14C7D2}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {90C99ADB-7D4B-4EB4-98C2-40BD1B14C7D2}.Release|Any CPU.Build.0 = Release|Any CPU
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
-EndGlobal
diff --git a/main/src/addins/MonoDevelop.Debugger.Win32/Mono.Debugging.Win32/.editorconfig b/main/src/addins/MonoDevelop.Debugger.Win32/Mono.Debugging.Win32/.editorconfig deleted file mode 100644 index a061a7eb3c..0000000000 --- a/main/src/addins/MonoDevelop.Debugger.Win32/Mono.Debugging.Win32/.editorconfig +++ /dev/null @@ -1,4 +0,0 @@ -[*.cs]
-indent_style = tab
-indent_size = 4
-end_of_line = crlf
\ No newline at end of file diff --git a/main/src/addins/MonoDevelop.Debugger.Win32/Mono.Debugging.Win32/ArrayAdaptor.cs b/main/src/addins/MonoDevelop.Debugger.Win32/Mono.Debugging.Win32/ArrayAdaptor.cs deleted file mode 100644 index e5503323c7..0000000000 --- a/main/src/addins/MonoDevelop.Debugger.Win32/Mono.Debugging.Win32/ArrayAdaptor.cs +++ /dev/null @@ -1,100 +0,0 @@ -// ArrayAdaptor.cs -// -// Author: -// Lluis Sanchez Gual <lluis@novell.com> -// -// Copyright (c) 2008 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. -// -// - -using System; -using System.Collections; -using Microsoft.Samples.Debugging.CorDebug; -using Mono.Debugging.Evaluation; - -namespace Mono.Debugging.Win32 -{ - class ArrayAdaptor: ICollectionAdaptor - { - readonly CorEvaluationContext ctx; - readonly CorValRef<CorArrayValue> valRef; - - public ArrayAdaptor (EvaluationContext ctx, CorValRef<CorArrayValue> valRef) - { - this.ctx = (CorEvaluationContext) ctx; - this.valRef = valRef; - } - - public int[] GetLowerBounds () - { - var array = valRef.Val; - if (array != null && array.HasBaseIndicies) { - return array.GetBaseIndicies (); - } else { - return new int[GetDimensions ().Length]; - } - } - - public int[] GetDimensions () - { - var array = valRef.Val; - return array != null ? array.GetDimensions () : new int[0]; - } - - public object GetElement (int[] indices) - { - return new CorValRef (delegate { - var array = valRef.Val; - return array != null ? array.GetElement (indices) : null; - }); - } - - public Array GetElements (int[] indices, int count) - { - // FIXME: the point of this method is to be more efficient than getting 1 array element at a time... - var elements = new ArrayList (); - - int[] idx = new int[indices.Length]; - for (int i = 0; i < indices.Length; i++) - idx[i] = indices[i]; - - for (int i = 0; i < count; i++) { - elements.Add (GetElement ((int[])idx.Clone ())); - idx[idx.Length - 1]++; - } - - return elements.ToArray (); - } - - public void SetElement (int[] indices, object val) - { - CorValRef it = (CorValRef) GetElement (indices); - valRef.Invalidate (); - it.SetValue (ctx, (CorValRef) val); - } - - public object ElementType { - get { - return valRef.Val.ExactType.FirstTypeParameter; - } - } - } -} diff --git a/main/src/addins/MonoDevelop.Debugger.Win32/Mono.Debugging.Win32/CorDebuggerBacktrace.cs b/main/src/addins/MonoDevelop.Debugger.Win32/Mono.Debugging.Win32/CorDebuggerBacktrace.cs deleted file mode 100644 index ea3d64e164..0000000000 --- a/main/src/addins/MonoDevelop.Debugger.Win32/Mono.Debugging.Win32/CorDebuggerBacktrace.cs +++ /dev/null @@ -1,281 +0,0 @@ -using System.Collections.Generic;
-using System.Diagnostics.SymbolStore;
-using System.Reflection;
-using Microsoft.Samples.Debugging.CorDebug;
-using Microsoft.Samples.Debugging.CorDebug.NativeApi;
-using Microsoft.Samples.Debugging.CorMetadata;
-using Mono.Debugging.Client;
-using Mono.Debugging.Evaluation;
-using System.Linq;
-using System.Runtime.InteropServices;
-
-namespace Mono.Debugging.Win32
-{
- class CorBacktrace: BaseBacktrace
- {
- CorThread thread;
- readonly int threadId;
- readonly CorDebuggerSession session;
- List<CorFrame> frames;
- int evalTimestamp;
-
- public CorBacktrace (CorThread thread, CorDebuggerSession session): base (session.ObjectAdapter)
- {
- this.session = session;
- this.thread = thread;
- threadId = thread.Id;
- frames = new List<CorFrame> (GetFrames (thread));
- evalTimestamp = CorDebuggerSession.EvaluationTimestamp;
- }
-
- internal static IEnumerable<CorFrame> GetFrames (CorThread thread)
- {
- var corFrames = new List<CorFrame> ();
- try {
- foreach (CorChain chain in thread.Chains) {
- if (!chain.IsManaged)
- continue;
- try {
- var chainFrames = chain.Frames;
-
- foreach (CorFrame frame in chainFrames)
- corFrames.Add (frame);
- }
- catch (COMException e) {
- DebuggerLoggingService.LogMessage ("Failed to enumerate frames of chain: {0}", e.Message);
- }
- }
-
- }
- catch (COMException e) {
- DebuggerLoggingService.LogMessage ("Failed to enumerate chains of thread: {0}", e.Message);
- }
- return corFrames;
- }
-
- internal List<CorFrame> FrameList {
- get {
- if (evalTimestamp != CorDebuggerSession.EvaluationTimestamp) {
- thread = session.GetThread (threadId);
- frames = new List<CorFrame> (GetFrames (thread));
- evalTimestamp = CorDebuggerSession.EvaluationTimestamp;
- }
- return frames;
- }
- }
-
- protected override EvaluationContext GetEvaluationContext (int frameIndex, EvaluationOptions options)
- {
- CorEvaluationContext ctx = new CorEvaluationContext (session, this, frameIndex, options);
- ctx.Thread = thread;
- return ctx;
- }
-
- #region IBacktrace Members
-
- public override AssemblyLine[] Disassemble (int frameIndex, int firstLine, int count)
- {
- return new AssemblyLine[0];
- }
-
- public override int FrameCount
- {
- get { return FrameList.Count; }
- }
-
- public override StackFrame[] GetStackFrames (int firstIndex, int lastIndex)
- {
- if (lastIndex >= FrameList.Count)
- lastIndex = FrameList.Count - 1;
- StackFrame[] array = new StackFrame[lastIndex - firstIndex + 1];
- for (int n = 0; n < array.Length; n++)
- array[n] = CreateFrame (session, FrameList[n + firstIndex]);
- return array;
- }
-
- private const int SpecialSequencePoint = 0xfeefee;
-
- public static SequencePoint GetSequencePoint(CorDebuggerSession session, CorFrame frame)
- {
- ISymbolReader reader = session.GetReaderForModule (frame.Function.Module);
- if (reader == null)
- return null;
-
- ISymbolMethod met = reader.GetMethod (new SymbolToken (frame.Function.Token));
- if (met == null)
- return null;
-
- int SequenceCount = met.SequencePointCount;
- if (SequenceCount <= 0)
- return null;
-
- CorDebugMappingResult mappingResult;
- uint ip;
- frame.GetIP (out ip, out mappingResult);
- if (mappingResult == CorDebugMappingResult.MAPPING_NO_INFO || mappingResult == CorDebugMappingResult.MAPPING_UNMAPPED_ADDRESS)
- return null;
-
- int[] offsets = new int[SequenceCount];
- int[] lines = new int[SequenceCount];
- int[] endLines = new int[SequenceCount];
- int[] columns = new int[SequenceCount];
- int[] endColumns = new int[SequenceCount];
- ISymbolDocument[] docs = new ISymbolDocument[SequenceCount];
- met.GetSequencePoints (offsets, docs, lines, columns, endLines, endColumns);
-
- if ((SequenceCount > 0) && (offsets [0] <= ip)) {
- int i;
- for (i = 0; i < SequenceCount; ++i) {
- if (offsets [i] >= ip) {
- break;
- }
- }
-
- if ((i == SequenceCount) || (offsets [i] != ip)) {
- --i;
- }
-
- if (lines [i] == SpecialSequencePoint) {
- int j = i;
- // let's try to find a sequence point that is not special somewhere earlier in the code
- // stream.
- while (j > 0) {
- --j;
- if (lines [j] != SpecialSequencePoint) {
- return new SequencePoint () {
- IsSpecial = true,
- Offset = offsets [j],
- StartLine = lines [j],
- EndLine = endLines [j],
- StartColumn = columns [j],
- EndColumn = endColumns [j],
- Document = docs [j]
- };
- }
- }
- // we didn't find any non-special seqeunce point before current one, let's try to search
- // after.
- j = i;
- while (++j < SequenceCount) {
- if (lines [j] != SpecialSequencePoint) {
- return new SequencePoint () {
- IsSpecial = true,
- Offset = offsets [j],
- StartLine = lines [j],
- EndLine = endLines [j],
- StartColumn = columns [j],
- EndColumn = endColumns [j],
- Document = docs [j]
- };
- }
- }
-
- // Even if sp is null at this point, it's a valid scenario to have only special sequence
- // point in a function. For example, we can have a compiler-generated default ctor which
- // doesn't have any source.
- return null;
- } else {
- return new SequencePoint () {
- IsSpecial = false,
- Offset = offsets [i],
- StartLine = lines [i],
- EndLine = endLines [i],
- StartColumn = columns [i],
- EndColumn = endColumns [i],
- Document = docs [i]
- };
- }
- }
- return null;
- }
-
- internal static StackFrame CreateFrame (CorDebuggerSession session, CorFrame frame)
- {
- uint address = 0;
- string addressSpace = "";
- string file = "";
- int line = 0;
- int endLine = 0;
- int column = 0;
- int endColumn = 0;
- string method = "[Unknown]";
- string lang = "";
- string module = "";
- string type = "";
- bool hasDebugInfo = false;
- bool hidden = false;
- bool external = true;
-
- if (frame.FrameType == CorFrameType.ILFrame) {
- if (frame.Function != null) {
- module = frame.Function.Module.Name;
- CorMetadataImport importer = new CorMetadataImport (frame.Function.Module);
- MethodInfo mi = importer.GetMethodInfo (frame.Function.Token);
- var declaringType = mi.DeclaringType;
- if (declaringType != null) {
- method = declaringType.FullName + "." + mi.Name;
- type = declaringType.FullName;
- }
- else {
- method = mi.Name;
- }
-
- addressSpace = mi.Name;
-
- var sp = GetSequencePoint (session, frame);
- if (sp != null) {
- line = sp.StartLine;
- column = sp.StartColumn;
- endLine = sp.EndLine;
- endColumn = sp.EndColumn;
- file = sp.Document.URL;
- address = (uint)sp.Offset;
- }
-
- if (session.IsExternalCode (file)) {
- external = true;
- } else {
- if (session.Options.ProjectAssembliesOnly) {
- external = mi.GetCustomAttributes (true).Any (v =>
- v is System.Diagnostics.DebuggerHiddenAttribute ||
- v is System.Diagnostics.DebuggerNonUserCodeAttribute);
- } else {
- external = mi.GetCustomAttributes (true).Any (v =>
- v is System.Diagnostics.DebuggerHiddenAttribute);
- }
- }
- hidden = mi.GetCustomAttributes (true).Any (v => v is System.Diagnostics.DebuggerHiddenAttribute);
- }
- lang = "Managed";
- hasDebugInfo = true;
- } else if (frame.FrameType == CorFrameType.NativeFrame) {
- frame.GetNativeIP (out address);
- method = "[Native frame]";
- lang = "Native";
- } else if (frame.FrameType == CorFrameType.InternalFrame) {
- switch (frame.InternalFrameType) {
- case CorDebugInternalFrameType.STUBFRAME_M2U:
- method = "[Managed to Native Transition]";
- break;
- case CorDebugInternalFrameType.STUBFRAME_U2M:
- method = "[Native to Managed Transition]";
- break;
- case CorDebugInternalFrameType.STUBFRAME_LIGHTWEIGHT_FUNCTION:
- method = "[Lightweight Method Call]";
- break;
- case CorDebugInternalFrameType.STUBFRAME_APPDOMAIN_TRANSITION:
- method = "[Application Domain Transition]";
- break;
- case CorDebugInternalFrameType.STUBFRAME_FUNC_EVAL:
- method = "[Function Evaluation]";
- break;
- }
- }
-
- var loc = new SourceLocation (method, file, line, column, endLine, endColumn);
- return new StackFrame (address, addressSpace, loc, lang, external, hasDebugInfo, hidden, module, type);
- }
-
- #endregion
- }
-}
diff --git a/main/src/addins/MonoDevelop.Debugger.Win32/Mono.Debugging.Win32/CorDebuggerSession.cs b/main/src/addins/MonoDevelop.Debugger.Win32/Mono.Debugging.Win32/CorDebuggerSession.cs deleted file mode 100644 index acf6bbafa8..0000000000 --- a/main/src/addins/MonoDevelop.Debugger.Win32/Mono.Debugging.Win32/CorDebuggerSession.cs +++ /dev/null @@ -1,1939 +0,0 @@ -using System;
-using System.Collections;
-using System.Collections.Concurrent;
-using System.Collections.Generic;
-using System.Diagnostics.SymbolStore;
-using System.IO;
-using System.Reflection;
-using System.Runtime.InteropServices;
-using System.Text;
-using System.Threading;
-using Microsoft.Samples.Debugging.CorDebug;
-using Microsoft.Samples.Debugging.CorDebug.NativeApi;
-using Microsoft.Samples.Debugging.CorMetadata;
-using Microsoft.Samples.Debugging.CorSymbolStore;
-using Microsoft.Samples.Debugging.Extensions;
-using Mono.Debugging.Backend;
-using Mono.Debugging.Client;
-using Mono.Debugging.Evaluation;
-using System.Linq;
-
-namespace Mono.Debugging.Win32
-{
- public class CorDebuggerSession: DebuggerSession
- {
- readonly char[] badPathChars;
- readonly object debugLock = new object ();
- readonly object terminateLock = new object ();
-
- CorDebugger dbg;
- CorProcess process;
- CorThread activeThread;
- CorStepper stepper;
- bool terminated;
- bool evaluating;
- bool autoStepInto;
- bool stepInsideDebuggerHidden=false;
- int processId;
- bool attaching = false;
-
- static int evaluationTimestamp;
-
- readonly SymbolBinder symbolBinder = MtaThread.Run (() => new SymbolBinder ());
- readonly object appDomainsLock = new object ();
-
- Dictionary<int, AppDomainInfo> appDomains = new Dictionary<int, AppDomainInfo> ();
- Dictionary<int, ProcessInfo> processes = new Dictionary<int, ProcessInfo> ();
- Dictionary<int, ThreadInfo> threads = new Dictionary<int,ThreadInfo> ();
- readonly Dictionary<CorBreakpoint, BreakEventInfo> breakpoints = new Dictionary<CorBreakpoint, BreakEventInfo> ();
- readonly Dictionary<long, CorHandleValue> handles = new Dictionary<long, CorHandleValue>();
-
- readonly BlockingCollection<Action> helperOperationsQueue = new BlockingCollection<Action>(new ConcurrentQueue<Action>());
- readonly CancellationTokenSource helperOperationsCancellationTokenSource = new CancellationTokenSource ();
-
- public CorObjectAdaptor ObjectAdapter = new CorObjectAdaptor();
-
- class AppDomainInfo
- {
- public CorAppDomain AppDomain;
- public Dictionary<string, DocInfo> Documents;
- public Dictionary<string, ModuleInfo> Modules;
- }
-
- class DocInfo
- {
- public ISymbolDocument Document;
- public ModuleInfo ModuleInfo;
- }
-
- class ModuleInfo
- {
- public ISymbolReader Reader;
- public CorModule Module;
- public CorMetadataImport Importer;
- }
-
- public CorDebuggerSession(char[] badPathChars)
- {
- this.badPathChars = badPathChars;
- var cancellationToken = helperOperationsCancellationTokenSource.Token;
- new Thread (() => {
- try {
- while (!cancellationToken.IsCancellationRequested) {
- var action = helperOperationsQueue.Take(cancellationToken);
- try {
- action ();
- }
- catch (Exception e) {
- DebuggerLoggingService.LogError ("Exception on processing helper thread action", e);
- }
- }
-
- }
- catch (Exception e) {
- if (e is OperationCanceledException || e is ObjectDisposedException) {
- DebuggerLoggingService.LogMessage ("Helper thread was gracefully interrupted");
- }
- else {
- DebuggerLoggingService.LogError ("Unhandled exception in helper thread. Helper thread is terminated", e);
- }
- }
- }) {Name = "CorDebug helper thread "}.Start();
- }
-
- public new IDebuggerSessionFrontend Frontend {
- get { return base.Frontend; }
- }
-
- public static int EvaluationTimestamp {
- get { return evaluationTimestamp; }
- }
-
-
- public override void Dispose ( )
- {
- MtaThread.Run (delegate
- {
- TerminateDebugger ();
- ObjectAdapter.Dispose();
- });
- helperOperationsCancellationTokenSource.Dispose ();
- helperOperationsQueue.Dispose ();
-
- base.Dispose ();
-
- // There is no explicit way of disposing the metadata objects, so we have
- // to rely on the GC to do it.
-
- lock (appDomainsLock) {
- foreach (var appDomainInfo in appDomains) {
- foreach (var module in appDomainInfo.Value.Modules.Values) {
- var disposable = module.Reader as IDisposable;
- if (disposable != null)
- disposable.Dispose ();
- }
- }
- appDomains = null;
- }
-
- threads = null;
- processes = null;
- activeThread = null;
-
- ThreadPool.QueueUserWorkItem (delegate {
- Thread.Sleep (2000);
- GC.Collect ();
- GC.WaitForPendingFinalizers ();
- Thread.Sleep (20000);
- GC.Collect ();
- GC.WaitForPendingFinalizers ();
- });
- }
-
- void QueueToHelperThread (Action action)
- {
- helperOperationsQueue.Add (action);
- }
-
- void DeactivateBreakpoints ()
- {
- var breakpointsCopy = breakpoints.Keys.ToList ();
- foreach (var corBreakpoint in breakpointsCopy) {
- try {
- corBreakpoint.Activate (false);
- }
- catch (Exception e) {
- DebuggerLoggingService.LogMessage ("Exception in DeactivateBreakpoints(): {0}", e);
- }
- }
- }
-
- void TerminateDebugger ()
- {
- helperOperationsCancellationTokenSource.Cancel();
- DeactivateBreakpoints ();
- lock (terminateLock) {
- if (terminated)
- return;
-
- terminated = true;
-
- if (process != null) {
- // Process already running. Stop it. In the ProcessExited event the
- // debugger engine will be terminated
- try {
- process.Stop (0);
- if (attaching) {
- process.Detach ();
- }
- else {
- process.Terminate (1);
- }
- }
- catch (COMException e) {
- // process was terminated, but debugger operation thread doesn't call ProcessExit callback at the time,
- // so we just think that the process is alive but that's wrong.
- // This may happen when e.g. when target process exited and Dispose was called at the same time
- // rethrow the exception in other case
- if (e.ErrorCode != (int) HResult.CORDBG_E_PROCESS_TERMINATED) {
- throw;
- }
- }
- }
- }
- }
-
- protected override void OnRun (DebuggerStartInfo startInfo)
- {
- MtaThread.Run (delegate
- {
- // Create the debugger
-
- string dversion;
- try {
- dversion = CorDebugger.GetDebuggerVersionFromFile (startInfo.Command);
- }
- catch {
- dversion = CorDebugger.GetDefaultDebuggerVersion ();
- }
- dbg = new CorDebugger (dversion);
-
- Dictionary<string, string> env = new Dictionary<string, string> ();
- foreach (DictionaryEntry de in Environment.GetEnvironmentVariables ())
- env[(string)de.Key] = (string)de.Value;
-
- foreach (KeyValuePair<string, string> var in startInfo.EnvironmentVariables)
- env[var.Key] = var.Value;
-
- // The second parameter of CreateProcess is the command line, and it includes the application being launched
- string cmdLine = "\"" + startInfo.Command + "\" " + startInfo.Arguments;
-
- int flags = 0;
- if (!startInfo.UseExternalConsole) {
- flags = (int)CreationFlags.CREATE_NO_WINDOW;
- flags |= DebuggerExtensions.CREATE_REDIRECT_STD;
- }
-
- var dir = startInfo.WorkingDirectory;
- if (string.IsNullOrEmpty (dir))
- dir = System.IO.Path.GetDirectoryName (startInfo.Command);
-
- process = dbg.CreateProcess (startInfo.Command, cmdLine, dir, env, flags);
- processId = process.Id;
- SetupProcess (process);
- process.Continue (false);
- });
- OnStarted ();
- }
-
- void SetupProcess (CorProcess corProcess)
- {
- processId = corProcess.Id;
- corProcess.OnCreateProcess += OnCreateProcess;
- corProcess.OnCreateAppDomain += OnCreateAppDomain;
- corProcess.OnAppDomainExit += OnAppDomainExit;
- corProcess.OnAssemblyLoad += OnAssemblyLoad;
- corProcess.OnAssemblyUnload += OnAssemblyUnload;
- corProcess.OnCreateThread += OnCreateThread;
- corProcess.OnThreadExit += OnThreadExit;
- corProcess.OnModuleLoad += OnModuleLoad;
- corProcess.OnModuleUnload += OnModuleUnload;
- corProcess.OnProcessExit += OnProcessExit;
- corProcess.OnUpdateModuleSymbols += OnUpdateModuleSymbols;
- corProcess.OnDebuggerError += OnDebuggerError;
- corProcess.OnBreakpoint += OnBreakpoint;
- corProcess.OnStepComplete += OnStepComplete;
- corProcess.OnBreak += OnBreak;
- corProcess.OnNameChange += OnNameChange;
- corProcess.OnEvalComplete += OnEvalComplete;
- corProcess.OnEvalException += OnEvalException;
- corProcess.OnLogMessage += OnLogMessage;
- corProcess.OnException2 += OnException2;
- corProcess.RegisterStdOutput (OnStdOutput);
- }
-
- void OnStdOutput (object sender, CorTargetOutputEventArgs e)
- {
- OnTargetOutput (e.IsStdError, e.Text);
- }
-
- void OnLogMessage (object sender, CorLogMessageEventArgs e)
- {
- OnTargetDebug (e.Level, e.LogSwitchName, e.Message);
- e.Continue = true;
- }
-
- void OnEvalException (object sender, CorEvalEventArgs e)
- {
- evaluationTimestamp++;
- }
-
- void OnEvalComplete (object sender, CorEvalEventArgs e)
- {
- evaluationTimestamp++;
- }
-
- void OnNameChange (object sender, CorThreadEventArgs e)
- {
- }
-
- void OnStopped ( )
- {
- evaluationTimestamp++;
- lock (threads) {
- threads.Clear ();
- }
- }
-
- void OnBreak (object sender, CorThreadEventArgs e)
- {
- lock (debugLock) {
- if (evaluating) {
- e.Continue = true;
- return;
- }
- }
- OnStopped ();
- e.Continue = false;
- SetActiveThread (e.Thread);
- TargetEventArgs args = new TargetEventArgs (TargetEventType.TargetInterrupted);
- args.Process = GetProcess (process);
- args.Thread = GetThread (e.Thread);
- args.Backtrace = new Backtrace (new CorBacktrace (e.Thread, this));
- OnTargetEvent (args);
- }
-
- bool StepThrough (MethodInfo methodInfo)
- {
- var m = methodInfo.GetCustomAttributes (true);
- if (Options.ProjectAssembliesOnly) {
- return methodInfo.GetCustomAttributes (true).Union (methodInfo.DeclaringType.GetCustomAttributes (true)).Any (v =>
- v is System.Diagnostics.DebuggerHiddenAttribute ||
- v is System.Diagnostics.DebuggerStepThroughAttribute ||
- v is System.Diagnostics.DebuggerNonUserCodeAttribute);
- } else {
- return methodInfo.GetCustomAttributes (true).Union (methodInfo.DeclaringType.GetCustomAttributes (true)).Any (v =>
- v is System.Diagnostics.DebuggerHiddenAttribute ||
- v is System.Diagnostics.DebuggerStepThroughAttribute);
- }
- }
-
- bool ContinueOnStepIn(MethodInfo methodInfo)
- {
- return methodInfo.GetCustomAttributes (true).Any (v => v is System.Diagnostics.DebuggerStepperBoundaryAttribute);
- }
-
- static bool IsPropertyOrOperatorMethod (MethodInfo method)
- {
- if (method == null)
- return false;
- string name = method.Name;
-
- return method.IsSpecialName &&
- (name.StartsWith ("get_", StringComparison.Ordinal) ||
- name.StartsWith ("set_", StringComparison.Ordinal) ||
- name.StartsWith ("op_", StringComparison.Ordinal));
- }
-
- static bool IsCompilerGenerated (MethodInfo method)
- {
- return method.GetCustomAttributes (true).Any (v => v is System.Runtime.CompilerServices.CompilerGeneratedAttribute);
- }
-
- void OnStepComplete (object sender, CorStepCompleteEventArgs e)
- {
- lock (debugLock) {
- if (evaluating) {
- e.Continue = true;
- return;
- }
- }
-
- bool localAutoStepInto = autoStepInto;
- autoStepInto = false;
- bool localStepInsideDebuggerHidden = stepInsideDebuggerHidden;
- stepInsideDebuggerHidden = false;
-
- if (e.AppDomain.Process.HasQueuedCallbacks (e.Thread)) {
- e.Continue = true;
- return;
- }
-
- if (localAutoStepInto) {
- Step (true);
- e.Continue = true;
- return;
- }
-
- if (ContinueOnStepIn (e.Thread.ActiveFrame.Function.GetMethodInfo (this))) {
- e.Continue = true;
- return;
- }
-
- var currentSequence = CorBacktrace.GetSequencePoint (this, e.Thread.ActiveFrame);
- if (currentSequence == null) {
- stepper.StepOut ();
- autoStepInto = true;
- e.Continue = true;
- return;
- }
-
- if (StepThrough (e.Thread.ActiveFrame.Function.GetMethodInfo (this))) {
- stepInsideDebuggerHidden = e.StepReason == CorDebugStepReason.STEP_CALL;
- RawContinue (true, true);
- e.Continue = true;
- return;
- }
-
- if ((Options.StepOverPropertiesAndOperators || IsCompilerGenerated(e.Thread.ActiveFrame.Function.GetMethodInfo (this))) &&
- IsPropertyOrOperatorMethod (e.Thread.ActiveFrame.Function.GetMethodInfo (this)) &&
- e.StepReason == CorDebugStepReason.STEP_CALL) {
- stepper.StepOut ();
- autoStepInto = true;
- e.Continue = true;
- return;
- }
-
- if (currentSequence.IsSpecial) {
- Step (false);
- e.Continue = true;
- return;
- }
-
- if (localStepInsideDebuggerHidden && e.StepReason == CorDebugStepReason.STEP_RETURN) {
- Step (true);
- e.Continue = true;
- return;
- }
-
- OnStopped ();
- e.Continue = false;
- SetActiveThread (e.Thread);
- TargetEventArgs args = new TargetEventArgs (TargetEventType.TargetStopped);
- args.Process = GetProcess (process);
- args.Thread = GetThread (e.Thread);
- args.Backtrace = new Backtrace (new CorBacktrace (e.Thread, this));
- OnTargetEvent (args);
- }
-
- void OnThreadExit (object sender, CorThreadEventArgs e)
- {
- lock (threads) {
- threads.Remove (e.Thread.Id);
- }
- }
-
- void OnBreakpoint (object sender, CorBreakpointEventArgs e)
- {
- lock (debugLock) {
- if (evaluating) {
- e.Continue = true;
- return;
- }
- }
-
- // we have to stop an execution and enqueue breakpoint calculations on another thread to release debugger event thread for further events
- // we can't perform any evaluations inside this handler, because the debugger thread is busy and we won't get evaluation events there
- e.Continue = false;
-
- QueueToHelperThread (() => {
- BreakEventInfo binfo;
- BreakEvent breakEvent = null;
- if (e.Controller.IsRunning ())
- throw new InvalidOperationException ("Debuggee isn't stopped to perform breakpoint calculations");
-
- var shouldContinue = false;
- if (breakpoints.TryGetValue (e.Breakpoint, out binfo)) {
- breakEvent = (Breakpoint) binfo.BreakEvent;
- try {
- shouldContinue = ShouldContinueOnBreakpoint (e.Thread, binfo);
- }
- catch (Exception ex) {
- DebuggerLoggingService.LogError ("ShouldContinueOnBreakpoint() has thrown an exception", ex);
- }
- }
-
- if (shouldContinue || e.AppDomain.Process.HasQueuedCallbacks (e.Thread)) {
- e.Controller.SetAllThreadsDebugState (CorDebugThreadState.THREAD_RUN, null);
- e.Controller.Continue (false);
- return;
- }
-
- OnStopped ();
- // If a breakpoint is hit while stepping, cancel the stepping operation
- if (stepper != null && stepper.IsActive ())
- stepper.Deactivate ();
- autoStepInto = false;
- SetActiveThread (e.Thread);
- var args = new TargetEventArgs (TargetEventType.TargetHitBreakpoint) {
- Process = GetProcess (process),
- Thread = GetThread (e.Thread),
- Backtrace = new Backtrace (new CorBacktrace (e.Thread, this)),
- BreakEvent = breakEvent
- };
- OnTargetEvent (args);
- });
- }
-
- bool ShouldContinueOnBreakpoint (CorThread thread, BreakEventInfo binfo)
- {
- var bp = (Breakpoint) binfo.BreakEvent;
- binfo.IncrementHitCount();
- if (!binfo.HitCountReached)
- return true;
-
- if (!string.IsNullOrEmpty (bp.ConditionExpression)) {
- string res = EvaluateExpression (thread, bp.ConditionExpression);
- if (bp.BreakIfConditionChanges) {
- if (res == bp.LastConditionValue)
- return true;
- bp.LastConditionValue = res;
- } else {
- if (res != null && res.ToLower () != "true")
- return true;
- }
- }
-
- if ((bp.HitAction & HitAction.CustomAction) != HitAction.None) {
- // If custom action returns true, execution must continue
- if (binfo.RunCustomBreakpointAction (bp.CustomActionId))
- return true;
- }
-
- if ((bp.HitAction & HitAction.PrintTrace) != HitAction.None) {
- OnTargetDebug (0, "", "Breakpoint reached: " + bp.FileName + ":" + bp.Line + Environment.NewLine);
- }
-
- if ((bp.HitAction & HitAction.PrintExpression) != HitAction.None) {
- string exp = EvaluateTrace (thread, bp.TraceExpression);
- binfo.UpdateLastTraceValue (exp);
- }
-
- return (bp.HitAction & HitAction.Break) == HitAction.None;
- }
-
- void OnDebuggerError (object sender, CorDebuggerErrorEventArgs e)
- {
- Exception ex = Marshal.GetExceptionForHR (e.HResult);
- OnDebuggerOutput (true, string.Format ("Debugger Error: {0}\n", ex.Message));
- }
-
- void OnUpdateModuleSymbols (object sender, CorUpdateModuleSymbolsEventArgs e)
- {
- e.Continue = true;
- }
-
- void OnProcessExit (object sender, CorProcessEventArgs e)
- {
- TargetEventArgs args = new TargetEventArgs (TargetEventType.TargetExited);
-
- // If the main thread stopped, terminate the debugger session
- if (e.Process.Id == process.Id) {
- lock (terminateLock) {
- process.Dispose ();
- process = null;
- ThreadPool.QueueUserWorkItem (delegate
- {
- // The Terminate call will fail if called in the event handler
- dbg.Terminate ();
- dbg = null;
- GC.Collect ();
- });
- }
- }
-
- OnTargetEvent (args);
- }
-
- void OnAssemblyUnload (object sender, CorAssemblyEventArgs e)
- {
- OnDebuggerOutput (false, string.Format ("Unloaded Module '{0}'\n", e.Assembly.Name));
- e.Continue = true;
- }
-
- void OnModuleLoad (object sender, CorModuleEventArgs e)
- {
- var currentModule = e.Module;
- CorMetadataImport mi = new CorMetadataImport (currentModule);
-
- try {
- // Required to avoid the jit to get rid of variables too early
- currentModule.JITCompilerFlags = CorDebugJITCompilerFlags.CORDEBUG_JIT_DISABLE_OPTIMIZATION;
- }
- catch {
- // Some kind of modules don't allow JIT flags to be changed.
- }
-
- var currentDomain = e.AppDomain;
- OnDebuggerOutput (false, String.Format("Loading module {0} in application domain {1}:{2}\n", currentModule.Name, currentDomain.Id, currentDomain.Name));
- string file = currentModule.Assembly.Name;
- var newDocuments = new Dictionary<string, DocInfo> ();
- var justMyCode = false;
- ISymbolReader reader = null;
- if (file.IndexOfAny (badPathChars) == -1) {
- try {
- reader = symbolBinder.GetReaderForFile (mi.RawCOMObject, file, ".",
- SymSearchPolicies.AllowOriginalPathAccess | SymSearchPolicies.AllowReferencePathAccess);
- if (reader != null) {
- OnDebuggerOutput (false, string.Format ("Symbols for module {0} loaded\n", file));
- // set JMC to true only when we got the reader.
- // When module JMC is true, debugger will step into it
- justMyCode = true;
- foreach (ISymbolDocument doc in reader.GetDocuments ()) {
- if (string.IsNullOrEmpty (doc.URL))
- continue;
- string docFile = System.IO.Path.GetFullPath (doc.URL);
- DocInfo di = new DocInfo ();
- di.Document = doc;
- newDocuments[docFile] = di;
- }
- }
- }
- catch (COMException ex) {
- var hResult = ex.ToHResult<PdbHResult> ();
- if (hResult != null) {
- if (hResult != PdbHResult.E_PDB_OK) {
- OnDebuggerOutput (false, string.Format ("Failed to load pdb for assembly {0}. Error code {1}(0x{2:X})\n", file, hResult, ex.ErrorCode));
- }
- }
- else {
- DebuggerLoggingService.LogError (string.Format ("Loading symbols of module {0} failed", e.Module.Name), ex);
- }
- }
- catch (Exception ex) {
- DebuggerLoggingService.LogError (string.Format ("Loading symbols of module {0} failed", e.Module.Name), ex);
- }
- }
- try {
- currentModule.SetJmcStatus (justMyCode, null);
- }
- catch (COMException ex) {
- // somewhen exceptions is thrown
- DebuggerLoggingService.LogMessage ("Exception during setting JMC: {0}", ex.Message);
- }
-
- lock (appDomainsLock) {
- AppDomainInfo appDomainInfo;
- if (!appDomains.TryGetValue (currentDomain.Id, out appDomainInfo)) {
- DebuggerLoggingService.LogMessage ("OnCreatedAppDomain was not fired for domain {0} (id {1})", currentDomain.Name, currentDomain.Id);
- appDomainInfo = new AppDomainInfo {
- AppDomain = currentDomain,
- Documents = new Dictionary<string, DocInfo> (StringComparer.InvariantCultureIgnoreCase),
- Modules = new Dictionary<string, ModuleInfo> (StringComparer.InvariantCultureIgnoreCase)
- };
- appDomains[currentDomain.Id] = appDomainInfo;
- }
- var modules = appDomainInfo.Modules;
- if (modules.ContainsKey (currentModule.Name)) {
- DebuggerLoggingService.LogMessage ("Module {0} was already added for app domain {1} (id {2}). Replacing\n",
- currentModule.Name, currentDomain.Name, currentDomain.Id);
- }
- var newModuleInfo = new ModuleInfo {
- Module = currentModule,
- Reader = reader,
- Importer = mi,
- };
- modules[currentModule.Name] = newModuleInfo;
- var existingDocuments = appDomainInfo.Documents;
- foreach (var newDocument in newDocuments) {
- var documentFile = newDocument.Key;
- var newDocInfo = newDocument.Value;
- if (existingDocuments.ContainsKey (documentFile)) {
- DebuggerLoggingService.LogMessage ("Document {0} was already added for module {1} in domain {2} (id {3}). Replacing\n",
- documentFile, currentModule.Name, currentDomain.Name, currentDomain.Id);
- }
- newDocInfo.ModuleInfo = newModuleInfo;
- existingDocuments[documentFile] = newDocInfo;
- }
-
- }
-
- foreach (var newFile in newDocuments.Keys) {
- BindSourceFileBreakpoints (newFile);
- }
-
- e.Continue = true;
- }
-
- void OnModuleUnload (object sender, CorModuleEventArgs e)
- {
- var currentDomain = e.AppDomain;
- var currentModule = e.Module;
- var documentsToRemove = new List<string> ();
- lock (appDomainsLock) {
- AppDomainInfo appDomainInfo;
- if (!appDomains.TryGetValue (currentDomain.Id, out appDomainInfo)) {
- DebuggerLoggingService.LogMessage ("Failed unload module {0} for app domain {1} (id {2}) because app domain was not found or already unloaded\n",
- currentModule.Name, currentDomain.Name, currentDomain.Id);
- return;
- }
- ModuleInfo moi;
- if (!appDomainInfo.Modules.TryGetValue (currentModule.Name, out moi)) {
- DebuggerLoggingService.LogMessage ("Failed unload module {0} for app domain {1} (id {2}) because the module was not found or already unloaded\n",
- currentModule.Name, currentDomain.Name, currentDomain.Id);
- }
- else {
- appDomainInfo.Modules.Remove (currentModule.Name);
- var disposableReader = moi.Reader as IDisposable;
- if (disposableReader != null)
- disposableReader.Dispose ();
- }
-
- foreach (var docInfo in appDomainInfo.Documents) {
- if (docInfo.Value.ModuleInfo.Module.Name == currentModule.Name)
- documentsToRemove.Add (docInfo.Key);
- }
- foreach (var file in documentsToRemove) {
- appDomainInfo.Documents.Remove (file);
- }
- }
- foreach (var file in documentsToRemove) {
- UnbindSourceFileBreakpoints (file);
- }
- }
-
- void OnCreateAppDomain (object sender, CorAppDomainEventArgs e)
- {
- var appDomainId = e.AppDomain.Id;
- lock (appDomainsLock) {
- if (!appDomains.ContainsKey (appDomainId)) {
- appDomains[appDomainId] = new AppDomainInfo {
- AppDomain = e.AppDomain,
- Documents = new Dictionary<string, DocInfo> (StringComparer.InvariantCultureIgnoreCase),
- Modules = new Dictionary<string, ModuleInfo> (StringComparer.InvariantCultureIgnoreCase)
- };
- }
- else {
- DebuggerLoggingService.LogMessage ("App domain {0} (id {1}) was already loaded", e.AppDomain.Name, appDomainId);
- }
- }
- e.AppDomain.Attach();
- e.Continue = true;
- OnDebuggerOutput (false, string.Format("Loaded application domain '{0} (id {1})'\n", e.AppDomain.Name, appDomainId));
- }
-
- private void OnAppDomainExit (object sender, CorAppDomainEventArgs e)
- {
- var appDomainId = e.AppDomain.Id;
- lock (appDomainsLock) {
- if (!appDomains.Remove (appDomainId)) {
- DebuggerLoggingService.LogMessage ("Failed to unload app domain {0} (id {1}) because it's not found in map. Possibly already unloaded.", e.AppDomain.Name, appDomainId);
- }
- }
- // Detach is not implemented for ICorDebugAppDomain, it's valid only for ICorDebugProcess
- //e.AppDomain.Detach ();
- e.Continue = true;
- OnDebuggerOutput (false, string.Format("Unloaded application domain '{0} (id {1})'\n", e.AppDomain.Name, appDomainId));
- }
-
-
- void OnCreateProcess (object sender, CorProcessEventArgs e)
- {
- if (!attaching) {
- // Required to avoid the jit to get rid of variables too early
- // not allowed in attach mode
- e.Process.DesiredNGENCompilerFlags = CorDebugJITCompilerFlags.CORDEBUG_JIT_DISABLE_OPTIMIZATION;
- }
- e.Process.EnableLogMessages (true);
- e.Continue = true;
- }
- void OnCreateThread (object sender, CorThreadEventArgs e)
- {
- OnDebuggerOutput (false, string.Format ("Started Thread {0}\n", e.Thread.Id));
- e.Continue = true;
- }
-
- void OnAssemblyLoad (object sender, CorAssemblyEventArgs e)
- {
- OnDebuggerOutput (false, string.Format ("Loaded Assembly '{0}'\n", e.Assembly.Name));
- e.Continue = true;
- }
-
- void OnException2 (object sender, CorException2EventArgs e)
- {
- lock (debugLock) {
- if (evaluating) {
- e.Continue = true;
- return;
- }
- }
-
- TargetEventArgs args = null;
-
- switch (e.EventType) {
- case CorDebugExceptionCallbackType.DEBUG_EXCEPTION_FIRST_CHANCE:
- if (!this.Options.ProjectAssembliesOnly && IsCatchpoint (e))
- args = new TargetEventArgs (TargetEventType.ExceptionThrown);
- break;
- case CorDebugExceptionCallbackType.DEBUG_EXCEPTION_USER_FIRST_CHANCE:
- if (IsCatchpoint (e))
- args = new TargetEventArgs (TargetEventType.ExceptionThrown);
- break;
- case CorDebugExceptionCallbackType.DEBUG_EXCEPTION_CATCH_HANDLER_FOUND:
- break;
- case CorDebugExceptionCallbackType.DEBUG_EXCEPTION_UNHANDLED:
- args = new TargetEventArgs (TargetEventType.UnhandledException);
- break;
- }
-
- if (args != null) {
- OnStopped ();
- e.Continue = false;
- // If an exception is thrown while stepping, cancel the stepping operation
- if (stepper != null && stepper.IsActive ())
- stepper.Deactivate ();
- autoStepInto = false;
- SetActiveThread (e.Thread);
-
- args.Process = GetProcess (process);
- args.Thread = GetThread (e.Thread);
- args.Backtrace = new Backtrace (new CorBacktrace (e.Thread, this));
- OnTargetEvent (args);
- }
- }
-
- public bool IsExternalCode (string fileName)
- {
- if (string.IsNullOrWhiteSpace (fileName))
- return true;
- lock (appDomainsLock) {
- foreach (var appDomainInfo in appDomains) {
- if (appDomainInfo.Value.Documents.ContainsKey (fileName))
- return false;
- }
- }
- return true;
- }
-
- private bool IsCatchpoint (CorException2EventArgs e)
- {
- // Build up the exception type hierachy
- CorValue v = e.Thread.CurrentException;
- List<string> exceptions = new List<string>();
- CorType t = v.ExactType;
- while (t != null) {
- exceptions.Add(t.GetTypeInfo(this).FullName);
- t = t.Base;
- }
- if (exceptions.Count == 0)
- return false;
- // See if a catchpoint is set for this exception.
- foreach (Catchpoint cp in Breakpoints.GetCatchpoints()) {
- if (cp.Enabled &&
- ((cp.IncludeSubclasses && exceptions.Contains (cp.ExceptionName)) ||
- (exceptions [0] == cp.ExceptionName))) {
- return true;
- }
- }
-
- return false;
- }
-
- protected override void OnAttachToProcess(long procId)
- {
- attaching = true;
- MtaThread.Run(delegate
- {
- var version = CorDebugger.GetProcessLoadedRuntimes((int)procId);
- if (!version.Any())
- throw new InvalidOperationException(string.Format("Process {0} doesn't have .NET loaded runtimes", procId));
- dbg = new CorDebugger(version.Last());
- process = dbg.DebugActiveProcess((int)procId, false);
- SetupProcess(process);
- process.Continue(false);
- });
- OnStarted();
- }
-
- protected override void OnContinue ( )
- {
- MtaThread.Run (delegate
- {
- ClearEvalStatus ();
- ClearHandles ();
- process.SetAllThreadsDebugState (CorDebugThreadState.THREAD_RUN, null);
- process.Continue (false);
- });
- }
-
- protected override void OnDetach ( )
- {
- MtaThread.Run (delegate
- {
- TerminateDebugger ();
- });
- }
-
- protected override void OnEnableBreakEvent (BreakEventInfo binfo, bool enable)
- {
- MtaThread.Run (delegate
- {
- var bpList = binfo.Handle as List<CorFunctionBreakpoint>;
- if (bpList != null) {
- foreach (var bp in bpList) {
- try {
- bp.Activate (enable);
- }
- catch (COMException e) {
- HandleBreakpointException (binfo, e);
- }
- }
- }
- });
- }
-
- protected override void OnExit ( )
- {
- MtaThread.Run (delegate
- {
- TerminateDebugger ();
- });
- }
-
- protected override void OnFinish ( )
- {
- MtaThread.Run (delegate
- {
- if (stepper != null) {
- stepper.StepOut ();
- ClearEvalStatus ();
- process.SetAllThreadsDebugState (CorDebugThreadState.THREAD_RUN, null);
- process.Continue (false);
- }
- });
- }
-
- protected override ProcessInfo[] OnGetProcesses ( )
- {
- return MtaThread.Run (() => new ProcessInfo[] { GetProcess (process) });
- }
-
- protected override Backtrace OnGetThreadBacktrace (long processId, long threadId)
- {
- return MtaThread.Run (delegate
- {
- foreach (CorThread t in process.Threads) {
- if (t.Id == threadId) {
- return new Backtrace (new CorBacktrace (t, this));
- }
- }
- return null;
- });
- }
-
- protected override ThreadInfo[] OnGetThreads (long processId)
- {
- return MtaThread.Run (delegate
- {
- List<ThreadInfo> list = new List<ThreadInfo> ();
- foreach (CorThread t in process.Threads)
- list.Add (GetThread (t));
- return list.ToArray ();
- });
- }
-
- internal ISymbolReader GetReaderForModule (CorModule module)
- {
- lock (appDomainsLock) {
- AppDomainInfo appDomainInfo;
- if (!appDomains.TryGetValue (module.Assembly.AppDomain.Id, out appDomainInfo))
- return null;
- ModuleInfo moduleInfo;
- if (!appDomainInfo.Modules.TryGetValue (module.Name, out moduleInfo))
- return null;
- return moduleInfo.Reader;
- }
- }
-
- internal CorMetadataImport GetMetadataForModule (CorModule module)
- {
- lock (appDomainsLock) {
- AppDomainInfo appDomainInfo;
- if (!appDomains.TryGetValue (module.Assembly.AppDomain.Id, out appDomainInfo))
- return null;
- ModuleInfo mod;
- if (!appDomainInfo.Modules.TryGetValue (module.Name, out mod))
- return null;
- return mod.Importer;
- }
- }
-
-
- internal IEnumerable<CorAppDomain> GetAppDomains ()
- {
- lock (appDomainsLock) {
- var corAppDomains = new List<CorAppDomain> (appDomains.Count);
- foreach (var appDomainInfo in appDomains) {
- corAppDomains.Add (appDomainInfo.Value.AppDomain);
- }
- return corAppDomains;
- }
- }
-
- internal IEnumerable<CorModule> GetModules (CorAppDomain appDomain)
- {
- lock (appDomainsLock) {
- List<CorModule> mods = new List<CorModule> ();
- AppDomainInfo appDomainInfo;
- if (appDomains.TryGetValue (appDomain.Id, out appDomainInfo)) {
- foreach (ModuleInfo mod in appDomainInfo.Modules.Values) {
- mods.Add (mod.Module);
- }
- }
- return mods;
- }
- }
-
- internal IEnumerable<CorModule> GetAllModules ()
- {
- lock (appDomainsLock) {
- var corModules = new List<CorModule> ();
- foreach (var appDomainInfo in appDomains) {
- corModules.AddRange (GetModules (appDomainInfo.Value.AppDomain));
- }
- return corModules;
- }
- }
-
- internal CorHandleValue GetHandle (CorValue val)
- {
- CorHandleValue handleVal = null;
- if (!handles.TryGetValue (val.Address, out handleVal)) {
- handleVal = val.CastToHandleValue ();
- if (handleVal == null)
- {
- // Create a handle
- CorReferenceValue refVal = val.CastToReferenceValue ();
- CorHeapValue heapVal = refVal.Dereference ().CastToHeapValue ();
- handleVal = heapVal.CreateHandle (CorDebugHandleType.HANDLE_STRONG);
- }
- handles.Add (val.Address, handleVal);
- }
- return handleVal;
- }
-
- protected override BreakEventInfo OnInsertBreakEvent (BreakEvent be)
- {
- return MtaThread.Run (delegate {
- var binfo = new BreakEventInfo ();
- var bp = be as Breakpoint;
- if (bp != null) {
- if (bp is FunctionBreakpoint) {
- // FIXME: implement breaking on function name
- binfo.SetStatus (BreakEventStatus.Invalid, "Function breakpoint is not implemented");
- return binfo;
- }
- else {
- var docInfos = new List<DocInfo> ();
- lock (appDomainsLock) {
- foreach (var appDomainInfo in appDomains) {
- var documents = appDomainInfo.Value.Documents;
- DocInfo docInfo = null;
- if (documents.TryGetValue (Path.GetFullPath (bp.FileName), out docInfo)) {
- docInfos.Add (docInfo);
- }
- }
- }
-
- var doc = docInfos.FirstOrDefault (); //get info about source position using SymbolReader of first DocInfo
-
- if (doc == null) {
- binfo.SetStatus (BreakEventStatus.NotBound, string.Format("{0} is not found among the loaded symbol documents", bp.FileName));
- return binfo;
- }
- int line;
- try {
- line = doc.Document.FindClosestLine (bp.Line);
- } catch {
- // Invalid line
- binfo.SetStatus (BreakEventStatus.Invalid, string.Format("Invalid line {0}", bp.Line));
- return binfo;
- }
- ISymbolMethod[] methods = null;
- if (doc.ModuleInfo.Reader is ISymbolReader2) {
- methods = ((ISymbolReader2)doc.ModuleInfo.Reader).GetMethodsFromDocumentPosition (doc.Document, line, 0);
- }
- if (methods == null || methods.Length == 0) {
- var met = doc.ModuleInfo.Reader.GetMethodFromDocumentPosition (doc.Document, line, 0);
- if (met != null)
- methods = new ISymbolMethod[] {met};
- }
-
- if (methods == null || methods.Length == 0) {
- binfo.SetStatus (BreakEventStatus.Invalid, "Unable to resolve method at position");
- return binfo;
- }
-
- ISymbolMethod bestMethod = null;
- ISymbolMethod bestLeftSideMethod = null;
- ISymbolMethod bestRightSideMethod = null;
-
- SequencePoint bestSp = null;
- SequencePoint bestLeftSideSp = null;
- SequencePoint bestRightSideSp = null;
-
- foreach (var met in methods) {
- foreach (SequencePoint sp in met.GetSequencePoints ()) {
- if (sp.IsInside (doc.Document.URL, line, bp.Column)) { //breakpoint is inside current sequence point
- if (bestSp == null || bestSp.IsInside (doc.Document.URL, sp.StartLine, sp.StartColumn)) { //and sp is inside of current candidate
- bestSp = sp;
- bestMethod = met;
- break;
- }
- } else if (sp.StartLine == line
- && sp.Document.URL.Equals (doc.Document.URL, StringComparison.OrdinalIgnoreCase)
- && sp.StartColumn <= bp.Column) { //breakpoint is on the same line and on the right side of sp
- if (bestLeftSideSp == null
- || bestLeftSideSp.EndColumn < sp.EndColumn) {
- bestLeftSideSp = sp;
- bestLeftSideMethod = met;
- }
- } else if (sp.StartLine >= line
- && sp.Document.URL.Equals (doc.Document.URL, StringComparison.OrdinalIgnoreCase)) { //sp is after bp
- if (bestRightSideSp == null
- || bestRightSideSp.StartLine > sp.StartLine
- || (bestRightSideSp.StartLine == sp.StartLine && bestRightSideSp.StartColumn > sp.StartColumn)) { //and current candidate is on the right side of it
- bestRightSideSp = sp;
- bestRightSideMethod = met;
- }
- }
- }
- }
-
- SequencePoint bestSameLineSp;
- ISymbolMethod bestSameLineMethod;
-
- if (bestRightSideSp != null
- && (bestLeftSideSp == null
- || bestRightSideSp.StartLine > line)) {
- bestSameLineSp = bestRightSideSp;
- bestSameLineMethod = bestRightSideMethod;
- }
- else {
- bestSameLineSp = bestLeftSideSp;
- bestSameLineMethod = bestLeftSideMethod;
- }
-
- if (bestSameLineSp != null) {
- if (bestSp == null) {
- bestSp = bestSameLineSp;
- bestMethod = bestSameLineMethod;
- }
- else {
- if (bp.Line != bestSp.StartLine || bestSp.StartColumn != bp.Column) {
- bestSp = bestSameLineSp;
- bestMethod = bestSameLineMethod;
- }
- }
- }
-
- if (bestSp == null || bestMethod == null) {
- binfo.SetStatus (BreakEventStatus.Invalid, "Unable to calculate an offset in IL code");
- return binfo;
- }
-
- foreach (var docInfo in docInfos) {
- CorFunction func = docInfo.ModuleInfo.Module.GetFunctionFromToken (bestMethod.Token.GetToken ());
-
- try {
- CorFunctionBreakpoint corBp = func.ILCode.CreateBreakpoint (bestSp.Offset);
- breakpoints[corBp] = binfo;
-
- if (binfo.Handle == null)
- binfo.Handle = new List<CorFunctionBreakpoint> ();
- (binfo.Handle as List<CorFunctionBreakpoint>).Add (corBp);
- corBp.Activate (bp.Enabled);
- binfo.SetStatus (BreakEventStatus.Bound, null);
- }
- catch (COMException e) {
- HandleBreakpointException (binfo, e);
- }
- }
- return binfo;
- }
- }
-
- var cp = be as Catchpoint;
- if (cp != null) {
- var bound = false;
- lock (appDomainsLock) {
- foreach (var appDomainInfo in appDomains) {
- foreach (ModuleInfo mod in appDomainInfo.Value.Modules.Values) {
- CorMetadataImport mi = mod.Importer;
- if (mi != null) {
- foreach (Type t in mi.DefinedTypes)
- if (t.FullName == cp.ExceptionName) {
- bound = true;
- }
- }
- }
- }
- }
- if (bound) {
- binfo.SetStatus (BreakEventStatus.Bound, null);
- return binfo;
- }
- }
-
- binfo.SetStatus (BreakEventStatus.Invalid, null);
- return binfo;
- });
- }
-
- private static void HandleBreakpointException (BreakEventInfo binfo, COMException e)
- {
- var code = e.ToHResult<HResult> ();
- if (code != null) {
- switch (code) {
- case HResult.CORDBG_E_UNABLE_TO_SET_BREAKPOINT:
- binfo.SetStatus (BreakEventStatus.Invalid, "Invalid breakpoint position");
- break;
- case HResult.CORDBG_E_PROCESS_TERMINATED:
- binfo.SetStatus (BreakEventStatus.BindError, "Process terminated");
- break;
- case HResult.CORDBG_E_CODE_NOT_AVAILABLE:
- binfo.SetStatus (BreakEventStatus.BindError, "Module is not loaded");
- break;
- default:
- binfo.SetStatus (BreakEventStatus.BindError, e.Message);
- break;
- }
- }
- else {
- binfo.SetStatus (BreakEventStatus.BindError, e.Message);
- DebuggerLoggingService.LogError ("Unknown exception when setting breakpoint", e);
- }
- }
-
- protected override void OnNextInstruction ( )
- {
- MtaThread.Run (delegate {
- Step (false);
- });
- }
-
- protected override void OnNextLine ( )
- {
- MtaThread.Run (delegate
- {
- Step (false);
- });
- }
-
- void Step (bool into)
- {
- try {
- ObjectAdapter.CancelAsyncOperations ();
- if (stepper != null) {
- CorFrame frame = activeThread.ActiveFrame;
- ISymbolReader reader = GetReaderForModule (frame.Function.Module);
- if (reader == null) {
- RawContinue (into);
- return;
- }
- ISymbolMethod met = reader.GetMethod (new SymbolToken (frame.Function.Token));
- if (met == null) {
- RawContinue (into);
- return;
- }
-
- uint offset;
- CorDebugMappingResult mappingResult;
- frame.GetIP (out offset, out mappingResult);
-
- // Exclude all ranges belonging to the current line
- List<COR_DEBUG_STEP_RANGE> ranges = new List<COR_DEBUG_STEP_RANGE> ();
- var sequencePoints = met.GetSequencePoints ().ToArray ();
- for (int i = 0; i < sequencePoints.Length; i++) {
- if (sequencePoints [i].Offset > offset) {
- var r = new COR_DEBUG_STEP_RANGE ();
- r.startOffset = i == 0 ? 0 : (uint)sequencePoints [i - 1].Offset;
- r.endOffset = (uint)sequencePoints [i].Offset;
- ranges.Add (r);
- break;
- }
- }
- if (ranges.Count == 0 && sequencePoints.Length > 0) {
- var r = new COR_DEBUG_STEP_RANGE ();
- r.startOffset = (uint)sequencePoints [sequencePoints.Length - 1].Offset;
- r.endOffset = uint.MaxValue;
- ranges.Add (r);
- }
-
- stepper.StepRange (into, ranges.ToArray ());
-
- ClearEvalStatus ();
- process.SetAllThreadsDebugState (CorDebugThreadState.THREAD_RUN, null);
- process.Continue (false);
- }
- } catch (Exception e) {
- DebuggerLoggingService.LogError ("Exception on Step()", e);
- }
- }
-
- private void RawContinue (bool into, bool stepOverAll = false)
- {
- if (stepOverAll)
- stepper.StepRange (into, new[]{ new COR_DEBUG_STEP_RANGE (){ startOffset = 0, endOffset = uint.MaxValue } });
- else
- stepper.Step (into);
- ClearEvalStatus ();
- process.Continue (false);
- }
-
- protected override void OnRemoveBreakEvent (BreakEventInfo bi)
- {
- if (terminated)
- return;
-
- if (bi.Status != BreakEventStatus.Bound || bi.Handle == null)
- return;
-
- MtaThread.Run (delegate
- {
- var corBpList = (List<CorFunctionBreakpoint>)bi.Handle;
- foreach (var corBp in corBpList) {
- try {
- corBp.Activate (false);
- }
- catch (COMException e) {
- HandleBreakpointException (bi, e);
- }
- }
- });
- }
-
-
- protected override void OnSetActiveThread (long processId, long threadId)
- {
- MtaThread.Run (delegate
- {
- activeThread = null;
- if (stepper != null && stepper.IsActive ())
- stepper.Deactivate ();
- stepper = null;
- foreach (CorThread t in process.Threads) {
- if (t.Id == threadId) {
- SetActiveThread (t);
- break;
- }
- }
- });
- }
-
- void SetActiveThread (CorThread t)
- {
- activeThread = t;
- if (stepper != null && stepper.IsActive ()) {
- stepper.Deactivate ();
- }
- stepper = activeThread.CreateStepper ();
- stepper.SetUnmappedStopMask (CorDebugUnmappedStop.STOP_NONE);
- stepper.SetJmcStatus (true);
- }
-
- protected override void OnStepInstruction ( )
- {
- MtaThread.Run (delegate {
- Step (true);
- });
- }
-
- protected override void OnStepLine ( )
- {
- MtaThread.Run (delegate
- {
- Step (true);
- });
- }
-
- protected override void OnStop ( )
- {
- TargetEventArgs args = new TargetEventArgs (TargetEventType.TargetStopped);
-
- MtaThread.Run (delegate
- {
- process.Stop (0);
- OnStopped ();
- CorThread currentThread = null;
- foreach (CorThread t in process.Threads) {
- currentThread = t;
- break;
- }
- args.Process = GetProcess (process);
- args.Thread = GetThread (currentThread);
- args.Backtrace = new Backtrace (new CorBacktrace (currentThread, this));
- });
- OnTargetEvent (args);
- }
-
- protected override void OnUpdateBreakEvent (BreakEventInfo be)
- {
- }
-
- public CorValue RuntimeInvoke (CorEvaluationContext ctx, CorFunction function, CorType[] typeArgs, CorValue thisObj, CorValue[] arguments)
- {
- if (!ctx.Thread.ActiveChain.IsManaged)
- throw new EvaluatorException ("Cannot evaluate expression because the thread is stopped in native code.");
-
- CorValue[] args;
- if (thisObj == null)
- args = arguments;
- else {
- args = new CorValue[arguments.Length + 1];
- args[0] = thisObj;
- arguments.CopyTo (args, 1);
- }
-
- CorMethodCall mc = new CorMethodCall ();
- CorValue exception = null;
- CorEval eval = ctx.Eval;
-
- DebugEventHandler<CorEvalEventArgs> completeHandler = delegate (object o, CorEvalEventArgs eargs) {
- OnEndEvaluating ();
- mc.DoneEvent.Set ();
- eargs.Continue = false;
- };
-
- DebugEventHandler<CorEvalEventArgs> exceptionHandler = delegate(object o, CorEvalEventArgs eargs) {
- OnEndEvaluating ();
- exception = eargs.Eval.Result;
- mc.DoneEvent.Set ();
- eargs.Continue = false;
- };
-
- process.OnEvalComplete += completeHandler;
- process.OnEvalException += exceptionHandler;
-
- mc.OnInvoke = delegate {
- if (function.GetMethodInfo (this).Name == ".ctor")
- eval.NewParameterizedObject (function, typeArgs, args);
- else
- eval.CallParameterizedFunction (function, typeArgs, args);
- process.SetAllThreadsDebugState (CorDebugThreadState.THREAD_SUSPEND, ctx.Thread);
- ClearEvalStatus ();
- OnStartEvaluating ();
- process.Continue (false);
- };
- mc.OnAbort = delegate {
- eval.Abort ();
- };
- mc.OnGetDescription = delegate {
- MethodInfo met = function.GetMethodInfo (ctx.Session);
- if (met != null)
- return met.DeclaringType.FullName + "." + met.Name;
- else
- return "<Unknown>";
- };
-
- try {
- ObjectAdapter.AsyncExecute (mc, ctx.Options.EvaluationTimeout);
- }
- catch (COMException ex) {
- // eval exception is a 'good' exception that should be shown in value box
- // all other exceptions must be thrown to error log
- var evalException = TryConvertToEvalException (ex);
- if (evalException != null)
- throw evalException;
- throw;
- }
- finally {
- process.OnEvalComplete -= completeHandler;
- process.OnEvalException -= exceptionHandler;
- }
-
- WaitUntilStopped ();
- if (exception != null) {
-/* ValueReference<CorValue, CorType> msg = ctx.Adapter.GetMember (ctx, val, "Message");
- if (msg != null) {
- string s = msg.ObjectValue as string;
- mc.ExceptionMessage = s;
- }
- else
- mc.ExceptionMessage = "Evaluation failed.";*/
- CorValRef vref = new CorValRef (exception);
- throw new EvaluatorException ("Evaluation failed: " + ObjectAdapter.GetValueTypeName (ctx, vref));
- }
-
- return eval.Result;
- }
-
- void OnStartEvaluating ( )
- {
- lock (debugLock) {
- evaluating = true;
- }
- }
-
- void OnEndEvaluating ( )
- {
- lock (debugLock) {
- evaluating = false;
- Monitor.PulseAll (debugLock);
- }
- }
-
- CorValue NewSpecialObject (CorEvaluationContext ctx, Action<CorEval> createCall)
- {
- ManualResetEvent doneEvent = new ManualResetEvent (false);
- CorValue result = null;
- var eval = ctx.Eval;
- DebugEventHandler<CorEvalEventArgs> completeHandler = delegate (object o, CorEvalEventArgs eargs) {
- if (eargs.Eval != eval)
- return;
- result = eargs.Eval.Result;
- doneEvent.Set ();
- eargs.Continue = false;
- };
-
- DebugEventHandler<CorEvalEventArgs> exceptionHandler = delegate(object o, CorEvalEventArgs eargs)
- {
- if (eargs.Eval != eval)
- return;
- result = eargs.Eval.Result;
- doneEvent.Set ();
- eargs.Continue = false;
- };
- process.OnEvalComplete += completeHandler;
- process.OnEvalException += exceptionHandler;
-
- try {
- createCall (eval);
- process.SetAllThreadsDebugState (CorDebugThreadState.THREAD_SUSPEND, ctx.Thread);
- OnStartEvaluating ();
- ClearEvalStatus ();
- process.Continue (false);
-
- if (doneEvent.WaitOne (ctx.Options.EvaluationTimeout, false))
- return result;
- else {
- eval.Abort ();
- return null;
- }
- }
- catch (COMException ex) {
- var evalException = TryConvertToEvalException (ex);
- // eval exception is a 'good' exception that should be shown in value box
- // all other exceptions must be thrown to error log
- if (evalException != null)
- throw evalException;
- throw;
- }
- finally {
- process.OnEvalComplete -= completeHandler;
- process.OnEvalException -= exceptionHandler;
- OnEndEvaluating ();
- }
- }
-
- public CorValue NewString (CorEvaluationContext ctx, string value)
- {
- return NewSpecialObject (ctx, eval => eval.NewString (value));
- }
-
- public CorValue NewArray (CorEvaluationContext ctx, CorType elemType, int size)
- {
- return NewSpecialObject (ctx, eval => eval.NewParameterizedArray (elemType, 1, 1, 0));
- }
-
- private static EvaluatorException TryConvertToEvalException (COMException ex)
- {
- var hResult = ex.ToHResult<HResult> ();
- string message = null;
- switch (hResult) {
- case HResult.CORDBG_E_ILLEGAL_AT_GC_UNSAFE_POINT:
- message = "The thread is not at a GC-safe point";
- break;
- case HResult.CORDBG_E_ILLEGAL_IN_PROLOG:
- message = "The thread is in the prolog";
- break;
- case HResult.CORDBG_E_ILLEGAL_IN_NATIVE_CODE:
- message = "The thread is in native code";
- break;
- case HResult.CORDBG_E_ILLEGAL_IN_OPTIMIZED_CODE:
- message = "The thread is in optimized code";
- break;
- case HResult.CORDBG_E_FUNC_EVAL_BAD_START_POINT:
- message = "Bad starting point to perform evaluation";
- break;
- }
- if (message != null)
- return new EvaluatorException ("Evaluation is not allowed: {0}", message);
- return null;
- }
-
-
- public void WaitUntilStopped ()
- {
- lock (debugLock) {
- while (evaluating)
- Monitor.Wait (debugLock);
- }
- }
-
- void ClearEvalStatus ( )
- {
- foreach (CorProcess p in dbg.Processes) {
- if (p.Id == processId) {
- process = p;
- break;
- }
- }
- }
-
- void ClearHandles ( )
- {
- foreach (CorHandleValue handle in handles.Values) {
- handle.Dispose ();
- }
- handles.Clear ();
- }
-
- ProcessInfo GetProcess (CorProcess proc)
- {
- ProcessInfo info;
- lock (processes) {
- if (!processes.TryGetValue (proc.Id, out info)) {
- info = new ProcessInfo (proc.Id, "");
- processes[proc.Id] = info;
- }
- }
- return info;
- }
-
- ThreadInfo GetThread (CorThread thread)
- {
- ThreadInfo info;
- lock (threads) {
- if (!threads.TryGetValue (thread.Id, out info)) {
- string loc = string.Empty;
- try {
- if (thread.ActiveFrame != null) {
- StackFrame frame = CorBacktrace.CreateFrame (this, thread.ActiveFrame);
- loc = frame.ToString ();
- }
- else {
- loc = "<Unknown>";
- }
- }
- catch {
- loc = "<Unknown>";
- }
-
- info = new ThreadInfo (thread.Process.Id, thread.Id, GetThreadName (thread), loc);
- threads[thread.Id] = info;
- }
- return info;
- }
- }
-
- public CorThread GetThread (int id)
- {
- try {
- WaitUntilStopped ();
- foreach (CorThread t in process.Threads)
- if (t.Id == id)
- return t;
- throw new InvalidOperationException ("Invalid thread id " + id);
- }
- catch {
- throw;
- }
- }
-
- string GetThreadName (CorThread thread)
- {
- // From http://social.msdn.microsoft.com/Forums/en/netfxtoolsdev/thread/461326fe-88bd-4a6b-82a9-1a66b8e65116
- try
- {
- CorReferenceValue refVal = thread.ThreadVariable.CastToReferenceValue();
- if (refVal.IsNull)
- return string.Empty;
-
- CorObjectValue val = refVal.Dereference().CastToObjectValue();
- if (val != null)
- {
- Type classType = val.ExactType.GetTypeInfo (this);
- // Loop through all private instance fields in the thread class
- foreach (FieldInfo fi in classType.GetFields (BindingFlags.NonPublic | BindingFlags.Instance))
- {
- if (fi.Name == "m_Name")
- {
- CorReferenceValue fieldValue = val.GetFieldValue(val.Class, fi.MetadataToken).CastToReferenceValue();
-
- if (fieldValue.IsNull)
- return string.Empty;
- else
- return fieldValue.Dereference().CastToStringValue().String;
- }
- }
- }
- } catch (Exception) {
- // Ignore
- }
-
- return string.Empty;
- }
-
- string EvaluateTrace (CorThread thread, string exp)
- {
- StringBuilder sb = new StringBuilder ();
- int last = 0;
- int i = exp.IndexOf ('{');
- while (i != -1) {
- if (i < exp.Length - 1 && exp [i+1] == '{') {
- sb.Append (exp.Substring (last, i - last + 1));
- last = i + 2;
- i = exp.IndexOf ('{', i + 2);
- continue;
- }
- int j = exp.IndexOf ('}', i + 1);
- if (j == -1)
- break;
- string se = exp.Substring (i + 1, j - i - 1);
- se = EvaluateExpression (thread, se);
- sb.Append (exp.Substring (last, i - last));
- sb.Append (se);
- last = j + 1;
- i = exp.IndexOf ('{', last);
- }
- sb.Append (exp.Substring (last, exp.Length - last));
- return sb.ToString ();
- }
-
- string EvaluateExpression (CorThread thread, string exp)
- {
- try {
- if (thread.ActiveFrame == null)
- return string.Empty;
- EvaluationOptions ops = Options.EvaluationOptions.Clone ();
- ops.AllowTargetInvoke = true;
- CorEvaluationContext ctx = new CorEvaluationContext (this, new CorBacktrace (thread, this), 0, ops);
- ctx.Thread = thread;
- ValueReference val = ctx.Evaluator.Evaluate (ctx, exp);
- return val.CreateObjectValue (false).Value;
- } catch (Exception ex) {
- OnDebuggerOutput (true, ex.ToString ());
- return string.Empty;
- }
- }
-
- protected override T OnWrapDebuggerObject<T> (T obj)
- {
- if (obj is IBacktrace)
- return (T) (object) new MtaBacktrace ((IBacktrace)obj);
- if (obj is IObjectValueSource)
- return (T)(object)new MtaObjectValueSource ((IObjectValueSource)obj);
- if (obj is IObjectValueUpdater)
- return (T)(object)new MtaObjectValueUpdater ((IObjectValueUpdater)obj);
- if (obj is IRawValue)
- return (T)(object)new MtaRawValue ((IRawValue)obj);
- if (obj is IRawValueArray)
- return (T)(object)new MtaRawValueArray ((IRawValueArray)obj);
- if (obj is IRawValueString)
- return (T)(object)new MtaRawValueString ((IRawValueString)obj);
- return obj;
- }
-
- public override bool CanSetNextStatement {
- get {
- return true;
- }
- }
-
- protected override void OnSetNextStatement (long threadId, string fileName, int line, int column)
- {
- if (!CanSetNextStatement)
- throw new NotSupportedException ();
- MtaThread.Run (delegate {
- var thread = GetThread ((int)threadId);
- if (thread == null)
- throw new ArgumentException ("Unknown thread.");
-
- CorFrame frame = thread.ActiveFrame;
- if (frame == null)
- throw new NotSupportedException ();
-
- ISymbolMethod met = frame.Function.GetSymbolMethod (this);
- if (met == null) {
- throw new NotSupportedException ();
- }
-
- int offset = -1;
- int firstSpInLine = -1;
- foreach (SequencePoint sp in met.GetSequencePoints ()) {
- if (sp.IsInside (fileName, line, column)) {
- offset = sp.Offset;
- break;
- } else if (firstSpInLine == -1
- && sp.StartLine == line
- && sp.Document.URL.Equals (fileName, StringComparison.OrdinalIgnoreCase)) {
- firstSpInLine = sp.Offset;
- }
- }
- if (offset == -1) {//No exact match? Use first match in that line
- offset = firstSpInLine;
- }
- if (offset == -1) {
- throw new NotSupportedException ();
- }
- try {
- frame.SetIP (offset);
- OnStopped ();
- RaiseStopEvent ();
- } catch {
- throw new NotSupportedException ();
- }
- });
- }
- }
-
- class SequencePoint
- {
- public int StartLine;
- public int EndLine;
- public int StartColumn;
- public int EndColumn;
- public int Offset;
- public bool IsSpecial;
- public ISymbolDocument Document;
-
- public bool IsInside (string fileUrl, int line, int column)
- {
- if (!Document.URL.Equals (fileUrl, StringComparison.OrdinalIgnoreCase))
- return false;
- if (line < StartLine || (line == StartLine && column < StartColumn))
- return false;
- if (line > EndLine || (line == EndLine && column > EndColumn))
- return false;
- return true;
- }
- }
-
- static class SequencePointExt
- {
- public static IEnumerable<SequencePoint> GetSequencePoints (this ISymbolMethod met)
- {
- int sc = met.SequencePointCount;
- int[] offsets = new int[sc];
- int[] lines = new int[sc];
- int[] endLines = new int[sc];
- int[] columns = new int[sc];
- int[] endColumns = new int[sc];
- ISymbolDocument[] docs = new ISymbolDocument[sc];
- met.GetSequencePoints (offsets, docs, lines, columns, endLines, endColumns);
-
- for (int n = 0; n < sc; n++) {
- SequencePoint sp = new SequencePoint ();
- sp.Document = docs[n];
- sp.StartLine = lines[n];
- sp.EndLine = endLines[n];
- sp.StartColumn = columns[n];
- sp.EndColumn = endColumns[n];
- sp.Offset = offsets[n];
- yield return sp;
- }
- }
-
- public static Type GetTypeInfo (this CorType type, CorDebuggerSession session)
- {
- Type t;
- if (MetadataHelperFunctionsExtensions.CoreTypes.TryGetValue (type.Type, out t))
- return t;
-
- if (type.Type == CorElementType.ELEMENT_TYPE_ARRAY || type.Type == CorElementType.ELEMENT_TYPE_SZARRAY) {
- List<int> sizes = new List<int> ();
- List<int> loBounds = new List<int> ();
- for (int n = 0; n < type.Rank; n++) {
- sizes.Add (1);
- loBounds.Add (0);
- }
- return MetadataExtensions.MakeArray (type.FirstTypeParameter.GetTypeInfo (session), sizes, loBounds);
- }
-
- if (type.Type == CorElementType.ELEMENT_TYPE_BYREF)
- return MetadataExtensions.MakeByRef (type.FirstTypeParameter.GetTypeInfo (session));
-
- if (type.Type == CorElementType.ELEMENT_TYPE_PTR)
- return MetadataExtensions.MakePointer (type.FirstTypeParameter.GetTypeInfo (session));
-
- CorMetadataImport mi = session.GetMetadataForModule (type.Class.Module);
- if (mi != null) {
- t = mi.GetType (type.Class.Token);
- CorType[] targs = type.TypeParameters;
- if (targs.Length > 0) {
- List<Type> types = new List<Type> ();
- foreach (CorType ct in targs)
- types.Add (ct.GetTypeInfo (session));
- return MetadataExtensions.MakeGeneric (t, types);
- }
- else
- return t;
- }
- else
- return null;
- }
-
- public static ISymbolMethod GetSymbolMethod (this CorFunction func, CorDebuggerSession session)
- {
- ISymbolReader reader = session.GetReaderForModule (func.Module);
- if (reader == null)
- return null;
- return reader.GetMethod (new SymbolToken (func.Token));
- }
-
- public static MethodInfo GetMethodInfo (this CorFunction func, CorDebuggerSession session)
- {
- CorMetadataImport mi = session.GetMetadataForModule (func.Module);
- if (mi != null)
- return mi.GetMethodInfo (func.Token);
- else
- return null;
- }
-
- public static void SetValue (this CorValRef thisVal, EvaluationContext ctx, CorValRef val)
- {
- CorEvaluationContext cctx = (CorEvaluationContext) ctx;
- CorObjectAdaptor actx = (CorObjectAdaptor) ctx.Adapter;
- if (actx.IsEnum (ctx, thisVal.Val.ExactType) && !actx.IsEnum (ctx, val.Val.ExactType)) {
- ValueReference vr = actx.GetMember (ctx, null, thisVal, "value__");
- vr.Value = val;
- // Required to make sure that var returns an up-to-date value object
- thisVal.Invalidate ();
- return;
- }
-
- CorReferenceValue s = thisVal.Val.CastToReferenceValue ();
- if (s != null) {
- CorReferenceValue v = val.Val.CastToReferenceValue ();
- if (v != null) {
- s.Value = v.Value;
- return;
- }
- }
- CorGenericValue gv = CorObjectAdaptor.GetRealObject (cctx, thisVal.Val) as CorGenericValue;
- if (gv != null)
- gv.SetValue (ctx.Adapter.TargetObjectToObject (ctx, val));
- }
- }
-}
diff --git a/main/src/addins/MonoDevelop.Debugger.Win32/Mono.Debugging.Win32/CorEvaluationContext.cs b/main/src/addins/MonoDevelop.Debugger.Win32/Mono.Debugging.Win32/CorEvaluationContext.cs deleted file mode 100644 index e9cf9c643d..0000000000 --- a/main/src/addins/MonoDevelop.Debugger.Win32/Mono.Debugging.Win32/CorEvaluationContext.cs +++ /dev/null @@ -1,112 +0,0 @@ -using System;
-using Microsoft.Samples.Debugging.CorDebug;
-using Mono.Debugging.Evaluation;
-using DC = Mono.Debugging.Client;
-
-namespace Mono.Debugging.Win32
-{
- public class CorEvaluationContext: EvaluationContext
- {
- CorEval corEval;
- CorFrame frame;
- CorChain activeChain;
- int frameIndex;
- int evalTimestamp;
- readonly CorBacktrace backtrace;
- CorThread thread;
- int threadId;
-
- public CorDebuggerSession Session { get; set; }
-
- internal CorEvaluationContext (CorDebuggerSession session, CorBacktrace backtrace, int index, DC.EvaluationOptions ops): base (ops)
- {
- Session = session;
- base.Adapter = session.ObjectAdapter;
- frameIndex = index;
- this.backtrace = backtrace;
- evalTimestamp = CorDebuggerSession.EvaluationTimestamp;
- Evaluator = session.GetEvaluator (CorBacktrace.CreateFrame (session, Frame));
- }
-
- public new CorObjectAdaptor Adapter {
- get { return (CorObjectAdaptor)base.Adapter; }
- }
-
- void CheckTimestamp ( )
- {
- if (evalTimestamp != CorDebuggerSession.EvaluationTimestamp) {
- thread = null;
- frame = null;
- corEval = null;
- activeChain = null;
- }
- }
-
- public CorThread Thread {
- get {
- CheckTimestamp ();
- if (thread == null)
- thread = Session.GetThread (threadId);
- return thread;
- }
- set {
- thread = value;
- threadId = thread.Id;
- }
- }
-
- public CorChain ActiveChain {
- get {
- CheckTimestamp ();
- if (activeChain == null) {
- activeChain = Thread.ActiveChain;
- }
- return activeChain;
- }
- }
-
- public CorFrame Frame {
- get {
- CheckTimestamp ();
- if (frame == null) {
- frame = backtrace.FrameList [frameIndex];
- }
- return frame;
- }
- }
-
- public CorEval Eval {
- get {
- CheckTimestamp ();
- if (corEval == null)
- corEval = Thread.CreateEval ();
- return corEval;
- }
- }
-
- public override void CopyFrom (EvaluationContext ctx)
- {
- base.CopyFrom (ctx);
- frame = ((CorEvaluationContext) ctx).frame;
- frameIndex = ((CorEvaluationContext) ctx).frameIndex;
- evalTimestamp = ((CorEvaluationContext) ctx).evalTimestamp;
- Thread = ((CorEvaluationContext) ctx).Thread;
- Session = ((CorEvaluationContext) ctx).Session;
- }
-
- public override void WriteDebuggerError (Exception ex)
- {
- Session.Frontend.NotifyDebuggerOutput (true, ex.Message);
- }
-
- public override void WriteDebuggerOutput (string message, params object[] values)
- {
- Session.Frontend.NotifyDebuggerOutput (false, string.Format (message, values));
- }
-
- public CorValue RuntimeInvoke (CorFunction function, CorType[] typeArgs, CorValue thisObj, CorValue[] arguments)
- {
- return Session.RuntimeInvoke (this, function, typeArgs, thisObj, arguments);
- }
- }
-}
diff --git a/main/src/addins/MonoDevelop.Debugger.Win32/Mono.Debugging.Win32/CorMethodCall.cs b/main/src/addins/MonoDevelop.Debugger.Win32/Mono.Debugging.Win32/CorMethodCall.cs deleted file mode 100644 index 08637eb496..0000000000 --- a/main/src/addins/MonoDevelop.Debugger.Win32/Mono.Debugging.Win32/CorMethodCall.cs +++ /dev/null @@ -1,47 +0,0 @@ -using System.Threading;
-using Mono.Debugging.Evaluation;
-
-namespace Mono.Debugging.Win32
-{
- class CorMethodCall: AsyncOperation
- {
- public delegate void CallCallback ( );
- public delegate string DescriptionCallback ( );
-
- public CallCallback OnInvoke;
- public CallCallback OnAbort;
- public DescriptionCallback OnGetDescription;
-
- public ManualResetEvent DoneEvent = new ManualResetEvent (false);
-
- public override string Description
- {
- get { return OnGetDescription (); }
- }
-
- public override void Invoke ( )
- {
- OnInvoke ();
- }
-
- public override void Abort ( )
- {
- OnAbort ();
- }
-
- public override void Shutdown ( )
- {
- try {
- Abort ();
- }
- catch {
- }
- DoneEvent.Set ();
- }
-
- public override bool WaitForCompleted (int timeout)
- {
- return DoneEvent.WaitOne (timeout, false);
- }
- }
-}
diff --git a/main/src/addins/MonoDevelop.Debugger.Win32/Mono.Debugging.Win32/CorObjectAdaptor.cs b/main/src/addins/MonoDevelop.Debugger.Win32/Mono.Debugging.Win32/CorObjectAdaptor.cs deleted file mode 100644 index f43c6d913d..0000000000 --- a/main/src/addins/MonoDevelop.Debugger.Win32/Mono.Debugging.Win32/CorObjectAdaptor.cs +++ /dev/null @@ -1,1764 +0,0 @@ -// Util.cs
-//
-// Author:
-// Lluis Sanchez Gual <lluis@novell.com>
-//
-// Copyright (c) 2008 Novell, Inc (http://www.novell.com)
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-//
-//
-
-using System;
-using System.Collections;
-using System.Collections.Generic;
-using System.Diagnostics;
-using System.Diagnostics.SymbolStore;
-using System.Reflection;
-using System.Text;
-using CorApi2.Metadata.Microsoft.Samples.Debugging.CorMetadata;
-using Microsoft.Samples.Debugging.CorDebug;
-using Microsoft.Samples.Debugging.CorMetadata;
-using Mono.Debugging.Backend;
-using Mono.Debugging.Client;
-using Mono.Debugging.Evaluation;
-using CorDebugMappingResult = Microsoft.Samples.Debugging.CorDebug.NativeApi.CorDebugMappingResult;
-using CorElementType = Microsoft.Samples.Debugging.CorDebug.NativeApi.CorElementType;
-using Microsoft.Samples.Debugging.Extensions;
-using System.Linq;
-using System.Runtime.CompilerServices;
-
-namespace Mono.Debugging.Win32
-{
- public class CorObjectAdaptor: ObjectValueAdaptor
- {
- public override bool IsPrimitive (EvaluationContext ctx, object val)
- {
- object v = GetRealObject (ctx, val);
- return (v is CorGenericValue) || (v is CorStringValue);
- }
-
- public override bool IsPointer (EvaluationContext ctx, object val)
- {
- CorType type = (CorType) GetValueType (ctx, val);
- return IsPointer (type);
- }
-
- public override bool IsEnum (EvaluationContext ctx, object val)
- {
- if (!(val is CorValRef))
- return false;
- CorType type = (CorType) GetValueType (ctx, val);
- return IsEnum (ctx, type);
- }
-
- public override bool IsArray (EvaluationContext ctx, object val)
- {
- return GetRealObject (ctx, val) is CorArrayValue;
- }
-
- public override bool IsString (EvaluationContext ctx, object val)
- {
- return GetRealObject (ctx, val) is CorStringValue;
- }
-
- public override bool IsNull (EvaluationContext ctx, object gval)
- {
- if (gval == null)
- return true;
- var val = gval as CorValRef;
- if (val == null)
- return true;
- if (val.Val == null || ((val.Val is CorReferenceValue) && ((CorReferenceValue) val.Val).IsNull))
- return true;
-
- var obj = GetRealObject (ctx, val);
- return (obj is CorReferenceValue) && ((CorReferenceValue)obj).IsNull;
- }
-
- public override bool IsValueType (object type)
- {
- return ((CorType)type).Type == CorElementType.ELEMENT_TYPE_VALUETYPE;
- }
-
- public override bool IsClass (EvaluationContext ctx, object type)
- {
- var t = (CorType) type;
- var cctx = (CorEvaluationContext)ctx;
- Type tt;
- if (t.Type == CorElementType.ELEMENT_TYPE_STRING ||
- t.Type == CorElementType.ELEMENT_TYPE_ARRAY ||
- t.Type == CorElementType.ELEMENT_TYPE_SZARRAY)
- return true;
- // Primitive check
- if (MetadataHelperFunctionsExtensions.CoreTypes.TryGetValue (t.Type, out tt))
- return false;
-
- if (IsIEnumerable (t, cctx.Session))
- return false;
-
- return (t.Type == CorElementType.ELEMENT_TYPE_CLASS && t.Class != null) || IsValueType (t);
- }
-
- public override bool IsGenericType (EvaluationContext ctx, object type)
- {
- return (((CorType)type).Type == CorElementType.ELEMENT_TYPE_GENERICINST) || base.IsGenericType (ctx, type);
- }
-
- public override bool NullableHasValue (EvaluationContext ctx, object type, object obj)
- {
- ValueReference hasValue = GetMember (ctx, type, obj, "hasValue");
-
- return (bool) hasValue.ObjectValue;
- }
-
- public override ValueReference NullableGetValue (EvaluationContext ctx, object type, object obj)
- {
- return GetMember (ctx, type, obj, "value");
- }
-
- public override string GetTypeName (EvaluationContext ctx, object gtype)
- {
- CorType type = (CorType) gtype;
- CorEvaluationContext cctx = (CorEvaluationContext) ctx;
- Type t;
- if (MetadataHelperFunctionsExtensions.CoreTypes.TryGetValue (type.Type, out t))
- return t.FullName;
- try {
- if (type.Type == CorElementType.ELEMENT_TYPE_ARRAY || type.Type == CorElementType.ELEMENT_TYPE_SZARRAY)
- return GetTypeName (ctx, type.FirstTypeParameter) + "[" + new string (',', type.Rank - 1) + "]";
-
- if (type.Type == CorElementType.ELEMENT_TYPE_BYREF)
- return GetTypeName (ctx, type.FirstTypeParameter) + "&";
-
- if (type.Type == CorElementType.ELEMENT_TYPE_PTR)
- return GetTypeName (ctx, type.FirstTypeParameter) + "*";
-
- return type.GetTypeInfo (cctx.Session).FullName;
- }
- catch (Exception ex) {
- DebuggerLoggingService.LogError ("Exception in GetTypeName()", ex);
- return "[Unknown type]";
- }
- }
-
- public override object GetValueType (EvaluationContext ctx, object val)
- {
- if (val == null)
- return GetType (ctx, "System.Object");
-
- var realObject = GetRealObject (ctx, val);
- if (realObject == null)
- return GetType (ctx, "System.Object");;
- return realObject.ExactType;
- }
-
- public override object GetBaseType (EvaluationContext ctx, object type)
- {
- return ((CorType) type).Base;
- }
-
- protected override object GetBaseTypeWithAttribute (EvaluationContext ctx, object type, object attrType)
- {
- var wctx = (CorEvaluationContext) ctx;
- var attr = ((CorType) attrType).GetTypeInfo (wctx.Session);
- var tm = type as CorType;
-
- while (tm != null) {
- var t = tm.GetTypeInfo (wctx.Session);
-
- if (t.GetCustomAttributes (attr, false).Any ())
- return tm;
-
- tm = tm.Base;
- }
-
- return null;
- }
-
- public override object[] GetTypeArgs (EvaluationContext ctx, object type)
- {
- CorType[] types = ((CorType)type).TypeParameters;
- return CastArray<object> (types);
- }
-
- static IEnumerable<Type> GetAllTypes (EvaluationContext gctx)
- {
- CorEvaluationContext ctx = (CorEvaluationContext) gctx;
- foreach (CorModule mod in ctx.Session.GetAllModules()) {
- CorMetadataImport mi = ctx.Session.GetMetadataForModule (mod);
- if (mi != null) {
- foreach (Type t in mi.DefinedTypes)
- yield return t;
- }
- }
- }
-
- readonly Dictionary<string, CorType> nameToTypeCache = new Dictionary<string, CorType> ();
- readonly Dictionary<CorType, string> typeToNameCache = new Dictionary<CorType, string> ();
- readonly HashSet<string> unresolvedNames = new HashSet<string> ();
-
-
- string GetCacheName (string name, CorType[] typeArgs)
- {
- if (typeArgs == null || typeArgs.Length == 0)
- return name;
- var result = new StringBuilder(name + "<");
- for (int i = 0; i < typeArgs.Length; i++) {
- string currentTypeName;
- if (!typeToNameCache.TryGetValue (typeArgs[i], out currentTypeName)) {
- DebuggerLoggingService.LogMessage ("Can't get cached name for generic type {0} because it's substitution type isn't found in cache", name);
- return null; //Unable to resolve? Don't cache. This should never happen.
- }
- result.Append (currentTypeName);
- if (i < typeArgs.Length - 1)
- result.Append (",");
- }
- result.Append (">");
- return result.ToString();
- }
-
- public override object GetType (EvaluationContext gctx, string name, object[] gtypeArgs)
- {
- if (string.IsNullOrEmpty (name))
- return null;
- CorType[] typeArgs = CastArray<CorType> (gtypeArgs);
- CorEvaluationContext ctx = (CorEvaluationContext)gctx;
- var callingModule = ctx.Frame.Function.Class.Module;
- var callingDomain = callingModule.Assembly.AppDomain;
- string domainPrefixedName = string.Format ("{0}:{1}", callingDomain.Id, name);
- string cacheName = GetCacheName (domainPrefixedName, typeArgs);
- CorType typeFromCache;
-
- if (!string.IsNullOrEmpty (cacheName) && nameToTypeCache.TryGetValue (cacheName, out typeFromCache)) {
- return typeFromCache;
- }
- if (unresolvedNames.Contains (cacheName ?? domainPrefixedName))
- return null;
- foreach (CorModule mod in ctx.Session.GetModules (callingDomain)) {
- CorMetadataImport mi = ctx.Session.GetMetadataForModule (mod);
- if (mi != null) {
- var token = mi.GetTypeTokenFromName (name);
- if (token == CorMetadataImport.TokenNotFound)
- continue;
- var t = mi.GetType(token);
- CorClass cls = mod.GetClassFromToken (t.MetadataToken);
- CorType foundType = cls.GetParameterizedType (CorElementType.ELEMENT_TYPE_CLASS, typeArgs);
- if (foundType != null) {
- if (!string.IsNullOrEmpty (cacheName)) {
- nameToTypeCache[cacheName] = foundType;
- typeToNameCache[foundType] = cacheName;
- }
- return foundType;
- }
- }
- }
- unresolvedNames.Add (cacheName ?? domainPrefixedName);
- return null;
- }
-
- static T[] CastArray<T> (object[] array)
- {
- if (array == null)
- return null;
- T[] ret = new T[array.Length];
- Array.Copy (array, ret, array.Length);
- return ret;
- }
-
- public override string CallToString(EvaluationContext ctx, object objr)
- {
- CorValue obj = GetRealObject(ctx, objr);
-
- if ((obj is CorReferenceValue) && ((CorReferenceValue)obj).IsNull)
- return string.Empty;
-
- var stringVal = obj as CorStringValue;
- if (stringVal != null)
- return stringVal.String;
-
- var genericVal = obj as CorGenericValue;
- if (genericVal != null)
- return genericVal.GetValue ().ToString ();
-
- var arr = obj as CorArrayValue;
- if (arr != null)
- {
- var tn = new StringBuilder (GetDisplayTypeName (ctx, arr.ExactType.FirstTypeParameter));
- tn.Append("[");
- int[] dims = arr.GetDimensions();
- for (int n = 0; n < dims.Length; n++)
- {
- if (n > 0)
- tn.Append(',');
- tn.Append(dims[n]);
- }
- tn.Append("]");
- return tn.ToString();
- }
-
- var cctx = (CorEvaluationContext)ctx;
- var co = obj as CorObjectValue;
- if (co != null)
- {
- if (IsEnum (ctx, co.ExactType))
- {
- MetadataType rt = co.ExactType.GetTypeInfo(cctx.Session) as MetadataType;
- bool isFlags = rt != null && rt.ReallyIsFlagsEnum;
- string enumName = GetTypeName(ctx, co.ExactType);
- ValueReference val = GetMember(ctx, null, objr, "value__");
- ulong nval = (ulong)System.Convert.ChangeType(val.ObjectValue, typeof(ulong));
- ulong remainingFlags = nval;
- string flags = null;
- foreach (ValueReference evals in GetMembers(ctx, co.ExactType, null, BindingFlags.Public | BindingFlags.Static))
- {
- ulong nev = (ulong)System.Convert.ChangeType(evals.ObjectValue, typeof(ulong));
- if (nval == nev)
- return evals.Name;
- if (isFlags && nev != 0 && (nval & nev) == nev)
- {
- if (flags == null)
- flags = enumName + "." + evals.Name;
- else
- flags += " | " + enumName + "." + evals.Name;
- remainingFlags &= ~nev;
- }
- }
- if (isFlags)
- {
- if (remainingFlags == nval)
- return nval.ToString ();
- if (remainingFlags != 0)
- flags += " | " + remainingFlags;
- return flags;
- }
- else
- return nval.ToString ();
- }
-
- var targetType = (CorType)GetValueType (ctx, objr);
-
- var methodInfo = OverloadResolve (cctx, "ToString", targetType, new CorType[0], BindingFlags.Public | BindingFlags.Instance, false);
- if (methodInfo != null && methodInfo.Item1.DeclaringType != null && methodInfo.Item1.DeclaringType.FullName != "System.Object") {
- var args = new object[0];
- object ores = RuntimeInvoke (ctx, targetType, objr, "ToString", new object[0], args, args);
- var res = GetRealObject (ctx, ores) as CorStringValue;
- if (res != null)
- return res.String;
- }
-
- return GetDisplayTypeName (ctx, targetType);
- }
-
- return base.CallToString(ctx, obj);
- }
-
- public override object CreateTypeObject (EvaluationContext ctx, object type)
- {
- var t = (CorType)type;
- string tname = GetTypeName (ctx, t) + ", " + System.IO.Path.GetFileNameWithoutExtension (t.Class.Module.Assembly.Name);
- var stype = (CorType) GetType (ctx, "System.Type");
- object[] argTypes = { GetType (ctx, "System.String") };
- object[] argVals = { CreateValue (ctx, tname) };
- return RuntimeInvoke (ctx, stype, null, "GetType", argTypes, argVals);
- }
-
- public CorValRef GetBoxedArg (CorEvaluationContext ctx, CorValRef val, Type argType)
- {
- // Boxes a value when required
- if (argType == typeof (object) && IsValueType (ctx, val))
- return Box (ctx, val);
- else
- return val;
- }
-
- static bool IsValueType (CorEvaluationContext ctx, CorValRef val)
- {
- CorValue v = GetRealObject (ctx, val);
- if (v.Type == CorElementType.ELEMENT_TYPE_VALUETYPE)
- return true;
- return v is CorGenericValue;
- }
-
- CorValRef Box (CorEvaluationContext ctx, CorValRef val)
- {
- CorValRef arr = new CorValRef (delegate {
- return ctx.Session.NewArray (ctx, (CorType)GetValueType (ctx, val), 1);
- });
- ArrayAdaptor realArr = new ArrayAdaptor (ctx, new CorValRef<CorArrayValue> (() => (CorArrayValue) GetRealObject (ctx, arr)));
- realArr.SetElement (new [] { 0 }, val);
- CorType at = (CorType) GetType (ctx, "System.Array");
- object[] argTypes = { GetType (ctx, "System.Int32") };
- return (CorValRef)RuntimeInvoke (ctx, at, arr, "GetValue", argTypes, new object[] { CreateValue (ctx, 0) });
- }
-
- public override bool HasMethod (EvaluationContext gctx, object gtargetType, string methodName, object[] ggenericArgTypes, object[] gargTypes, BindingFlags flags)
- {
- // FIXME: support generic methods by using the genericArgTypes parameter
- CorType targetType = (CorType) gtargetType;
- CorType[] argTypes = gargTypes != null ? CastArray<CorType> (gargTypes) : null;
- CorEvaluationContext ctx = (CorEvaluationContext)gctx;
- flags = flags | BindingFlags.Public | BindingFlags.NonPublic;
-
- return OverloadResolve (ctx, methodName, targetType, argTypes, flags, false) != null;
- }
-
- public override object RuntimeInvoke (EvaluationContext gctx, object gtargetType, object gtarget, string methodName, object[] ggenericArgTypes, object[] gargTypes, object[] gargValues)
- {
- // FIXME: support generic methods by using the genericArgTypes parameter
- CorType targetType = (CorType) gtargetType;
- CorValRef target = (CorValRef) gtarget;
- CorType[] argTypes = CastArray<CorType> (gargTypes);
- CorValRef[] argValues = CastArray<CorValRef> (gargValues);
-
- BindingFlags flags = BindingFlags.Public | BindingFlags.NonPublic;
- if (target != null)
- flags |= BindingFlags.Instance;
- else
- flags |= BindingFlags.Static;
-
- CorEvaluationContext ctx = (CorEvaluationContext)gctx;
- var methodInfo = OverloadResolve (ctx, methodName, targetType, argTypes, flags, true);
- if (methodInfo == null)
- return null;
- var method = methodInfo.Item1;
- var methodOwner = methodInfo.Item2;
- ParameterInfo[] parameters = method.GetParameters ();
- // TODO: Check this.
- for (int n = 0; n < parameters.Length; n++) {
- if (parameters[n].ParameterType == typeof(object) && IsValueType (ctx, argValues[n]) && !IsEnum (ctx, argValues[n]))
- argValues[n] = Box (ctx, argValues[n]);
- }
-
- CorValRef v = new CorValRef (delegate {
- CorModule mod = null;
- if (methodOwner.Type == CorElementType.ELEMENT_TYPE_ARRAY || methodOwner.Type == CorElementType.ELEMENT_TYPE_SZARRAY
- || MetadataHelperFunctionsExtensions.CoreTypes.ContainsKey (methodOwner.Type)) {
- mod = ((CorType) ctx.Adapter.GetType (ctx, "System.Object")).Class.Module;
- }
- else {
- mod = methodOwner.Class.Module;
- }
- CorFunction func = mod.GetFunctionFromToken (method.MetadataToken);
- CorValue[] args = new CorValue[argValues.Length];
- for (int n = 0; n < args.Length; n++)
- args[n] = argValues[n].Val;
- if (methodOwner.Type == CorElementType.ELEMENT_TYPE_ARRAY || methodOwner.Type == CorElementType.ELEMENT_TYPE_SZARRAY
- || MetadataHelperFunctionsExtensions.CoreTypes.ContainsKey (methodOwner.Type)) {
- return ctx.RuntimeInvoke (func, new CorType[0], target != null ? target.Val : null, args);
- }
- else {
- return ctx.RuntimeInvoke (func, methodOwner.TypeParameters, target != null ? target.Val : null, args);
- }
- });
- return v.Val == null ? null : v;
- }
-
- /// <summary>
- /// Returns a pair of method info and a type on which it was resolved
- /// </summary>
- /// <param name="ctx"></param>
- /// <param name="methodName"></param>
- /// <param name="type"></param>
- /// <param name="argtypes"></param>
- /// <param name="flags"></param>
- /// <param name="throwIfNotFound"></param>
- /// <returns></returns>
- Tuple<MethodInfo, CorType> OverloadResolve (CorEvaluationContext ctx, string methodName, CorType type, CorType[] argtypes, BindingFlags flags, bool throwIfNotFound)
- {
- List<Tuple<MethodInfo, CorType>> candidates = new List<Tuple<MethodInfo, CorType>> ();
- CorType currentType = type;
-
- while (currentType != null) {
- Type rtype = currentType.GetTypeInfo (ctx.Session);
- foreach (MethodInfo met in rtype.GetMethods (flags)) {
- if (met.Name == methodName || (!ctx.CaseSensitive && met.Name.Equals (methodName, StringComparison.CurrentCultureIgnoreCase))) {
- if (argtypes == null)
- return Tuple.Create (met, currentType);
- ParameterInfo[] pars = met.GetParameters ();
- if (pars.Length == argtypes.Length)
- candidates.Add (Tuple.Create (met, currentType));
- }
- }
-
- if (argtypes == null && candidates.Count > 0)
- break; // when argtypes is null, we are just looking for *any* match (not a specific match)
-
- if (methodName == ".ctor")
- break; // Can't create objects using constructor from base classes
- if ((rtype.BaseType == null && rtype.FullName != "System.Object") ||
- currentType.Type == CorElementType.ELEMENT_TYPE_ARRAY ||
- currentType.Type == CorElementType.ELEMENT_TYPE_SZARRAY ||
- currentType.Type == CorElementType.ELEMENT_TYPE_STRING) {
- currentType = ctx.Adapter.GetType (ctx, "System.Object") as CorType;
- } else if (rtype.BaseType != null && rtype.BaseType.FullName == "System.ValueType") {
- currentType = ctx.Adapter.GetType (ctx, "System.ValueType") as CorType;
- } else {
- // if the currentType is not a class .Base throws an exception ArgumentOutOfRange (thx for coreclr repo for figure it out)
- try {
- currentType = currentType.Base;
- }
- catch (Exception) {
- currentType = null;
- }
- }
- }
-
- return OverloadResolve (ctx, GetTypeName (ctx, type), methodName, argtypes, candidates, throwIfNotFound);
- }
-
- bool IsApplicable (CorEvaluationContext ctx, MethodInfo method, CorType[] types, out string error, out int matchCount)
- {
- ParameterInfo[] mparams = method.GetParameters ();
- matchCount = 0;
-
- for (int i = 0; i < types.Length; i++) {
-
- Type param_type = mparams[i].ParameterType;
-
- if (param_type.FullName == GetTypeName (ctx, types[i])) {
- matchCount++;
- continue;
- }
-
- if (IsAssignableFrom (ctx, param_type, types[i]))
- continue;
-
- error = String.Format (
- "Argument {0}: Cannot implicitly convert `{1}' to `{2}'",
- i, GetTypeName (ctx, types[i]), param_type.FullName);
- return false;
- }
-
- error = null;
- return true;
- }
-
- Tuple<MethodInfo, CorType> OverloadResolve (CorEvaluationContext ctx, string typeName, string methodName, CorType[] argtypes, List<Tuple<MethodInfo, CorType>> candidates, bool throwIfNotFound)
- {
- if (candidates.Count == 1) {
- string error;
- int matchCount;
- if (IsApplicable (ctx, candidates[0].Item1, argtypes, out error, out matchCount))
- return candidates[0];
-
- if (throwIfNotFound)
- throw new EvaluatorException ("Invalid arguments for method `{0}': {1}", methodName, error);
-
- return null;
- }
-
- if (candidates.Count == 0) {
- if (throwIfNotFound)
- throw new EvaluatorException ("Method `{0}' not found in type `{1}'.", methodName, typeName);
-
- return null;
- }
-
- // Ok, now we need to find an exact match.
- Tuple<MethodInfo, CorType> match = null;
- int bestCount = -1;
- bool repeatedBestCount = false;
-
- foreach (var method in candidates) {
- string error;
- int matchCount;
-
- if (!IsApplicable (ctx, method.Item1, argtypes, out error, out matchCount))
- continue;
-
- if (matchCount == bestCount) {
- repeatedBestCount = true;
- }
- else if (matchCount > bestCount) {
- match = method;
- bestCount = matchCount;
- repeatedBestCount = false;
- }
- }
-
- if (match == null) {
- if (!throwIfNotFound)
- return null;
-
- if (methodName != null)
- throw new EvaluatorException ("Invalid arguments for method `{0}'.", methodName);
-
- throw new EvaluatorException ("Invalid arguments for indexer.");
- }
-
- if (repeatedBestCount) {
- // If there is an ambiguous match, just pick the first match. If the user was expecting
- // something else, he can provide more specific arguments
-
- /* if (!throwIfNotFound)
- return null;
- if (methodName != null)
- throw new EvaluatorException ("Ambiguous method `{0}'; need to use full name", methodName);
- else
- throw new EvaluatorException ("Ambiguous arguments for indexer.", methodName);
- */
- }
-
- return match;
- }
-
-
- public override string[] GetImportedNamespaces (EvaluationContext ctx)
- {
- var list = new HashSet<string> ();
- foreach (Type t in GetAllTypes (ctx)) {
- list.Add (t.Namespace);
- }
- var arr = new string[list.Count];
- list.CopyTo (arr);
- return arr;
- }
-
- public override void GetNamespaceContents (EvaluationContext ctx, string namspace, out string[] childNamespaces, out string[] childTypes)
- {
- var nss = new HashSet<string> ();
- var types = new HashSet<string> ();
- string namspacePrefix = namspace.Length > 0 ? namspace + "." : "";
- foreach (Type t in GetAllTypes (ctx)) {
- if (t.Namespace == namspace || t.Namespace.StartsWith (namspacePrefix, StringComparison.InvariantCulture)) {
- nss.Add (t.Namespace);
- types.Add (t.FullName);
- }
- }
-
- childNamespaces = new string[nss.Count];
- nss.CopyTo (childNamespaces);
-
- childTypes = new string [types.Count];
- types.CopyTo (childTypes);
- }
-
- bool IsAssignableFrom (CorEvaluationContext ctx, Type baseType, CorType ctype)
- {
- // the type is method generic parameter, we have to check its constraints, but now we don't have the info about it
- // and assume that any type is assignable to method generic type parameter
- if (baseType is MethodGenericParameter)
- return true;
- string tname = baseType.FullName;
- string ctypeName = GetTypeName (ctx, ctype);
- if (tname == "System.Object")
- return true;
-
- if (tname == ctypeName)
- return true;
-
- if (MetadataHelperFunctionsExtensions.CoreTypes.ContainsKey (ctype.Type))
- return false;
-
- switch (ctype.Type) {
- case CorElementType.ELEMENT_TYPE_ARRAY:
- case CorElementType.ELEMENT_TYPE_SZARRAY:
- case CorElementType.ELEMENT_TYPE_BYREF:
- case CorElementType.ELEMENT_TYPE_PTR:
- return false;
- }
-
- while (ctype != null) {
- if (GetTypeName (ctx, ctype) == tname)
- return true;
- ctype = ctype.Base;
- }
- return false;
- }
-
- public override object TryCast (EvaluationContext ctx, object val, object type)
- {
- var ctype = (CorType) GetValueType (ctx, val);
- CorValue obj = GetRealObject(ctx, val);
- string tname = GetTypeName(ctx, type);
- string ctypeName = GetValueTypeName (ctx, val);
- if (tname == "System.Object")
- return val;
-
- if (tname == ctypeName)
- return val;
-
- if (obj is CorStringValue)
- return ctypeName == tname ? val : null;
-
- if (obj is CorArrayValue)
- return (ctypeName == tname || ctypeName == "System.Array") ? val : null;
-
- var genVal = obj as CorGenericValue;
- if (genVal != null) {
- Type t = Type.GetType(tname);
- try {
- if (t != null && t.IsPrimitive && t != typeof (string)) {
- object pval = genVal.GetValue ();
- try {
- pval = System.Convert.ChangeType (pval, t);
- }
- catch {
- // pval = DynamicCast (pval, t);
- return null;
- }
- return CreateValue (ctx, pval);
- }
- else if (IsEnum (ctx, (CorType)type)) {
- return CreateEnum (ctx, (CorType)type, val);
- }
- } catch {
- }
- }
-
- if (obj is CorObjectValue)
- {
- var co = (CorObjectValue)obj;
- if (IsEnum (ctx, co.ExactType)) {
- ValueReference rval = GetMember (ctx, null, val, "value__");
- return TryCast (ctx, rval.Value, type);
- }
-
- while (ctype != null)
- {
- if (GetTypeName(ctx, ctype) == tname)
- return val;
- ctype = ctype.Base;
- }
- return null;
- }
- return null;
- }
-
- public bool IsPointer (CorType targetType)
- {
- return targetType.Type == CorElementType.ELEMENT_TYPE_PTR;
- }
-
- public object CreateEnum (EvaluationContext ctx, CorType type, object val)
- {
- object systemEnumType = GetType (ctx, "System.Enum");
- object enumType = CreateTypeObject (ctx, type);
- object[] argTypes = { GetValueType (ctx, enumType), GetValueType (ctx, val) };
- object[] args = { enumType, val };
- return RuntimeInvoke (ctx, systemEnumType, null, "ToObject", argTypes, args);
- }
-
- public bool IsEnum (EvaluationContext ctx, CorType targetType)
- {
- return (targetType.Type == CorElementType.ELEMENT_TYPE_VALUETYPE || targetType.Type == CorElementType.ELEMENT_TYPE_CLASS) && targetType.Base != null && GetTypeName (ctx, targetType.Base) == "System.Enum";
- }
-
- public override object CreateValue (EvaluationContext gctx, object value)
- {
- CorEvaluationContext ctx = (CorEvaluationContext) gctx;
- if (value is string) {
- return new CorValRef (delegate {
- return ctx.Session.NewString (ctx, (string) value);
- });
- }
-
- foreach (KeyValuePair<CorElementType, Type> tt in MetadataHelperFunctionsExtensions.CoreTypes) {
- if (tt.Value == value.GetType ()) {
- CorValue val = ctx.Eval.CreateValue (tt.Key, null);
- CorGenericValue gv = val.CastToGenericValue ();
- gv.SetValue (value);
- return new CorValRef (val);
- }
- }
- ctx.WriteDebuggerError (new NotSupportedException (String.Format ("Unable to create value for type: {0}", value.GetType ())));
- return null;
- }
-
- public override object CreateValue (EvaluationContext ctx, object type, params object[] gargs)
- {
- CorValRef[] args = CastArray<CorValRef> (gargs);
- return new CorValRef (delegate {
- return CreateCorValue (ctx, (CorType) type, args);
- });
- }
-
- public CorValue CreateCorValue (EvaluationContext ctx, CorType type, params CorValRef[] args)
- {
- CorEvaluationContext cctx = (CorEvaluationContext)ctx;
- CorValue[] vargs = new CorValue [args.Length];
- CorType[] targs = new CorType[args.Length];
- for (int n = 0; n < args.Length; n++) {
- vargs [n] = args [n].Val;
- targs [n] = vargs [n].ExactType;
- }
- MethodInfo ctor = null;
- var ctorInfo = OverloadResolve (cctx, ".ctor", type, targs, BindingFlags.Instance | BindingFlags.Public, false);
- if (ctorInfo != null) {
- ctor = ctorInfo.Item1;
- }
- if (ctor == null) {
- //TODO: Remove this if and content when Generic method invocation is fully implemented
- Type t = type.GetTypeInfo (cctx.Session);
- foreach (MethodInfo met in t.GetMethods ()) {
- if (met.IsSpecialName && met.Name == ".ctor") {
- ParameterInfo[] pinfos = met.GetParameters ();
- if (pinfos.Length == 1) {
- ctor = met;
- break;
- }
- }
- }
- }
-
- if (ctor == null)
- return null;
-
- CorFunction func = type.Class.Module.GetFunctionFromToken (ctor.MetadataToken);
- return cctx.RuntimeInvoke (func, type.TypeParameters, null, vargs);
- }
-
- public override object CreateNullValue (EvaluationContext gctx, object type)
- {
- CorEvaluationContext ctx = (CorEvaluationContext) gctx;
- return new CorValRef (ctx.Eval.CreateValueForType ((CorType)type));
- }
-
- public override ICollectionAdaptor CreateArrayAdaptor (EvaluationContext ctx, object arr)
- {
- CorValue val = CorObjectAdaptor.GetRealObject (ctx, arr);
-
- if (val is CorArrayValue)
- return new ArrayAdaptor (ctx, new CorValRef<CorArrayValue> ((CorArrayValue) val, () => (CorArrayValue) GetRealObject (ctx, arr)));
- return null;
- }
-
- public override IStringAdaptor CreateStringAdaptor (EvaluationContext ctx, object str)
- {
- CorValue val = CorObjectAdaptor.GetRealObject (ctx, str);
-
- if (val is CorStringValue)
- return new StringAdaptor (ctx, (CorValRef)str, (CorStringValue)val);
- return null;
- }
-
- public static CorValue GetRealObject (EvaluationContext cctx, object objr)
- {
- if (objr == null)
- return null;
-
- var corValue = objr as CorValue;
- if (corValue != null)
- return GetRealObject (cctx, corValue);
- var valRef = objr as CorValRef;
- if (valRef != null)
- return GetRealObject (cctx, valRef.Val);
- return null;
- }
-
- public static CorValue GetRealObject (EvaluationContext ctx, CorValue obj)
- {
- CorEvaluationContext cctx = (CorEvaluationContext) ctx;
- if (obj == null)
- return null;
-
- try {
- if (obj is CorStringValue)
- return obj;
-
- if (obj is CorGenericValue)
- return obj;
-
- CorArrayValue arrayVal = obj.CastToArrayValue ();
- if (arrayVal != null)
- return arrayVal;
-
- CorReferenceValue refVal = obj.CastToReferenceValue ();
- if (refVal != null) {
- cctx.Session.WaitUntilStopped ();
- if (refVal.IsNull)
- return refVal;
- else {
- return GetRealObject (cctx, refVal.Dereference ());
- }
- }
-
- cctx.Session.WaitUntilStopped ();
- CorBoxValue boxVal = obj.CastToBoxValue ();
- if (boxVal != null)
- return Unbox (ctx, boxVal);
-
- if (obj.ExactType.Type == CorElementType.ELEMENT_TYPE_STRING)
- return obj.CastToStringValue ();
-
- if (MetadataHelperFunctionsExtensions.CoreTypes.ContainsKey (obj.Type)) {
- CorGenericValue genVal = obj.CastToGenericValue ();
- if (genVal != null)
- return genVal;
- }
-
- if (!(obj is CorObjectValue))
- return obj.CastToObjectValue ();
- }
- catch {
- // Ignore
- throw;
- }
- return obj;
- }
-
- static CorValue Unbox (EvaluationContext ctx, CorBoxValue boxVal)
- {
- CorObjectValue bval = boxVal.GetObject ();
- Type ptype = Type.GetType (ctx.Adapter.GetTypeName (ctx, bval.ExactType));
-
- if (ptype != null && ptype.IsPrimitive) {
- ptype = bval.ExactType.GetTypeInfo (((CorEvaluationContext)ctx).Session);
- foreach (FieldInfo field in ptype.GetFields (BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance)) {
- if (field.Name == "m_value") {
- CorValue val = bval.GetFieldValue (bval.ExactType.Class, field.MetadataToken);
- val = GetRealObject (ctx, val);
- return val;
- }
- }
- }
-
- return GetRealObject (ctx, bval);
- }
-
- public override object GetEnclosingType (EvaluationContext gctx)
- {
- CorEvaluationContext ctx = (CorEvaluationContext) gctx;
- if (ctx.Frame.FrameType != CorFrameType.ILFrame || ctx.Frame.Function == null)
- return null;
-
- CorClass cls = ctx.Frame.Function.Class;
- List<CorType> tpars = new List<CorType> ();
- foreach (CorType t in ctx.Frame.TypeParameters)
- tpars.Add (t);
- return cls.GetParameterizedType (CorElementType.ELEMENT_TYPE_CLASS, tpars.ToArray ());
- }
-
- public override IEnumerable<EnumMember> GetEnumMembers (EvaluationContext ctx, object tt)
- {
- CorType t = (CorType)tt;
- CorEvaluationContext cctx = (CorEvaluationContext)ctx;
-
- Type type = t.GetTypeInfo (cctx.Session);
-
- foreach (FieldInfo field in type.GetFields (BindingFlags.Public | BindingFlags.Static)) {
- if (field.IsLiteral && field.IsStatic) {
- object val = field.GetValue (null);
- EnumMember em = new EnumMember ();
- em.Value = (long) System.Convert.ChangeType (val, typeof (long));
- em.Name = field.Name;
- yield return em;
- }
- }
- }
-
- public override ValueReference GetIndexerReference (EvaluationContext ctx, object target, object[] indices)
- {
- CorEvaluationContext cctx = (CorEvaluationContext)ctx;
- CorType targetType = GetValueType (ctx, target) as CorType;
-
- CorValRef[] values = new CorValRef[indices.Length];
- CorType[] types = new CorType[indices.Length];
- for (int n = 0; n < indices.Length; n++) {
- types[n] = (CorType) GetValueType (ctx, indices[n]);
- values[n] = (CorValRef) indices[n];
- }
-
- List<Tuple<MethodInfo, CorType>> candidates = new List<Tuple<MethodInfo, CorType>> ();
- List<PropertyInfo> props = new List<PropertyInfo> ();
- List<CorType> propTypes = new List<CorType> ();
-
- CorType t = targetType;
- while (t != null) {
- Type type = t.GetTypeInfo (cctx.Session);
-
- foreach (PropertyInfo prop in type.GetProperties (BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance)) {
- MethodInfo mi = null;
- try {
- mi = prop.CanRead ? prop.GetGetMethod (true) : null;
- }
- catch {
- // Ignore
- }
- if (mi != null && !mi.IsStatic && mi.GetParameters ().Length > 0) {
- candidates.Add (Tuple.Create (mi, t));
- props.Add (prop);
- propTypes.Add (t);
- }
- }
- if (cctx.Adapter.IsPrimitive (ctx, target))
- break;
- t = t.Base;
- }
-
- var idx = OverloadResolve (cctx, GetTypeName (ctx, targetType), null, types, candidates, true);
- int i = candidates.IndexOf (idx);
-
- if (props [i].GetGetMethod (true) == null)
- return null;
-
- return new PropertyReference (ctx, props[i], (CorValRef)target, propTypes[i], values);
- }
-
- public override bool HasMember (EvaluationContext ctx, object tt, string memberName, BindingFlags bindingFlags)
- {
- CorEvaluationContext cctx = (CorEvaluationContext) ctx;
- CorType ct = (CorType) tt;
-
- while (ct != null) {
- Type type = ct.GetTypeInfo (cctx.Session);
-
- FieldInfo field = type.GetField (memberName, bindingFlags);
- if (field != null)
- return true;
-
- PropertyInfo prop = type.GetProperty (memberName, bindingFlags);
- if (prop != null) {
- MethodInfo getter = prop.CanRead ? prop.GetGetMethod (bindingFlags.HasFlag (BindingFlags.NonPublic)) : null;
- if (getter != null)
- return true;
- }
-
- if (bindingFlags.HasFlag (BindingFlags.DeclaredOnly))
- break;
-
- ct = ct.Base;
- }
-
- return false;
- }
-
- protected override IEnumerable<ValueReference> GetMembers (EvaluationContext ctx, object tt, object gval, BindingFlags bindingFlags)
- {
- var subProps = new Dictionary<string, PropertyInfo> ();
- var t = (CorType) tt;
- var val = (CorValRef) gval;
- CorType realType = null;
- if (gval != null && (bindingFlags & BindingFlags.Instance) != 0)
- realType = GetValueType (ctx, gval) as CorType;
-
- if (t.Type == CorElementType.ELEMENT_TYPE_CLASS && t.Class == null)
- yield break;
-
- CorEvaluationContext cctx = (CorEvaluationContext) ctx;
-
- // First of all, get a list of properties overriden in sub-types
- while (realType != null && realType != t) {
- Type type = realType.GetTypeInfo (cctx.Session);
- foreach (PropertyInfo prop in type.GetProperties (bindingFlags | BindingFlags.DeclaredOnly)) {
- MethodInfo mi = prop.GetGetMethod (true);
- if (mi == null || mi.GetParameters ().Length != 0 || mi.IsAbstract || !mi.IsVirtual || mi.IsStatic)
- continue;
- if (mi.IsPublic && ((bindingFlags & BindingFlags.Public) == 0))
- continue;
- if (!mi.IsPublic && ((bindingFlags & BindingFlags.NonPublic) == 0))
- continue;
- subProps [prop.Name] = prop;
- }
- realType = realType.Base;
- }
-
- while (t != null) {
- Type type = t.GetTypeInfo (cctx.Session);
-
- foreach (FieldInfo field in type.GetFields (bindingFlags)) {
- if (field.IsStatic && ((bindingFlags & BindingFlags.Static) == 0))
- continue;
- if (!field.IsStatic && ((bindingFlags & BindingFlags.Instance) == 0))
- continue;
- if (field.IsPublic && ((bindingFlags & BindingFlags.Public) == 0))
- continue;
- if (!field.IsPublic && ((bindingFlags & BindingFlags.NonPublic) == 0))
- continue;
- yield return new FieldReference (ctx, val, t, field);
- }
-
- foreach (PropertyInfo prop in type.GetProperties (bindingFlags)) {
- MethodInfo mi = null;
- try {
- mi = prop.CanRead ? prop.GetGetMethod (true) : null;
- } catch {
- // Ignore
- }
- if (mi == null || mi.GetParameters ().Length != 0 || mi.IsAbstract)
- continue;
-
- if (mi.IsStatic && ((bindingFlags & BindingFlags.Static) == 0))
- continue;
- if (!mi.IsStatic && ((bindingFlags & BindingFlags.Instance) == 0))
- continue;
- if (mi.IsPublic && ((bindingFlags & BindingFlags.Public) == 0))
- continue;
- if (!mi.IsPublic && ((bindingFlags & BindingFlags.NonPublic) == 0))
- continue;
-
- // If a property is overriden, return the override instead of the base property
- PropertyInfo overridden;
- if (mi.IsVirtual && subProps.TryGetValue (prop.Name, out overridden)) {
- mi = overridden.GetGetMethod (true);
- if (mi == null)
- continue;
-
- var declaringType = GetType (ctx, overridden.DeclaringType.FullName) as CorType;
- yield return new PropertyReference (ctx, overridden, val, declaringType);
- } else {
- yield return new PropertyReference (ctx, prop, val, t);
- }
- }
- if ((bindingFlags & BindingFlags.DeclaredOnly) != 0)
- break;
- t = t.Base;
- }
- }
-
- static T FindByName<T> (IEnumerable<T> elems, Func<T,string> getName, string name, bool caseSensitive)
- {
- T best = default(T);
- foreach (T t in elems) {
- string n = getName (t);
- if (n == name)
- return t;
- if (!caseSensitive && n.Equals (name, StringComparison.CurrentCultureIgnoreCase))
- best = t;
- }
- return best;
- }
-
- static bool IsStatic (PropertyInfo prop)
- {
- MethodInfo met = prop.GetGetMethod (true) ?? prop.GetSetMethod (true);
- return met.IsStatic;
- }
-
- static bool IsAnonymousType (Type type)
- {
- return type.Name.StartsWith ("<>__AnonType", StringComparison.Ordinal);
- }
-
- static bool IsCompilerGenerated (FieldInfo field)
- {
- return field.GetCustomAttributes (true).Any (v => v is System.Diagnostics.DebuggerHiddenAttribute);
- }
-
- protected override ValueReference GetMember (EvaluationContext ctx, object t, object co, string name)
- {
- var cctx = ctx as CorEvaluationContext;
- var type = t as CorType;
-
- if (IsNullableType (ctx, t)) {
- // 'Value' and 'HasValue' property evaluation gives wrong results when the nullable object is a property of class.
- // Replace to direct field access to fix it. Actual cause of this problem is unknown
- switch (name) {
- case "Value":
- name = "value";
- break;
- case "HasValue":
- name = "hasValue";
- break;
- }
- }
-
- while (type != null) {
- var tt = type.GetTypeInfo (cctx.Session);
- FieldInfo field = FindByName (tt.GetFields (BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Static | BindingFlags.Instance), f => f.Name, name, ctx.CaseSensitive);
- if (field != null && (field.IsStatic || co != null))
- return new FieldReference (ctx, co as CorValRef, type, field);
-
- PropertyInfo prop = FindByName (tt.GetProperties (BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Static | BindingFlags.Instance), p => p.Name, name, ctx.CaseSensitive);
- if (prop != null && (IsStatic (prop) || co != null)) {
- // Optimization: if the property has a CompilerGenerated backing field, use that instead.
- // This way we avoid overhead of invoking methods on the debugee when the value is requested.
- string cgFieldName = string.Format ("<{0}>{1}", prop.Name, IsAnonymousType (tt) ? "" : "k__BackingField");
- if ((field = FindByName (tt.GetFields (BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Static | BindingFlags.Instance), f => f.Name, cgFieldName, true)) != null && IsCompilerGenerated (field))
- return new FieldReference (ctx, co as CorValRef, type, field, prop.Name, ObjectValueFlags.Property);
-
- // Backing field not available, so do things the old fashioned way.
- MethodInfo getter = prop.GetGetMethod (true);
- if (getter == null)
- return null;
-
- return new PropertyReference (ctx, prop, co as CorValRef, type);
- }
-
- type = type.Base;
- }
-
- return null;
- }
-
- static bool IsIEnumerable (Type type)
- {
- if (type.Namespace == "System.Collections" && type.Name == "IEnumerable")
- return true;
-
- if (type.Namespace == "System.Collections.Generic" && type.Name == "IEnumerable`1")
- return true;
-
- return false;
- }
-
- static bool IsIEnumerable (CorType type, CorDebuggerSession session)
- {
- return IsIEnumerable (type.GetTypeInfo (session));
- }
-
- protected override CompletionData GetMemberCompletionData (EvaluationContext ctx, ValueReference vr)
- {
- var properties = new HashSet<string> ();
- var methods = new HashSet<string> ();
- var fields = new HashSet<string> ();
- var data = new CompletionData ();
- var type = vr.Type as CorType;
- bool isEnumerable = false;
- Type t;
-
- var cctx = (CorEvaluationContext)ctx;
- while (type != null) {
- t = type.GetTypeInfo (cctx.Session);
- if (!isEnumerable && IsIEnumerable (t))
- isEnumerable = true;
-
- foreach (var field in t.GetFields ()) {
- if (field.IsStatic || field.IsSpecialName || !field.IsPublic)
- continue;
-
- if (fields.Add (field.Name))
- data.Items.Add (new CompletionItem (field.Name, FieldReference.GetFlags (field)));
- }
-
- foreach (var property in t.GetProperties ()) {
- var getter = property.GetGetMethod (true);
-
- if (getter == null || getter.IsStatic || !getter.IsPublic)
- continue;
-
- if (properties.Add (property.Name))
- data.Items.Add (new CompletionItem (property.Name, PropertyReference.GetFlags (property)));
- }
-
- foreach (var method in t.GetMethods ()) {
- if (method.IsStatic || method.IsConstructor || method.IsSpecialName || !method.IsPublic)
- continue;
-
- if (methods.Add (method.Name))
- data.Items.Add (new CompletionItem (method.Name, ObjectValueFlags.Method | ObjectValueFlags.Public));
- }
-
- if (t.BaseType == null && t.FullName != "System.Object")
- type = ctx.Adapter.GetType (ctx, "System.Object") as CorType;
- else
- type = type.Base;
- }
-
- type = vr.Type as CorType;
- t = type.GetTypeInfo (cctx.Session);
- foreach (var iface in t.GetInterfaces ()) {
- if (!isEnumerable && IsIEnumerable (iface)) {
- isEnumerable = true;
- break;
- }
- }
-
- if (isEnumerable) {
- // Look for LINQ extension methods...
- var linq = ctx.Adapter.GetType (ctx, "System.Linq.Enumerable") as CorType;
- if (linq != null) {
- var linqt = linq.GetTypeInfo (cctx.Session);
- foreach (var method in linqt.GetMethods ()) {
- if (!method.IsStatic || method.IsConstructor || method.IsSpecialName || !method.IsPublic)
- continue;
-
- if (methods.Add (method.Name))
- data.Items.Add (new CompletionItem (method.Name, ObjectValueFlags.Method | ObjectValueFlags.Public));
- }
- }
- }
-
- data.ExpressionLength = 0;
-
- return data;
- }
-
- public override object TargetObjectToObject (EvaluationContext ctx, object objr)
- {
- CorValue obj = GetRealObject (ctx, objr);
-
- if ((obj is CorReferenceValue) && ((CorReferenceValue)obj).IsNull)
- return null;
-
- CorStringValue stringVal = obj as CorStringValue;
- if (stringVal != null) {
- string str;
- if (ctx.Options.EllipsizeStrings) {
- str = stringVal.String;
- if (str.Length > ctx.Options.EllipsizedLength)
- str = str.Substring (0, ctx.Options.EllipsizedLength) + EvaluationOptions.Ellipsis;
- } else {
- str = stringVal.String;
- }
- return str;
-
- }
-
- CorArrayValue arr = obj as CorArrayValue;
- if (arr != null)
- return base.TargetObjectToObject(ctx, objr);
-
- CorObjectValue co = obj as CorObjectValue;
- if (co != null)
- return base.TargetObjectToObject(ctx, objr);
-
- CorGenericValue genVal = obj as CorGenericValue;
- if (genVal != null)
- return genVal.GetValue ();
-
- return base.TargetObjectToObject (ctx, objr);
- }
-
- static bool InGeneratedClosureOrIteratorType (CorEvaluationContext ctx)
- {
- MethodInfo mi = ctx.Frame.Function.GetMethodInfo (ctx.Session);
- if (mi == null || mi.IsStatic)
- return false;
-
- Type tm = mi.DeclaringType;
- return IsGeneratedType (tm);
- }
-
- internal static bool IsGeneratedType (string name)
- {
- //
- // This should cover all C# generated special containers
- // - anonymous methods
- // - lambdas
- // - iterators
- // - async methods
- //
- // which allow stepping into
- //
-
- return name[0] == '<' &&
- // mcs is of the form <${NAME}>.c__{KIND}${NUMBER}
- (name.IndexOf (">c__", StringComparison.Ordinal) > 0 ||
- // csc is of form <${NAME}>d__${NUMBER}
- name.IndexOf (">d__", StringComparison.Ordinal) > 0);
- }
-
- internal static bool IsGeneratedType (Type tm)
- {
- return IsGeneratedType (tm.Name);
- }
-
- ValueReference GetHoistedThisReference (CorEvaluationContext cx)
- {
- try {
- CorValRef vref = new CorValRef (delegate {
- return cx.Frame.GetArgument (0);
- });
- var type = (CorType) GetValueType (cx, vref);
- return GetHoistedThisReference (cx, type, vref);
- } catch (Exception) {
- }
- return null;
- }
-
- ValueReference GetHoistedThisReference (CorEvaluationContext cx, CorType type, object val)
- {
- Type t = type.GetTypeInfo (cx.Session);
- var vref = (CorValRef)val;
- foreach (FieldInfo field in t.GetFields ()) {
- if (IsHoistedThisReference (field))
- return new FieldReference (cx, vref, type, field, "this", ObjectValueFlags.Literal);
-
- if (IsClosureReferenceField (field)) {
- var fieldRef = new FieldReference (cx, vref, type, field);
- var fieldType = (CorType)GetValueType (cx, fieldRef.Value);
- var thisRef = GetHoistedThisReference (cx, fieldType, fieldRef.Value);
- if (thisRef != null)
- return thisRef;
- }
- }
-
- return null;
- }
-
- static bool IsHoistedThisReference (FieldInfo field)
- {
- // mcs is "<>f__this" or "$this" (if in an async compiler generated type)
- // csc is "<>4__this"
- return field.Name == "$this" ||
- (field.Name.StartsWith ("<>", StringComparison.Ordinal) &&
- field.Name.EndsWith ("__this", StringComparison.Ordinal));
- }
-
- static bool IsClosureReferenceField (FieldInfo field)
- {
- // mcs is "<>f__ref"
- // csc is "CS$<>"
- // roslyn is "<>8__"
- return field.Name.StartsWith ("CS$<>", StringComparison.Ordinal) ||
- field.Name.StartsWith ("<>f__ref", StringComparison.Ordinal) ||
- field.Name.StartsWith ("<>8__", StringComparison.Ordinal);
- }
-
- static bool IsClosureReferenceLocal (ISymbolVariable local)
- {
- if (local.Name == null)
- return false;
-
- // mcs is "$locvar" or starts with '<'
- // csc is "CS$<>"
- return local.Name.Length == 0 || local.Name[0] == '<' || local.Name.StartsWith ("$locvar", StringComparison.Ordinal) ||
- local.Name.StartsWith ("CS$<>", StringComparison.Ordinal);
- }
-
- static bool IsGeneratedTemporaryLocal (ISymbolVariable local)
- {
- // csc uses CS$ prefix for temporary variables and <>t__ prefix for async task-related state variables
- return local.Name != null && (local.Name.StartsWith ("CS$", StringComparison.Ordinal) || local.Name.StartsWith ("<>t__", StringComparison.Ordinal));
- }
-
- protected override ValueReference OnGetThisReference (EvaluationContext ctx)
- {
- CorEvaluationContext cctx = (CorEvaluationContext) ctx;
- if (cctx.Frame.FrameType != CorFrameType.ILFrame || cctx.Frame.Function == null)
- return null;
-
- if (InGeneratedClosureOrIteratorType (cctx))
- return GetHoistedThisReference (cctx);
-
- return GetThisReference (cctx);
-
- }
-
- ValueReference GetThisReference (CorEvaluationContext ctx)
- {
- MethodInfo mi = ctx.Frame.Function.GetMethodInfo (ctx.Session);
- if (mi == null || mi.IsStatic)
- return null;
-
- try {
- CorValRef vref = new CorValRef (delegate {
- var result = ctx.Frame.GetArgument (0);
- if (result.Type == CorElementType.ELEMENT_TYPE_BYREF)
- return result.CastToReferenceValue ().Dereference ();
- return result;
- });
-
- return new VariableReference (ctx, vref, "this", ObjectValueFlags.Variable | ObjectValueFlags.ReadOnly);
- } catch (Exception e) {
- ctx.WriteDebuggerError (e);
- return null;
- }
- }
-
- protected override IEnumerable<ValueReference> OnGetParameters (EvaluationContext gctx)
- {
- CorEvaluationContext ctx = (CorEvaluationContext) gctx;
- if (ctx.Frame.FrameType == CorFrameType.ILFrame && ctx.Frame.Function != null) {
- MethodInfo met = ctx.Frame.Function.GetMethodInfo (ctx.Session);
- if (met != null) {
- foreach (ParameterInfo pi in met.GetParameters ()) {
- int pos = pi.Position;
- if (met.IsStatic)
- pos--;
- CorValRef vref = null;
- try {
- vref = new CorValRef (delegate {
- return ctx.Frame.GetArgument (pos);
- });
- }
- catch (Exception /*ex*/) {
- }
- if (vref != null)
- yield return new VariableReference (ctx, vref, pi.Name, ObjectValueFlags.Parameter);
- }
- yield break;
- }
- }
-
- int count = ctx.Frame.GetArgumentCount ();
- for (int n = 0; n < count; n++) {
- int locn = n;
- var vref = new CorValRef (delegate {
- return ctx.Frame.GetArgument (locn);
- });
- yield return new VariableReference (ctx, vref, "arg_" + (n + 1), ObjectValueFlags.Parameter);
- }
- }
-
- protected override IEnumerable<ValueReference> OnGetLocalVariables (EvaluationContext ctx)
- {
- CorEvaluationContext cctx = (CorEvaluationContext)ctx;
- if (InGeneratedClosureOrIteratorType (cctx)) {
- ValueReference vthis = GetThisReference (cctx);
- return GetHoistedLocalVariables (cctx, vthis).Union (GetLocalVariables (cctx));
- }
-
- return GetLocalVariables (cctx);
- }
-
- IEnumerable<ValueReference> GetHoistedLocalVariables (CorEvaluationContext cx, ValueReference vthis)
- {
- if (vthis == null)
- return new ValueReference [0];
-
- object val = vthis.Value;
- if (IsNull (cx, val))
- return new ValueReference [0];
-
- CorType tm = (CorType) vthis.Type;
- Type t = tm.GetTypeInfo (cx.Session);
- bool isIterator = IsGeneratedType (t);
-
- var list = new List<ValueReference> ();
- foreach (FieldInfo field in t.GetFields (BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance)) {
- if (IsHoistedThisReference (field))
- continue;
- if (IsClosureReferenceField (field)) {
- list.AddRange (GetHoistedLocalVariables (cx, new FieldReference (cx, (CorValRef)val, tm, field)));
- continue;
- }
- if (field.Name[0] == '<') {
- if (isIterator) {
- var name = GetHoistedIteratorLocalName (field);
- if (!string.IsNullOrEmpty (name)) {
- list.Add (new FieldReference (cx, (CorValRef)val, tm, field, name, ObjectValueFlags.Variable));
- }
- }
- } else if (!field.Name.Contains ("$")) {
- list.Add (new FieldReference (cx, (CorValRef)val, tm, field, field.Name, ObjectValueFlags.Variable));
- }
- }
- return list;
- }
-
- static string GetHoistedIteratorLocalName (FieldInfo field)
- {
- //mcs captured args, of form <$>name
- if (field.Name.StartsWith ("<$>", StringComparison.Ordinal)) {
- return field.Name.Substring (3);
- }
-
- // csc, mcs locals of form <name>__0
- if (field.Name[0] == '<') {
- int i = field.Name.IndexOf ('>');
- if (i > 1) {
- return field.Name.Substring (1, i - 1);
- }
- }
- return null;
- }
-
- IEnumerable<ValueReference> GetLocalVariables (CorEvaluationContext cx)
- {
- uint offset;
- CorDebugMappingResult mr;
- try {
- cx.Frame.GetIP (out offset, out mr);
- return GetLocals (cx, null, (int) offset, false);
- } catch (Exception e) {
- cx.WriteDebuggerError (e);
- return null;
- }
- }
-
- public override ValueReference GetCurrentException (EvaluationContext ctx)
- {
- CorEvaluationContext wctx = (CorEvaluationContext) ctx;
- CorValue exception = wctx.Thread.CurrentException;
-
- try {
- if (exception != null)
- {
- CorHandleValue exceptionHandle = wctx.Session.GetHandle (exception);
-
- CorValRef vref = new CorValRef (delegate {
- return exceptionHandle;
- });
-
- return new VariableReference (ctx, vref, ctx.Options.CurrentExceptionTag, ObjectValueFlags.Variable);
- }
- return base.GetCurrentException(ctx);
- } catch (Exception e) {
- ctx.WriteDebuggerError (e);
- return null;
- }
- }
-
- IEnumerable<ValueReference> GetLocals (CorEvaluationContext ctx, ISymbolScope scope, int offset, bool showHidden)
- {
- if (ctx.Frame.FrameType != CorFrameType.ILFrame)
- yield break;
-
- if (scope == null) {
- ISymbolMethod met = ctx.Frame.Function.GetSymbolMethod (ctx.Session);
- if (met != null)
- scope = met.RootScope;
- else {
- int count = ctx.Frame.GetLocalVariablesCount ();
- for (int n = 0; n < count; n++) {
- int locn = n;
- CorValRef vref = new CorValRef (delegate {
- return ctx.Frame.GetLocalVariable (locn);
- });
- yield return new VariableReference (ctx, vref, "local_" + (n + 1), ObjectValueFlags.Variable);
- }
- yield break;
- }
- }
-
- foreach (ISymbolVariable var in scope.GetLocals ()) {
- if (var.Name == "$site")
- continue;
- if (IsClosureReferenceLocal (var)) {
- int addr = var.AddressField1;
- var vref = new CorValRef (delegate {
- return ctx.Frame.GetLocalVariable (addr);
- });
-
- foreach (var gv in GetHoistedLocalVariables (ctx, new VariableReference (ctx, vref, var.Name, ObjectValueFlags.Variable))) {
- yield return gv;
- }
- } else if (!IsGeneratedTemporaryLocal (var) || showHidden) {
- int addr = var.AddressField1;
- var vref = new CorValRef (delegate {
- return ctx.Frame.GetLocalVariable (addr);
- });
- yield return new VariableReference (ctx, vref, var.Name, ObjectValueFlags.Variable);
- }
- }
-
- foreach (ISymbolScope cs in scope.GetChildren ()) {
- if (cs.StartOffset <= offset && cs.EndOffset >= offset) {
- foreach (ValueReference var in GetLocals (ctx, cs, offset, showHidden))
- yield return var;
- }
- }
- }
-
- protected override TypeDisplayData OnGetTypeDisplayData (EvaluationContext ctx, object gtype)
- {
- var type = (CorType) gtype;
-
- var wctx = (CorEvaluationContext) ctx;
- Type t = type.GetTypeInfo (wctx.Session);
- if (t == null)
- return null;
-
- string proxyType = null;
- string nameDisplayString = null;
- string typeDisplayString = null;
- string valueDisplayString = null;
- Dictionary<string, DebuggerBrowsableState> memberData = null;
- bool hasTypeData = false;
- bool isCompilerGenerated = false;
-
- try {
- foreach (object att in t.GetCustomAttributes (false)) {
- DebuggerTypeProxyAttribute patt = att as DebuggerTypeProxyAttribute;
- if (patt != null) {
- proxyType = patt.ProxyTypeName;
- hasTypeData = true;
- continue;
- }
- DebuggerDisplayAttribute datt = att as DebuggerDisplayAttribute;
- if (datt != null) {
- hasTypeData = true;
- nameDisplayString = datt.Name;
- typeDisplayString = datt.Type;
- valueDisplayString = datt.Value;
- continue;
- }
- CompilerGeneratedAttribute cgatt = att as CompilerGeneratedAttribute;
- if (cgatt != null) {
- isCompilerGenerated = true;
- continue;
- }
- }
-
- ArrayList mems = new ArrayList ();
- mems.AddRange (t.GetFields (BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Static | BindingFlags.Instance));
- mems.AddRange (t.GetProperties (BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Static | BindingFlags.Instance));
-
- foreach (MemberInfo m in mems) {
- object[] atts = m.GetCustomAttributes (typeof (DebuggerBrowsableAttribute), false);
- if (atts.Length == 0) {
- atts = m.GetCustomAttributes (typeof (CompilerGeneratedAttribute), false);
- if (atts.Length > 0)
- atts[0] = new DebuggerBrowsableAttribute (DebuggerBrowsableState.Never);
- }
- if (atts.Length > 0) {
- hasTypeData = true;
- if (memberData == null)
- memberData = new Dictionary<string, DebuggerBrowsableState> ();
- memberData[m.Name] = ((DebuggerBrowsableAttribute)atts[0]).State;
- }
- }
- } catch (Exception ex) {
- DebuggerLoggingService.LogError ("Exception in OnGetTypeDisplayData()", ex);
- }
- if (hasTypeData)
- return new TypeDisplayData (proxyType, valueDisplayString, typeDisplayString, nameDisplayString, isCompilerGenerated, memberData);
- else
- return null;
- }
-
- public override IEnumerable<object> GetNestedTypes (EvaluationContext ctx, object type)
- {
- var cType = (CorType)type;
- var wctx = (CorEvaluationContext)ctx;
- var mod = cType.Class.Module;
- int token = cType.Class.Token;
- var module = wctx.Session.GetMetadataForModule (mod);
- foreach (var t in module.DefinedTypes) {
- if (((MetadataType)t).DeclaringType != null && ((MetadataType)t).DeclaringType.MetadataToken == token) {
- var cls = mod.GetClassFromToken (((MetadataType)t).MetadataToken);
- var returnType = cls.GetParameterizedType (CorElementType.ELEMENT_TYPE_CLASS, new CorType[0]);
- if (!IsGeneratedType (returnType.GetTypeInfo (wctx.Session))) {
- yield return returnType;
- }
- }
- }
- }
-
- public override IEnumerable<object> GetImplementedInterfaces (EvaluationContext ctx, object type)
- {
- var cType = (CorType)type;
- var typeInfo = cType.GetTypeInfo (((CorEvaluationContext)ctx).Session);
- foreach (var iface in typeInfo.GetInterfaces ()) {
- if (!string.IsNullOrEmpty (iface.FullName))
- yield return GetType (ctx, iface.FullName);
- }
- }
-
- // TODO: implement for session
- public override bool IsExternalType (EvaluationContext ctx, object type)
- {
- return base.IsExternalType (ctx, type);
- }
-
- public override bool IsTypeLoaded (EvaluationContext ctx, string typeName)
- {
- return ctx.Adapter.GetType (ctx, typeName) != null;
- }
-
- public override bool IsTypeLoaded (EvaluationContext ctx, object type)
- {
- return IsTypeLoaded (ctx, GetTypeName (ctx, type));
- }
- // TODO: Implement GetHoistedLocalVariables
- }
-}
diff --git a/main/src/addins/MonoDevelop.Debugger.Win32/Mono.Debugging.Win32/CorValRef.cs b/main/src/addins/MonoDevelop.Debugger.Win32/Mono.Debugging.Win32/CorValRef.cs deleted file mode 100644 index de42dd0f2f..0000000000 --- a/main/src/addins/MonoDevelop.Debugger.Win32/Mono.Debugging.Win32/CorValRef.cs +++ /dev/null @@ -1,106 +0,0 @@ -using System.Runtime.InteropServices;
-using Microsoft.Samples.Debugging.CorDebug;
-using Mono.Debugging.Client;
-
-namespace Mono.Debugging.Win32
-{
- public class CorValRef : CorValRef<CorValue>
- {
- public CorValRef (CorValue val) : base (val)
- {
- }
-
- public CorValRef (CorValue val, ValueLoader loader) : base (val, loader)
- {
- }
-
- public CorValRef (ValueLoader loader) : base (loader)
- {
- }
- }
-
- public class CorValRef<TValue> where TValue : CorValue
- {
- TValue val;
- readonly ValueLoader loader;
- bool needToReload = false;
-
- public delegate TValue ValueLoader ( );
-
- public CorValRef (TValue val)
- {
- this.val = val;
- }
-
- public CorValRef (TValue val, ValueLoader loader)
- {
- this.val = val;
- this.loader = loader;
- }
-
- public CorValRef (ValueLoader loader)
- {
- this.val = loader ();
- this.loader = loader;
- }
-
- bool IsAlive ()
- {
- if (val == null)
- return false;
- try {
- // ReSharper disable once UnusedVariable
-
- // https://msdn.microsoft.com/en-us/library/ms232466(v=vs.110).aspx
- // MSDN says that ICorDebugValue doesn't guarantee that it alives between process Continue and Stop (which occur while evaluating).
- // But in the most of cases the value remains valid.
- // Instead of reloading it every time when evalTimestamp changes we try to call GetExactType (because it pure for the value)
- // and if it fails we reload the value
- var valExactType = val.ExactType;
- }
- catch (COMException e) {
- if (e.ToHResult<HResult> () == HResult.CORDBG_E_OBJECT_NEUTERED) {
- DebuggerLoggingService.LogMessage (string.Format ("Value is out of date: {0}", e.Message));
- return false;
- }
- throw;
- }
- return true;
- }
-
- public bool IsValid {
- get
- {
- if (needToReload)
- return false;
- return IsAlive ();
- }
- }
-
- public void Invalidate ()
- {
- needToReload = true;
- }
-
- public void Reload ()
- {
- if (loader != null) {
- // Obsolete value, get a new one
- var v = loader ();
- if (v != null) {
- val = v;
- needToReload = false;
- }
- }
- }
-
- public TValue Val {
- get {
- if (!IsValid) {
- Reload ();
- }
- return val;
- }
- }
- }
-}
diff --git a/main/src/addins/MonoDevelop.Debugger.Win32/Mono.Debugging.Win32/FieldReference.cs b/main/src/addins/MonoDevelop.Debugger.Win32/Mono.Debugging.Win32/FieldReference.cs deleted file mode 100644 index 95dae7881f..0000000000 --- a/main/src/addins/MonoDevelop.Debugger.Win32/Mono.Debugging.Win32/FieldReference.cs +++ /dev/null @@ -1,161 +0,0 @@ -// FieldVariable.cs -// -// Author: -// Lluis Sanchez Gual <lluis@novell.com> -// -// Copyright (c) 2008 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. -// -// - -using System.Reflection; -using Microsoft.Samples.Debugging.CorDebug; -using Mono.Debugging.Client; -using Mono.Debugging.Evaluation; - -namespace Mono.Debugging.Win32 -{ - public class FieldReference: ValueReference - { - readonly CorType type; - readonly FieldInfo field; - readonly CorValRef thisobj; - readonly CorValRef.ValueLoader loader; - readonly ObjectValueFlags flags; - readonly string vname; - - public FieldReference (EvaluationContext ctx, CorValRef thisobj, CorType type, FieldInfo field, string vname, ObjectValueFlags vflags) : base (ctx) - { - this.thisobj = thisobj; - this.type = type; - this.field = field; - this.vname = vname; - if (field.IsStatic) - this.thisobj = null; - - flags = vflags | GetFlags (field); - - loader = delegate { - return ((CorValRef)Value).Val; - }; - } - - public FieldReference (EvaluationContext ctx, CorValRef thisobj, CorType type, FieldInfo field) - : this (ctx, thisobj, type, field, null, ObjectValueFlags.Field) - { - } - - public override object Type { - get { - return ((CorValRef)Value).Val.ExactType; - } - } - - public override object DeclaringType { - get { - return type; - } - } - - public override object ObjectValue { - get { - if (field.IsLiteral && field.IsStatic) - return field.GetValue (null); - return base.ObjectValue; - } - } - - public override object Value { - get { - var ctx = (CorEvaluationContext) Context; - CorValue val; - if (thisobj != null && !field.IsStatic) { - CorObjectValue cval; - val = CorObjectAdaptor.GetRealObject (ctx, thisobj); - if (val is CorObjectValue) { - cval = (CorObjectValue)val; - val = cval.GetFieldValue (type.Class, field.MetadataToken); - return new CorValRef (val, loader); - } - if (val is CorReferenceValue) { - CorReferenceValue rval = (CorReferenceValue)val; - return new CorValRef (rval, loader); - } - } - - if (field.IsLiteral && field.IsStatic) { - object oval = field.GetValue (null); - CorObjectAdaptor ad = ctx.Adapter; - // When getting enum members, convert the integer value to an enum value - if (ad.IsEnum (ctx, type)) - return ad.CreateEnum (ctx, type, Context.Adapter.CreateValue (ctx, oval)); - - return Context.Adapter.CreateValue (ctx, oval); - } - val = type.GetStaticFieldValue (field.MetadataToken, ctx.Frame); - return new CorValRef (val, loader); - } - set { - ((CorValRef)Value).SetValue (Context, (CorValRef) value); - if (thisobj != null) { - CorObjectValue cob = CorObjectAdaptor.GetRealObject (Context, thisobj) as CorObjectValue; - if (cob != null && cob.IsValueClass) - thisobj.Invalidate (); // Required to make sure that thisobj returns an up-to-date value object - } - } - } - - public override string Name { - get { - return vname ?? field.Name; - } - } - - public override ObjectValueFlags Flags { - get { - return flags; - } - } - - internal static ObjectValueFlags GetFlags (FieldInfo field) - { - ObjectValueFlags flags = ObjectValueFlags.Field; - - if (field.IsStatic) - flags |= ObjectValueFlags.Global; - - if (field.IsFamilyOrAssembly) - flags |= ObjectValueFlags.InternalProtected; - else if (field.IsFamilyAndAssembly) - flags |= ObjectValueFlags.Internal; - else if (field.IsFamily) - flags |= ObjectValueFlags.Protected; - else if (field.IsPublic) - flags |= ObjectValueFlags.Public; - else - flags |= ObjectValueFlags.Private; - - if (field.IsLiteral) - flags |= ObjectValueFlags.ReadOnly; - - return flags; - } - } -} diff --git a/main/src/addins/MonoDevelop.Debugger.Win32/Mono.Debugging.Win32/Mono.Debugging.Win32.nuspec b/main/src/addins/MonoDevelop.Debugger.Win32/Mono.Debugging.Win32/Mono.Debugging.Win32.nuspec deleted file mode 100644 index 53cf655d2d..0000000000 --- a/main/src/addins/MonoDevelop.Debugger.Win32/Mono.Debugging.Win32/Mono.Debugging.Win32.nuspec +++ /dev/null @@ -1,24 +0,0 @@ -<?xml version="1.0"?>
-<package xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <metadata xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
- <id>Mono.Debugging.Win32</id>
- <version>$buildver$</version>
- <title>Mono.Debugging.Win32</title>
- <authors>MonoDevelop team</authors>
- <owners>MonoDevelop team</owners>
- <licenseUrl>http://opensource.org/licenses/mit-license.php</licenseUrl>
- <requireLicenseAcceptance>false</requireLicenseAcceptance>
- <projectUrl>https://github.com/mono/monodevelop</projectUrl>
- <summary>Debugger implementation for CorDebug</summary>
- <description>Debugger implementation for CorDebug</description>
- <language>en-US</language>
- <tags>mono debug debugger cordebug</tags>
- <dependencies>
- <dependency id="Mono.Debugging" version="$buildver$" />
- </dependencies>
- </metadata>
- <files>
- <file src="bin\$Configuration$\CorApi.dll" target="lib/net45" />
- <file src="bin\$Configuration$\CorApi2.dll" target="lib/net45" />
- </files>
-</package>
diff --git a/main/src/addins/MonoDevelop.Debugger.Win32/Mono.Debugging.Win32/MtaBacktrace.cs b/main/src/addins/MonoDevelop.Debugger.Win32/Mono.Debugging.Win32/MtaBacktrace.cs deleted file mode 100644 index df9b986bbd..0000000000 --- a/main/src/addins/MonoDevelop.Debugger.Win32/Mono.Debugging.Win32/MtaBacktrace.cs +++ /dev/null @@ -1,72 +0,0 @@ -using Mono.Debugging.Backend;
-using Mono.Debugging.Client;
-
-namespace Mono.Debugging.Win32
-{
- class MtaBacktrace: IBacktrace
- {
- readonly IBacktrace backtrace;
-
- public MtaBacktrace (IBacktrace bt)
- {
- backtrace = bt;
- }
-
- public AssemblyLine[] Disassemble (int frameIndex, int firstLine, int count)
- {
- return MtaThread.Run (() => backtrace.Disassemble (frameIndex, firstLine, count));
- }
-
- public int FrameCount
- {
- get {
- return MtaThread.Run (() => backtrace.FrameCount);
- }
- }
-
- public ObjectValue[] GetAllLocals (int frameIndex, EvaluationOptions options)
- {
- return MtaThread.Run (() => backtrace.GetAllLocals (frameIndex, options));
- }
-
- public ExceptionInfo GetException (int frameIndex, EvaluationOptions options)
- {
- return MtaThread.Run (() => backtrace.GetException (frameIndex, options));
- }
-
- public CompletionData GetExpressionCompletionData (int frameIndex, string exp)
- {
- return MtaThread.Run (() => backtrace.GetExpressionCompletionData (frameIndex, exp));
- }
-
- public ObjectValue[] GetExpressionValues (int frameIndex, string[] expressions, EvaluationOptions options)
- {
- return MtaThread.Run (() => backtrace.GetExpressionValues (frameIndex, expressions, options));
- }
-
- public ObjectValue[] GetLocalVariables (int frameIndex, EvaluationOptions options)
- {
- return MtaThread.Run (() => backtrace.GetLocalVariables (frameIndex, options));
- }
-
- public ObjectValue[] GetParameters (int frameIndex, EvaluationOptions options)
- {
- return MtaThread.Run (() => backtrace.GetParameters (frameIndex, options));
- }
-
- public StackFrame[] GetStackFrames (int firstIndex, int lastIndex)
- {
- return MtaThread.Run (() => backtrace.GetStackFrames (firstIndex, lastIndex));
- }
-
- public ObjectValue GetThisReference (int frameIndex, EvaluationOptions options)
- {
- return MtaThread.Run (() => backtrace.GetThisReference (frameIndex, options));
- }
-
- public ValidationResult ValidateExpression (int frameIndex, string expression, EvaluationOptions options)
- {
- return MtaThread.Run (() => backtrace.ValidateExpression (frameIndex, expression, options));
- }
- }
-}
diff --git a/main/src/addins/MonoDevelop.Debugger.Win32/Mono.Debugging.Win32/MtaObjectValueSource.cs b/main/src/addins/MonoDevelop.Debugger.Win32/Mono.Debugging.Win32/MtaObjectValueSource.cs deleted file mode 100644 index bc846512f0..0000000000 --- a/main/src/addins/MonoDevelop.Debugger.Win32/Mono.Debugging.Win32/MtaObjectValueSource.cs +++ /dev/null @@ -1,40 +0,0 @@ -using Mono.Debugging.Backend;
-using Mono.Debugging.Client;
-
-namespace Mono.Debugging.Win32
-{
- class MtaObjectValueSource: IObjectValueSource
- {
- readonly IObjectValueSource source;
-
- public MtaObjectValueSource (IObjectValueSource s)
- {
- source = s;
- }
-
- public ObjectValue[] GetChildren (ObjectPath path, int index, int count, EvaluationOptions options)
- {
- return MtaThread.Run (() => source.GetChildren (path, index, count, options));
- }
-
- public object GetRawValue (ObjectPath path, EvaluationOptions options)
- {
- return MtaThread.Run (() => source.GetRawValue (path, options));
- }
-
- public ObjectValue GetValue (ObjectPath path, EvaluationOptions options)
- {
- return MtaThread.Run (() => source.GetValue (path, options));
- }
-
- public void SetRawValue (ObjectPath path, object value, EvaluationOptions options)
- {
- MtaThread.Run (() => source.SetRawValue (path, value, options));
- }
-
- public EvaluationResult SetValue (ObjectPath path, string value, EvaluationOptions options)
- {
- return MtaThread.Run (() => source.SetValue (path, value, options));
- }
- }
-}
diff --git a/main/src/addins/MonoDevelop.Debugger.Win32/Mono.Debugging.Win32/MtaObjectValueUpdater.cs b/main/src/addins/MonoDevelop.Debugger.Win32/Mono.Debugging.Win32/MtaObjectValueUpdater.cs deleted file mode 100644 index 4beeab4901..0000000000 --- a/main/src/addins/MonoDevelop.Debugger.Win32/Mono.Debugging.Win32/MtaObjectValueUpdater.cs +++ /dev/null @@ -1,19 +0,0 @@ -using Mono.Debugging.Backend;
-
-namespace Mono.Debugging.Win32
-{
- class MtaObjectValueUpdater : IObjectValueUpdater
- {
- readonly IObjectValueUpdater source;
-
- public MtaObjectValueUpdater (IObjectValueUpdater s)
- {
- source = s;
- }
-
- public void RegisterUpdateCallbacks (UpdateCallback[] callbacks)
- {
- MtaThread.Run (() => source.RegisterUpdateCallbacks (callbacks));
- }
- }
-}
diff --git a/main/src/addins/MonoDevelop.Debugger.Win32/Mono.Debugging.Win32/MtaRawValue.cs b/main/src/addins/MonoDevelop.Debugger.Win32/Mono.Debugging.Win32/MtaRawValue.cs deleted file mode 100644 index 8481436f3b..0000000000 --- a/main/src/addins/MonoDevelop.Debugger.Win32/Mono.Debugging.Win32/MtaRawValue.cs +++ /dev/null @@ -1,38 +0,0 @@ -using Mono.Debugging.Backend;
-using Mono.Debugging.Client;
-
-namespace Mono.Debugging.Win32
-{
- class MtaRawValue : IRawValue
- {
- readonly IRawValue source;
-
- public MtaRawValue (IRawValue s)
- {
- source = s;
- }
-
- public object CallMethod (string name, object[] parameters, EvaluationOptions options)
- {
- return MtaThread.Run (() => source.CallMethod (name, parameters, options));
- }
-
- public object CallMethod (string name, object[] parameters, out object[] outArgs, EvaluationOptions options)
- {
- object[] tempOutArgs = null;
- var result = MtaThread.Run (() => source.CallMethod (name, parameters, out tempOutArgs, options));
- outArgs = tempOutArgs;
- return result;
- }
-
- public object GetMemberValue (string name, EvaluationOptions options)
- {
- return MtaThread.Run (() => source.GetMemberValue (name, options));
- }
-
- public void SetMemberValue (string name, object value, EvaluationOptions options)
- {
- MtaThread.Run (() => source.SetMemberValue (name, value, options));
- }
- }
-}
diff --git a/main/src/addins/MonoDevelop.Debugger.Win32/Mono.Debugging.Win32/MtaRawValueArray.cs b/main/src/addins/MonoDevelop.Debugger.Win32/Mono.Debugging.Win32/MtaRawValueArray.cs deleted file mode 100644 index e0632f0564..0000000000 --- a/main/src/addins/MonoDevelop.Debugger.Win32/Mono.Debugging.Win32/MtaRawValueArray.cs +++ /dev/null @@ -1,40 +0,0 @@ -using System;
-using Mono.Debugging.Backend;
-
-namespace Mono.Debugging.Win32
-{
- class MtaRawValueArray : IRawValueArray
- {
- readonly IRawValueArray source;
-
- public MtaRawValueArray (IRawValueArray s)
- {
- source = s;
- }
-
- public int[] Dimensions
- {
- get { return MtaThread.Run (() => source.Dimensions); }
- }
-
- public Array GetValues (int[] index, int count)
- {
- return MtaThread.Run (() => source.GetValues (index, count));
- }
-
- public object GetValue (int[] index)
- {
- return MtaThread.Run (() => source.GetValue (index));
- }
-
- public void SetValue (int[] index, object value)
- {
- MtaThread.Run (() => source.SetValue (index, value));
- }
-
- public Array ToArray ()
- {
- return MtaThread.Run (() => source.ToArray ());
- }
- }
-}
diff --git a/main/src/addins/MonoDevelop.Debugger.Win32/Mono.Debugging.Win32/MtaRawValueString.cs b/main/src/addins/MonoDevelop.Debugger.Win32/Mono.Debugging.Win32/MtaRawValueString.cs deleted file mode 100644 index af7cf36d47..0000000000 --- a/main/src/addins/MonoDevelop.Debugger.Win32/Mono.Debugging.Win32/MtaRawValueString.cs +++ /dev/null @@ -1,29 +0,0 @@ -using Mono.Debugging.Backend;
-
-namespace Mono.Debugging.Win32
-{
- class MtaRawValueString : IRawValueString
- {
- readonly IRawValueString source;
-
- public MtaRawValueString (IRawValueString s)
- {
- source = s;
- }
-
- public int Length
- {
- get { return MtaThread.Run (() => source.Length); }
- }
-
- public string Substring (int index, int length)
- {
- return MtaThread.Run (() => source.Substring (index, length));
- }
-
- public string Value
- {
- get { return MtaThread.Run (() => source.Value); }
- }
- }
-}
diff --git a/main/src/addins/MonoDevelop.Debugger.Win32/Mono.Debugging.Win32/MtaThread.cs b/main/src/addins/MonoDevelop.Debugger.Win32/Mono.Debugging.Win32/MtaThread.cs deleted file mode 100644 index 7a0850b1e1..0000000000 --- a/main/src/addins/MonoDevelop.Debugger.Win32/Mono.Debugging.Win32/MtaThread.cs +++ /dev/null @@ -1,81 +0,0 @@ -using System;
-using System.Threading;
-
-namespace Mono.Debugging.Win32
-{
- public static class MtaThread
- {
- static readonly AutoResetEvent wordDoneEvent = new AutoResetEvent (false);
- static Action workDelegate;
- static readonly object workLock = new object ();
- static Thread workThread;
- static Exception workError;
- static readonly object threadLock = new object ();
-
- public static R Run<R> (Func<R> ts, int timeout = 15000)
- {
- if (Thread.CurrentThread.GetApartmentState () == ApartmentState.MTA)
- return ts ();
-
- R res = default (R);
- Run (delegate {
- res = ts ();
- }, timeout);
- return res;
- }
-
- public static void Run (Action ts, int timeout = 15000)
- {
- if (Thread.CurrentThread.GetApartmentState () == ApartmentState.MTA) {
- ts ();
- return;
- }
- lock (workLock) {
- lock (threadLock) {
- workDelegate = ts;
- workError = null;
- if (workThread == null) {
- workThread = new Thread (MtaRunner);
- workThread.Name = "Win32 Debugger MTA Thread";
- workThread.SetApartmentState (ApartmentState.MTA);
- workThread.IsBackground = true;
- workThread.Start ();
- } else
- // Awaken the existing thread
- Monitor.Pulse (threadLock);
- }
- if (!wordDoneEvent.WaitOne (timeout)) {
- workThread.Abort ();
- throw new Exception ("Debugger operation timeout on MTA thread.");
- }
- }
- if (workError != null)
- throw new Exception ("Debugger operation failed", workError);
- }
-
- static void MtaRunner ()
- {
- try {
- lock (threadLock) {
- do {
- try {
- workDelegate ();
- } catch (ThreadAbortException) {
- return;
- } catch (Exception ex) {
- workError = ex;
- } finally {
- workDelegate = null;
- }
- wordDoneEvent.Set ();
- } while (Monitor.Wait (threadLock, 60000));
-
- }
- } catch {
- //Just in case if we abort just in moment when it leaves workDelegate ();
- } finally {
- workThread = null;
- }
- }
- }
-}
diff --git a/main/src/addins/MonoDevelop.Debugger.Win32/Mono.Debugging.Win32/Properties/AssemblyInfo.cs b/main/src/addins/MonoDevelop.Debugger.Win32/Mono.Debugging.Win32/Properties/AssemblyInfo.cs deleted file mode 100644 index 673d519d74..0000000000 --- a/main/src/addins/MonoDevelop.Debugger.Win32/Mono.Debugging.Win32/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System.Reflection;
-using System.Runtime.CompilerServices;
-using System.Runtime.InteropServices;
-
-// General Information about an assembly is controlled through the following
-// set of attributes. Change these attribute values to modify the information
-// associated with an assembly.
-[assembly: AssemblyTitle("Mono.Debugging.Win32")]
-[assembly: AssemblyDescription("")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("")]
-[assembly: AssemblyProduct("Mono.Debugging.Win32")]
-[assembly: AssemblyCopyright("Copyright © 2015")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
-// Setting ComVisible to false makes the types in this assembly not visible
-// to COM components. If you need to access a type in this assembly from
-// COM, set the ComVisible attribute to true on that type.
-[assembly: ComVisible(false)]
-
-// The following GUID is for the ID of the typelib if this project is exposed to COM
-[assembly: Guid("74704c00-5861-4f86-920c-865148a175c5")]
-
-// Version information for an assembly consists of the following four values:
-//
-// Major Version
-// Minor Version
-// Build Number
-// Revision
-//
-// You can specify all the values or you can default the Build and Revision Numbers
-// by using the '*' as shown below:
-// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("1.0.0.0")]
-[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/main/src/addins/MonoDevelop.Debugger.Win32/Mono.Debugging.Win32/PropertyReference.cs b/main/src/addins/MonoDevelop.Debugger.Win32/Mono.Debugging.Win32/PropertyReference.cs deleted file mode 100644 index 191d74d414..0000000000 --- a/main/src/addins/MonoDevelop.Debugger.Win32/Mono.Debugging.Win32/PropertyReference.cs +++ /dev/null @@ -1,186 +0,0 @@ -// PropertyVariable.cs -// -// Author: -// Lluis Sanchez Gual <lluis@novell.com> -// -// Copyright (c) 2008 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. -// -// - -using System.Reflection; -using Mono.Debugging.Client; -using Mono.Debugging.Evaluation; -using Microsoft.Samples.Debugging.CorDebug; -using Microsoft.Samples.Debugging.CorDebug.NativeApi; - -namespace Mono.Debugging.Win32 -{ - class PropertyReference: ValueReference - { - readonly PropertyInfo prop; - readonly CorValRef thisobj; - readonly CorValRef[] index; - readonly CorModule module; - readonly CorType declaringType; - readonly CorValRef.ValueLoader loader; - readonly ObjectValueFlags flags; - CorValRef cachedValue; - - public PropertyReference (EvaluationContext ctx, PropertyInfo prop, CorValRef thisobj, CorType declaringType) - : this (ctx, prop, thisobj, declaringType, null) - { - } - - public PropertyReference (EvaluationContext ctx, PropertyInfo prop, CorValRef thisobj, CorType declaringType, CorValRef[] index) - : base (ctx) - { - this.prop = prop; - this.declaringType = declaringType; - if (declaringType.Type == CorElementType.ELEMENT_TYPE_ARRAY || - declaringType.Type == CorElementType.ELEMENT_TYPE_SZARRAY) { - this.module = ((CorType)((CorEvaluationContext)ctx).Adapter.GetType (ctx, "System.Object")).Class.Module; - } else { - this.module = declaringType.Class.Module; - } - this.index = index; - if (!prop.GetGetMethod (true).IsStatic) - this.thisobj = thisobj; - - flags = GetFlags (prop); - - loader = delegate { - return ((CorValRef)Value).Val; - }; - } - - public override object Type { - get { - if (!prop.CanRead) - return null; - return ((CorValRef)Value).Val.ExactType; - } - } - - public override object DeclaringType { - get { - return declaringType; - } - } - - public override object Value { - get { - if (cachedValue != null && cachedValue.IsValid) - return cachedValue; - if (!prop.CanRead) - return null; - CorEvaluationContext ctx = (CorEvaluationContext) Context; - CorValue[] args; - if (index != null) { - args = new CorValue[index.Length]; - ParameterInfo[] metArgs = prop.GetGetMethod (true).GetParameters (); - for (int n = 0; n < index.Length; n++) - args[n] = ctx.Adapter.GetBoxedArg (ctx, index[n], metArgs[n].ParameterType).Val; - } - else - args = new CorValue[0]; - - MethodInfo mi = prop.GetGetMethod (true); - CorFunction func = module.GetFunctionFromToken (mi.MetadataToken); - CorValue val = null; - if (declaringType.Type == CorElementType.ELEMENT_TYPE_ARRAY || - declaringType.Type == CorElementType.ELEMENT_TYPE_SZARRAY) { - val = ctx.RuntimeInvoke (func, new CorType[0], thisobj != null ? thisobj.Val : null, args); - } else { - val = ctx.RuntimeInvoke (func, declaringType.TypeParameters, thisobj != null ? thisobj.Val : null, args); - } - return cachedValue = new CorValRef (val, loader); - } - set { - CorEvaluationContext ctx = (CorEvaluationContext)Context; - CorFunction func = module.GetFunctionFromToken (prop.GetSetMethod (true).MetadataToken); - CorValRef val = (CorValRef) value; - CorValue[] args; - ParameterInfo[] metArgs = prop.GetSetMethod (true).GetParameters (); - - if (index == null) - args = new CorValue[1]; - else { - args = new CorValue [index.Length + 1]; - for (int n = 0; n < index.Length; n++) { - args[n] = ctx.Adapter.GetBoxedArg (ctx, index[n], metArgs[n].ParameterType).Val; - } - } - args[args.Length - 1] = ctx.Adapter.GetBoxedArg (ctx, val, metArgs[metArgs.Length - 1].ParameterType).Val; - ctx.RuntimeInvoke (func, declaringType.TypeParameters, thisobj != null ? thisobj.Val : null, args); - } - } - - public override string Name { - get { - if (index != null) { - System.Text.StringBuilder sb = new System.Text.StringBuilder ("["); - foreach (CorValRef vr in index) { - if (sb.Length > 1) - sb.Append (","); - sb.Append (Context.Evaluator.TargetObjectToExpression (Context, vr)); - } - sb.Append ("]"); - return sb.ToString (); - } - return prop.Name; - } - } - - internal static ObjectValueFlags GetFlags (PropertyInfo prop) - { - ObjectValueFlags flags = ObjectValueFlags.Property; - MethodInfo mi = prop.GetGetMethod (true) ?? prop.GetSetMethod (true); - - if (prop.GetSetMethod (true) == null) - flags |= ObjectValueFlags.ReadOnly; - - if (mi.IsStatic) - flags |= ObjectValueFlags.Global; - - if (mi.IsFamilyAndAssembly) - flags |= ObjectValueFlags.Internal; - else if (mi.IsFamilyOrAssembly) - flags |= ObjectValueFlags.InternalProtected; - else if (mi.IsFamily) - flags |= ObjectValueFlags.Protected; - else if (mi.IsPublic) - flags |= ObjectValueFlags.Public; - else - flags |= ObjectValueFlags.Private; - - if (!prop.CanWrite) - flags |= ObjectValueFlags.ReadOnly; - - return flags; - } - - public override ObjectValueFlags Flags { - get { - return flags; - } - } - } -} diff --git a/main/src/addins/MonoDevelop.Debugger.Win32/Mono.Debugging.Win32/StringAdaptor.cs b/main/src/addins/MonoDevelop.Debugger.Win32/Mono.Debugging.Win32/StringAdaptor.cs deleted file mode 100644 index dc8e620538..0000000000 --- a/main/src/addins/MonoDevelop.Debugger.Win32/Mono.Debugging.Win32/StringAdaptor.cs +++ /dev/null @@ -1,58 +0,0 @@ -// -// StringAdaptor.cs -// -// Author: Jeffrey Stedfast <jeff@xamarin.com> -// -// Copyright (c) 2012 Xamarin Inc. -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. -// - -using Microsoft.Samples.Debugging.CorDebug; -using Mono.Debugging.Evaluation; - -namespace Mono.Debugging.Win32 -{ - public class StringAdaptor: IStringAdaptor - { - readonly CorEvaluationContext ctx; - readonly CorStringValue str; - readonly CorValRef obj; - - public StringAdaptor (EvaluationContext ctx, CorValRef obj, CorStringValue str) - { - this.ctx = (CorEvaluationContext) ctx; - this.str = str; - this.obj = obj; - } - - public int Length { - get { return str.Length; } - } - - public string Value { - get { return str.String; } - } - - public string Substring (int index, int length) - { - return str.String.Substring (index, length); - } - } -} diff --git a/main/src/addins/MonoDevelop.Debugger.Win32/Mono.Debugging.Win32/VariableReference.cs b/main/src/addins/MonoDevelop.Debugger.Win32/Mono.Debugging.Win32/VariableReference.cs deleted file mode 100644 index 8578ccffa6..0000000000 --- a/main/src/addins/MonoDevelop.Debugger.Win32/Mono.Debugging.Win32/VariableReference.cs +++ /dev/null @@ -1,74 +0,0 @@ -// VariableReference.cs -// -// Author: -// Lluis Sanchez Gual <lluis@novell.com> -// -// Copyright (c) 2008 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. -// -// - -using DC = Mono.Debugging.Client; -using Mono.Debugging.Evaluation; - -namespace Mono.Debugging.Win32 -{ - public class VariableReference: ValueReference - { - readonly CorValRef var; - readonly DC.ObjectValueFlags flags; - readonly string name; - - public VariableReference (EvaluationContext ctx, CorValRef var, string name, DC.ObjectValueFlags flags) - : base (ctx) - { - this.flags = flags; - this.var = var; - this.name = name; - } - - public override object Value { - get { - return var; - } - set { - var.SetValue (Context, (CorValRef) value); - } - } - - public override string Name { - get { - return name; - } - } - - public override object Type { - get { - return var.Val.ExactType; - } - } - - public override DC.ObjectValueFlags Flags { - get { - return flags; - } - } - } -} diff --git a/main/src/addins/MonoDevelop.Debugger.Win32/Mono.Debugging.Win32/Win32.cs b/main/src/addins/MonoDevelop.Debugger.Win32/Mono.Debugging.Win32/Win32.cs deleted file mode 100644 index 8a0dea9b75..0000000000 --- a/main/src/addins/MonoDevelop.Debugger.Win32/Mono.Debugging.Win32/Win32.cs +++ /dev/null @@ -1,56 +0,0 @@ -using System; -using System.Runtime.InteropServices; - -namespace Mono.Debugging.Win32 -{ - [StructLayout (LayoutKind.Sequential, CharSet = CharSet.Unicode)] - struct STARTUPINFO - { - public int cb; - public string lpReserved; - public string lpDesktop; - public string lpTitle; - public int dwX; - public int dwY; - public int dwXSize; - public int dwYSize; - public int dwXCountChars; - public int dwYCountChars; - public int dwFillAttribute; - public int dwFlags; - public short wShowWindow; - public short cbReserved2; - public IntPtr lpReserved2; - public IntPtr hStdInput; - public IntPtr hStdOutput; - public IntPtr hStdError; - } - - [StructLayout (LayoutKind.Sequential)] - internal struct PROCESS_INFORMATION - { - public IntPtr hProcess; - public IntPtr hThread; - public int dwProcessId; - public int dwThreadId; - } - - [Flags] - enum CreationFlags - { - CREATE_BREAKAWAY_FROM_JOB = 0x01000000, - CREATE_DEFAULT_ERROR_MODE = 0x04000000, - CREATE_NEW_CONSOLE = 0x00000010, - CREATE_NEW_PROCESS_GROUP = 0x00000200, - CREATE_NO_WINDOW = 0x08000000, - CREATE_PROTECTED_PROCESS = 0x00040000, - CREATE_PRESERVE_CODE_AUTHZ_LEVEL = 0x02000000, - CREATE_SEPARATE_WOW_VDM = 0x00001000, - CREATE_SUSPENDED = 0x00000004, - CREATE_UNICODE_ENVIRONMENT = 0x00000400, - DEBUG_ONLY_THIS_PROCESS = 0x00000002, - DEBUG_PROCESS = 0x00000001, - DETACHED_PROCESS = 0x00000008, - EXTENDED_STARTUPINFO_PRESENT = 0x00080000 - } -}
\ No newline at end of file diff --git a/main/src/addins/MonoDevelop.Debugger.Win32/MonoDevelop.Debugger.Win32/MonoDevelop.Debugger.Win32.csproj b/main/src/addins/MonoDevelop.Debugger.Win32/MonoDevelop.Debugger.Win32/MonoDevelop.Debugger.Win32.csproj deleted file mode 100644 index 72fe55fd1c..0000000000 --- a/main/src/addins/MonoDevelop.Debugger.Win32/MonoDevelop.Debugger.Win32/MonoDevelop.Debugger.Win32.csproj +++ /dev/null @@ -1,134 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> - <Import Project="..\..\..\..\MonoDevelop.props" /> - <PropertyGroup> - <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> - <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> - <ProductVersion>8.0.30703</ProductVersion> - <SchemaVersion>2.0</SchemaVersion> - <ProjectGuid>{7E4B15FB-E8C4-419A-A31C-9310FD9062BD}</ProjectGuid> - <OutputType>Library</OutputType> - <AppDesignerFolder>Properties</AppDesignerFolder> - <RootNamespace>MonoDevelop.Debugger.Win32</RootNamespace> - <AssemblyName>MonoDevelop.Debugger.Win32</AssemblyName> - <FileAlignment>512</FileAlignment> - <TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion> - <FileUpgradeFlags> - </FileUpgradeFlags> - <OldToolsVersion>3.5</OldToolsVersion> - <UpgradeBackupLocation /> - <TargetFrameworkProfile /> - <PublishUrl>publish\</PublishUrl> - <Install>true</Install> - <InstallFrom>Disk</InstallFrom> - <UpdateEnabled>false</UpdateEnabled> - <UpdateMode>Foreground</UpdateMode> - <UpdateInterval>7</UpdateInterval> - <UpdateIntervalUnits>Days</UpdateIntervalUnits> - <UpdatePeriodically>false</UpdatePeriodically> - <UpdateRequired>false</UpdateRequired> - <MapFileExtensions>true</MapFileExtensions> - <ApplicationRevision>0</ApplicationRevision> - <ApplicationVersion>1.0.0.%2a</ApplicationVersion> - <IsWebBootstrapper>false</IsWebBootstrapper> - <UseApplicationTrust>false</UseApplicationTrust> - <BootstrapperEnabled>true</BootstrapperEnabled> - </PropertyGroup> - <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> - <DebugSymbols>true</DebugSymbols> - <DebugType>full</DebugType> - <Optimize>false</Optimize> - <OutputPath>..\..\..\..\build\AddIns\MonoDevelop.Debugger.Win32</OutputPath> - <DefineConstants>DEBUG;TRACE;ASPNET</DefineConstants> - <ErrorReport>prompt</ErrorReport> - <WarningLevel>4</WarningLevel> - <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet> - </PropertyGroup> - <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> - <DebugType>pdbonly</DebugType> - <Optimize>true</Optimize> - <OutputPath>..\..\..\..\build\AddIns\MonoDevelop.Debugger.Win32</OutputPath> - <DefineConstants>TRACE;ASPNET</DefineConstants> - <ErrorReport>prompt</ErrorReport> - <WarningLevel>4</WarningLevel> - <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet> - <DebugSymbols>true</DebugSymbols> - </PropertyGroup> - <ItemGroup> - <Reference Include="System" /> - <Reference Include="System.Core" /> - <Reference Include="System.Xml.Linq" /> - <Reference Include="System.Data.DataSetExtensions" /> - <Reference Include="System.Data" /> - <Reference Include="System.Xml" /> - </ItemGroup> - <ItemGroup> - <Compile Include="Properties\AssemblyInfo.cs" /> - <Compile Include="CorDebuggerEngine.cs" /> - <Compile Include="AddinInfo.cs" /> - </ItemGroup> - <ItemGroup> - <EmbeddedResource Include="MonoDevelop.Debugger.Win32.addin.xml" /> - </ItemGroup> - <ItemGroup> - <ProjectReference Include="..\..\..\..\external\debugger-libs\Mono.Debugging\Mono.Debugging.csproj"> - <Project>{90C99ADB-7D4B-4EB4-98C2-40BD1B14C7D2}</Project> - <Name>Mono.Debugging</Name> - <Private>False</Private> - </ProjectReference> - <ProjectReference Include="..\..\MonoDevelop.Debugger\MonoDevelop.Debugger.csproj"> - <Project>{2357AABD-08C7-4808-A495-8FF2D3CDFDB0}</Project> - <Name>MonoDevelop.Debugger</Name> - <Private>False</Private> - </ProjectReference> - <ProjectReference Include="..\..\..\core\MonoDevelop.Core\MonoDevelop.Core.csproj"> - <Project>{7525BB88-6142-4A26-93B9-A30C6983390A}</Project> - <Name>MonoDevelop.Core</Name> - <Private>False</Private> - </ProjectReference> - <ProjectReference Include="..\..\..\core\MonoDevelop.Ide\MonoDevelop.Ide.csproj"> - <Project>{27096E7F-C91C-4AC6-B289-6897A701DF21}</Project> - <Name>MonoDevelop.Ide</Name> - <Private>False</Private> - </ProjectReference> - <ProjectReference Include="..\..\..\..\external\mono-addins\Mono.Addins\Mono.Addins.csproj"> - <Project>{91DD5A2D-9FE3-4C3C-9253-876141874DAD}</Project> - <Name>Mono.Addins</Name> - <Private>False</Private> - </ProjectReference> - <ProjectReference Include="..\..\AspNet\MonoDevelop.AspNet.csproj"> - <Project>{1CF94D07-5480-4D10-A3CD-2EBD5E87B02E}</Project> - <Name>MonoDevelop.AspNet</Name> - <Private>False</Private> - </ProjectReference> - <ProjectReference Include="..\Mono.Debugging.Win32\Mono.Debugging.Win32.csproj"> - <Project>{74704c00-5861-4f86-920c-865148a175c5}</Project> - <Name>Mono.Debugging.Win32</Name> - </ProjectReference> - </ItemGroup> - <ItemGroup> - <BootstrapperPackage Include="Microsoft.Net.Client.3.5"> - <Visible>False</Visible> - <ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName> - <Install>false</Install> - </BootstrapperPackage> - <BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1"> - <Visible>False</Visible> - <ProductName>.NET Framework 3.5 SP1</ProductName> - <Install>true</Install> - </BootstrapperPackage> - <BootstrapperPackage Include="Microsoft.Windows.Installer.3.1"> - <Visible>False</Visible> - <ProductName>Windows Installer 3.1</ProductName> - <Install>true</Install> - </BootstrapperPackage> - </ItemGroup> - <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> - <!-- To modify your build process, add your task inside one of the targets below and uncomment it. - Other similar extension points exist, see Microsoft.Common.targets. - <Target Name="BeforeBuild"> - </Target> - <Target Name="AfterBuild"> - </Target> - --> -</Project> diff --git a/main/src/addins/MonoDevelop.Debugger.Win32/README.txt b/main/src/addins/MonoDevelop.Debugger.Win32/README.txt deleted file mode 100644 index db84fb29a5..0000000000 --- a/main/src/addins/MonoDevelop.Debugger.Win32/README.txt +++ /dev/null @@ -1,6 +0,0 @@ -CorApi and CorApi2 are samples taken from http://www.microsoft.com/en-us/download/details.aspx?id=19621 with our own API changes added to it. - -Most sample changes are to be marked with [Xamarin] tags. -*For additions of properties or changes to existing properties, apply the tag to the property explaining the fix applied. - -Most changes in samples are implementations of NotImplementedException or use of Extension code. diff --git a/main/src/addins/MonoDevelop.Debugger.Win32/eula.rtf b/main/src/addins/MonoDevelop.Debugger.Win32/eula.rtf deleted file mode 100644 index 6116daff46..0000000000 --- a/main/src/addins/MonoDevelop.Debugger.Win32/eula.rtf +++ /dev/null @@ -1,428 +0,0 @@ -{\rtf1\ansi\ansicpg1252\uc1\deff37\stshfdbch11\stshfloch0\stshfhich0\stshfbi0\deflang1033\deflangfe2052{\fonttbl{\f0\froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman{\*\falt Times};}
-{\f2\fmodern\fcharset0\fprq1{\*\panose 02070309020205020404}Courier New{\*\falt Arial};}{\f3\froman\fcharset2\fprq2{\*\panose 05050102010706020507}Symbol{\*\falt Bookshelf Symbol 3};}
-{\f10\fnil\fcharset2\fprq2{\*\panose 05000000000000000000}Wingdings{\*\falt Symbol};}{\f11\froman\fcharset128\fprq1{\*\panose 02020609040205080304}MS Mincho{\*\falt HGGothicE};}
-{\f37\fswiss\fcharset0\fprq2{\*\panose 020b0604030504040204}Tahoma{\*\falt ?? ??};}{\f42\fswiss\fcharset0\fprq2{\*\panose 020b0603020202020204}Trebuchet MS{\*\falt Arial};}{\f43\fmodern\fcharset128\fprq1 @MS Mincho{\*\falt @MS Gothic};}
-{\f218\froman\fcharset238\fprq2 Times New Roman CE{\*\falt Times};}{\f219\froman\fcharset204\fprq2 Times New Roman Cyr{\*\falt Times};}{\f221\froman\fcharset161\fprq2 Times New Roman Greek{\*\falt Times};}
-{\f222\froman\fcharset162\fprq2 Times New Roman Tur{\*\falt Times};}{\f223\froman\fcharset177\fprq2 Times New Roman (Hebrew){\*\falt Times};}{\f224\froman\fcharset178\fprq2 Times New Roman (Arabic){\*\falt Times};}
-{\f225\froman\fcharset186\fprq2 Times New Roman Baltic{\*\falt Times};}{\f226\froman\fcharset163\fprq2 Times New Roman (Vietnamese){\*\falt Times};}{\f238\fmodern\fcharset238\fprq1 Courier New CE{\*\falt Arial};}
-{\f239\fmodern\fcharset204\fprq1 Courier New Cyr{\*\falt Arial};}{\f241\fmodern\fcharset161\fprq1 Courier New Greek{\*\falt Arial};}{\f242\fmodern\fcharset162\fprq1 Courier New Tur{\*\falt Arial};}
-{\f243\fmodern\fcharset177\fprq1 Courier New (Hebrew){\*\falt Arial};}{\f244\fmodern\fcharset178\fprq1 Courier New (Arabic){\*\falt Arial};}{\f245\fmodern\fcharset186\fprq1 Courier New Baltic{\*\falt Arial};}
-{\f246\fmodern\fcharset163\fprq1 Courier New (Vietnamese){\*\falt Arial};}{\f588\fswiss\fcharset238\fprq2 Tahoma CE{\*\falt ?? ??};}{\f589\fswiss\fcharset204\fprq2 Tahoma Cyr{\*\falt ?? ??};}{\f591\fswiss\fcharset161\fprq2 Tahoma Greek{\*\falt ?? ??};}
-{\f592\fswiss\fcharset162\fprq2 Tahoma Tur{\*\falt ?? ??};}{\f593\fswiss\fcharset177\fprq2 Tahoma (Hebrew){\*\falt ?? ??};}{\f594\fswiss\fcharset178\fprq2 Tahoma (Arabic){\*\falt ?? ??};}{\f595\fswiss\fcharset186\fprq2 Tahoma Baltic{\*\falt ?? ??};}
-{\f596\fswiss\fcharset163\fprq2 Tahoma (Vietnamese){\*\falt ?? ??};}{\f597\fswiss\fcharset222\fprq2 Tahoma (Thai){\*\falt ?? ??};}{\f638\fswiss\fcharset238\fprq2 Trebuchet MS CE{\*\falt Arial};}
-{\f639\fswiss\fcharset204\fprq2 Trebuchet MS Cyr{\*\falt Arial};}{\f641\fswiss\fcharset161\fprq2 Trebuchet MS Greek{\*\falt Arial};}{\f642\fswiss\fcharset162\fprq2 Trebuchet MS Tur{\*\falt Arial};}
-{\f645\fswiss\fcharset186\fprq2 Trebuchet MS Baltic{\*\falt Arial};}{\f650\fmodern\fcharset0\fprq1 @MS Mincho Western{\*\falt @MS Gothic};}{\f648\fmodern\fcharset238\fprq1 @MS Mincho CE{\*\falt @MS Gothic};}
-{\f649\fmodern\fcharset204\fprq1 @MS Mincho Cyr{\*\falt @MS Gothic};}{\f651\fmodern\fcharset161\fprq1 @MS Mincho Greek{\*\falt @MS Gothic};}{\f652\fmodern\fcharset162\fprq1 @MS Mincho Tur{\*\falt @MS Gothic};}
-{\f655\fmodern\fcharset186\fprq1 @MS Mincho Baltic{\*\falt @MS Gothic};}}{\colortbl;\red0\green0\blue0;\red0\green0\blue255;\red0\green255\blue255;\red0\green255\blue0;\red255\green0\blue255;\red255\green0\blue0;\red255\green255\blue0;
-\red255\green255\blue255;\red0\green0\blue128;\red0\green128\blue128;\red0\green128\blue0;\red128\green0\blue128;\red128\green0\blue0;\red128\green128\blue0;\red128\green128\blue128;\red192\green192\blue192;}{\stylesheet{
-\ql \li0\ri0\sb120\sa120\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \fs19\lang1033\langfe1033\loch\f37\hich\af37\dbch\af11\cgrid\langnp1033\langfenp1033 \snext0 \sautoupd Normal;}{\s1\ql \fi-357\li357\ri0\sb120\sa120\widctlpar
-\jclisttab\tx360\aspalpha\aspnum\faauto\ls17\outlinelevel0\adjustright\rin0\lin357\itap0 \b\fs19\lang1033\langfe1033\loch\f37\hich\af37\dbch\af11\cgrid\langnp1033\langfenp1033 \sbasedon0 \snext1 heading 1;}{\s2\ql \fi-363\li720\ri0\sb120\sa120\widctlpar
-\jclisttab\tx720\aspalpha\aspnum\faauto\ls17\ilvl1\outlinelevel1\adjustright\rin0\lin720\itap0 \b\fs19\lang1033\langfe1033\loch\f37\hich\af37\dbch\af11\cgrid\langnp1033\langfenp1033 \sbasedon0 \snext2 heading 2;}{
-\s3\ql \fi-357\li1077\ri0\sb120\sa120\widctlpar\tx1077\jclisttab\tx1440\aspalpha\aspnum\faauto\ls17\ilvl2\outlinelevel2\adjustright\rin0\lin1077\itap0 \fs19\lang1033\langfe1033\loch\f37\hich\af37\dbch\af11\cgrid\langnp1033\langfenp1033 \sbasedon0 \snext3
-heading 3;}{\s4\ql \fi-358\li1435\ri0\sb120\sa120\widctlpar\jclisttab\tx1437\aspalpha\aspnum\faauto\ls17\ilvl3\outlinelevel3\adjustright\rin0\lin1435\itap0 \fs19\lang1033\langfe1033\loch\f37\hich\af37\dbch\af11\cgrid\langnp1033\langfenp1033
-\sbasedon0 \snext4 heading 4;}{\s5\ql \fi-357\li1792\ri0\sb120\sa120\widctlpar\tx1792\jclisttab\tx2155\aspalpha\aspnum\faauto\ls17\ilvl4\outlinelevel4\adjustright\rin0\lin1792\itap0
-\fs19\lang1033\langfe1033\loch\f37\hich\af37\dbch\af11\cgrid\langnp1033\langfenp1033 \sbasedon0 \snext5 heading 5;}{\s6\ql \fi-357\li2149\ri0\sb120\sa120\widctlpar
-\jclisttab\tx2152\aspalpha\aspnum\faauto\ls17\ilvl5\outlinelevel5\adjustright\rin0\lin2149\itap0 \fs19\lang1033\langfe1033\loch\f37\hich\af37\dbch\af11\cgrid\langnp1033\langfenp1033 \sbasedon0 \snext6 heading 6;}{
-\s7\ql \fi-357\li2506\ri0\sb120\sa120\widctlpar\jclisttab\tx2509\aspalpha\aspnum\faauto\ls17\ilvl6\outlinelevel6\adjustright\rin0\lin2506\itap0 \fs19\lang1033\langfe1033\loch\f37\hich\af37\dbch\af11\cgrid\langnp1033\langfenp1033 \sbasedon0 \snext7
-heading 7;}{\s8\ql \fi-357\li2863\ri0\sb120\sa120\widctlpar\jclisttab\tx2866\aspalpha\aspnum\faauto\ls17\ilvl7\outlinelevel7\adjustright\rin0\lin2863\itap0 \fs19\lang1033\langfe1033\loch\f37\hich\af37\dbch\af11\cgrid\langnp1033\langfenp1033
-\sbasedon0 \snext8 heading 8;}{\s9\ql \fi-358\li3221\ri0\sb120\sa120\widctlpar\jclisttab\tx3223\aspalpha\aspnum\faauto\ls17\ilvl8\outlinelevel8\adjustright\rin0\lin3221\itap0
-\fs19\lang1033\langfe1033\loch\f37\hich\af37\dbch\af11\cgrid\langnp1033\langfenp1033 \sbasedon0 \snext9 heading 9;}{\*\cs10 \additive \slocked \ssemihidden Default Paragraph Font;}{\*
-\ts11\tsrowd\trftsWidthB3\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\tscellwidthfts0\tsvertalt\tsbrdrt\tsbrdrl\tsbrdrb\tsbrdrr\tsbrdrdgl\tsbrdrdgr\tsbrdrh\tsbrdrv
-\ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \fs20\lang1024\langfe1024\loch\f0\hich\af0\dbch\af11\cgrid\langnp1024\langfenp1024 \snext11 \ssemihidden Normal Table;}{
-\s15\ql \li357\ri0\sb120\sa120\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin357\itap0 \fs19\lang1033\langfe1033\loch\f37\hich\af37\dbch\af11\cgrid\langnp1033\langfenp1033 \sbasedon0 \snext15 Body 1;}{
-\s16\ql \li720\ri0\sb120\sa120\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin720\itap0 \fs19\lang1033\langfe1033\loch\f37\hich\af37\dbch\af11\cgrid\langnp1033\langfenp1033 \sbasedon0 \snext16 Body 2;}{
-\s17\ql \li1077\ri0\sb120\sa120\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin1077\itap0 \fs19\lang1033\langfe1033\loch\f37\hich\af37\dbch\af11\cgrid\langnp1033\langfenp1033 \sbasedon0 \snext17 Body 3;}{
-\s18\ql \li1435\ri0\sb120\sa120\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin1435\itap0 \fs19\lang1033\langfe1033\loch\f37\hich\af37\dbch\af11\cgrid\langnp1033\langfenp1033 \sbasedon0 \snext18 Body 4;}{
-\s19\ql \li1803\ri0\sb120\sa120\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin1803\itap0 \fs19\lang1033\langfe1033\loch\f37\hich\af37\dbch\af11\cgrid\langnp1033\langfenp1033 \sbasedon0 \snext19 Body 5;}{
-\s20\ql \li2160\ri0\sb120\sa120\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin2160\itap0 \fs19\lang1033\langfe1033\loch\f37\hich\af37\dbch\af11\cgrid\langnp1033\langfenp1033 \sbasedon0 \snext20 Body 6;}{
-\s21\ql \li2506\ri0\sb120\sa120\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin2506\itap0 \fs19\lang1033\langfe1033\loch\f37\hich\af37\dbch\af11\cgrid\langnp1033\langfenp1033 \sbasedon0 \snext21 Body 7;}{
-\s22\ql \li2863\ri0\sb120\sa120\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin2863\itap0 \fs19\lang1033\langfe1033\loch\f37\hich\af37\dbch\af11\cgrid\langnp1033\langfenp1033 \sbasedon0 \snext22 Body 8;}{
-\s23\ql \li3221\ri0\sb120\sa120\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin3221\itap0 \fs19\lang1033\langfe1033\loch\f37\hich\af37\dbch\af11\cgrid\langnp1033\langfenp1033 \sbasedon0 \snext23 Body 9;}{
-\s24\ql \fi-357\li357\ri0\sb120\sa120\widctlpar\jclisttab\tx360\aspalpha\aspnum\faauto\ls1\adjustright\rin0\lin357\itap0 \fs19\lang1033\langfe1033\loch\f37\hich\af37\dbch\af11\cgrid\langnp1033\langfenp1033 \sbasedon0 \snext24 Bullet 1;}{
-\s25\ql \fi-363\li720\ri0\sb120\sa120\widctlpar\jclisttab\tx720\aspalpha\aspnum\faauto\ls2\adjustright\rin0\lin720\itap0 \fs19\lang1033\langfe1033\loch\f37\hich\af37\dbch\af11\cgrid\langnp1033\langfenp1033 \sbasedon0 \snext25 Bullet 2;}{
-\s26\ql \fi-357\li1077\ri0\sb120\sa120\widctlpar\jclisttab\tx1080\aspalpha\aspnum\faauto\ls3\adjustright\rin0\lin1077\itap0 \fs19\lang1033\langfe1033\loch\f37\hich\af37\dbch\af11\cgrid\langnp1033\langfenp1033 \sbasedon0 \snext26 Bullet 3;}{
-\s27\ql \fi-358\li1435\ri0\sb120\sa120\widctlpar\jclisttab\tx1437\aspalpha\aspnum\faauto\ls4\adjustright\rin0\lin1435\itap0 \fs19\lang1033\langfe1033\loch\f37\hich\af37\dbch\af11\cgrid\langnp1033\langfenp1033 \sbasedon0 \snext27 Bullet 4;}{
-\s28\ql \fi-357\li1792\ri0\sb120\sa120\widctlpar\jclisttab\tx1795\aspalpha\aspnum\faauto\ls5\adjustright\rin0\lin1792\itap0 \fs19\lang1033\langfe1033\loch\f37\hich\af37\dbch\af11\cgrid\langnp1033\langfenp1033 \sbasedon0 \snext28 Bullet 5;}{
-\s29\ql \fi-357\li2149\ri0\sb120\sa120\widctlpar\jclisttab\tx2152\aspalpha\aspnum\faauto\ls6\adjustright\rin0\lin2149\itap0 \fs19\lang1033\langfe1033\loch\f37\hich\af37\dbch\af11\cgrid\langnp1033\langfenp1033 \sbasedon0 \snext29 Bullet 6;}{
-\s30\ql \fi-357\li2506\ri0\sb120\sa120\widctlpar\jclisttab\tx2509\aspalpha\aspnum\faauto\ls7\adjustright\rin0\lin2506\itap0 \fs19\lang1033\langfe1033\loch\f37\hich\af37\dbch\af11\cgrid\langnp1033\langfenp1033 \sbasedon0 \snext30 Bullet 7;}{
-\s31\ql \fi-357\li2863\ri0\sb120\sa120\widctlpar\jclisttab\tx2866\aspalpha\aspnum\faauto\ls8\adjustright\rin0\lin2863\itap0 \fs19\lang1033\langfe1033\loch\f37\hich\af37\dbch\af11\cgrid\langnp1033\langfenp1033 \sbasedon0 \snext31 Bullet 8;}{
-\s32\ql \fi-358\li3221\ri0\sb120\sa120\widctlpar\jclisttab\tx3223\aspalpha\aspnum\faauto\ls9\adjustright\rin0\lin3221\itap0 \fs19\lang1033\langfe1033\loch\f37\hich\af37\dbch\af11\cgrid\langnp1033\langfenp1033 \sbasedon23 \snext32 Bullet 9;}{
-\s33\ql \li0\ri0\sb120\sa120\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \b\fs28\lang1033\langfe1033\loch\f37\hich\af37\dbch\af11\cgrid\langnp1033\langfenp1033 \sbasedon0 \snext0 Heading EULA;}{\s34\ql \li0\ri0\sb120\sa120\widctlpar\brdrb
-\brdrs\brdrw10\brsp20 \aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \b\fs28\lang1033\langfe1033\loch\f37\hich\af37\dbch\af11\cgrid\langnp1033\langfenp1033 \sbasedon0 \snext0 Heading Software Title;}{
-\s35\ql \li0\ri0\sb120\sa120\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \b\fs19\lang1033\langfe1033\loch\f37\hich\af37\dbch\af11\cgrid\langnp1033\langfenp1033 \sbasedon0 \snext35 Preamble;}{\s36\ql \li0\ri0\sb120\sa120\widctlpar\brdrb
-\brdrs\brdrw10\brsp20 \aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \b\fs19\lang1033\langfe1033\loch\f37\hich\af37\dbch\af11\cgrid\langnp1033\langfenp1033 \sbasedon0 \snext1 Preamble Border;}{
-\s37\qc \li0\ri0\sb120\sa120\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \b\fs19\lang1033\langfe1033\loch\f37\hich\af37\dbch\af11\cgrid\langnp1033\langfenp1033 \sbasedon0 \snext37 Heading Warranty;}{
-\s38\ql \fi-360\li360\ri0\sb120\sa120\widctlpar\jclisttab\tx360\aspalpha\aspnum\faauto\ls11\outlinelevel0\adjustright\rin0\lin360\itap0 \fs19\lang1033\langfe1033\loch\f37\hich\af37\dbch\af11\cgrid\langnp1033\langfenp1033 \sbasedon0 \snext0
-Heading 1 Warranty;}{\s39\ql \fi-360\li720\ri0\sb120\sa120\widctlpar\jclisttab\tx720\aspalpha\aspnum\faauto\ls11\ilvl1\outlinelevel1\adjustright\rin0\lin720\itap0 \fs19\lang1033\langfe1033\loch\f37\hich\af37\dbch\af11\cgrid\langnp1033\langfenp1033
-\sbasedon0 \snext0 Heading 2 Warranty;}{\s40\ql \fi-357\li1077\ri0\sb120\sa120\widctlpar\tx1077\jclisttab\tx1440\aspalpha\aspnum\faauto\ls10\ilvl2\outlinelevel2\adjustright\rin0\lin1077\itap0
-\b\fs19\lang1033\langfe1033\loch\f37\hich\af37\dbch\af11\cgrid\langnp1033\langfenp1033 \sbasedon3 \snext40 Heading 3 Bold;}{\s41\ql \fi-358\li1435\ri0\sb120\sa120\widctlpar\jclisttab\tx1437\aspalpha\aspnum\faauto\ls4\adjustright\rin0\lin1435\itap0
-\fs19\ul\lang1033\langfe1033\loch\f37\hich\af37\dbch\af11\cgrid\langnp1033\langfenp1033 \sbasedon27 \snext41 Bullet 4 Underline;}{\s42\ql \li0\ri0\sb120\sa120\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0
-\fs19\ul\lang1033\langfe1033\loch\f37\hich\af37\dbch\af11\cgrid\langnp1033\langfenp1033 \sbasedon26 \snext42 Bullet 3 Underline;}{\*\cs43 \additive \b\lang1033\langfe1033\loch\f37\hich\af37\dbch\af11\langnp1033\langfenp1033 \sbasedon10 \slocked
-Heading 2 Char;}{\s44\ql \li720\ri0\sb120\sa120\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin720\itap0 \fs19\ul\lang1033\langfe1033\loch\f37\hich\af37\dbch\af11\cgrid\langnp1033\langfenp1033 \sbasedon16 \snext44 Body 2 Underline;}{
-\s45\ql \li1077\ri0\sb120\sa120\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin1077\itap0 \fs19\ul\lang1033\langfe1033\loch\f37\hich\af37\dbch\af11\cgrid\langnp1033\langfenp1033 \sbasedon17 \snext45 Body 3 Underline;}{
-\s46\ql \li0\ri0\sb120\sa120\sl480\slmult1\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \fs19\lang1033\langfe1033\loch\f37\hich\af37\dbch\af11\cgrid\langnp1033\langfenp1033 \sbasedon0 \snext46 Body Text 2;}{
-\s47\ql \fi-358\li1435\ri0\sb120\sa120\widctlpar\jclisttab\tx1437\aspalpha\aspnum\faauto\ls4\adjustright\rin0\lin1435\itap0 \i\fs19\lang1033\langfe1033\loch\f37\hich\af37\dbch\af11\cgrid\langnp1033\langfenp1033 \sbasedon27 \snext47 Bullet 4 Italics;}{\*
-\cs48 \additive \f37\lang1033\langfe1033\langnp1033\langfenp1033 \sbasedon10 \slocked Body 2 Char;}{\*\cs49 \additive \f37\lang1033\langfe1033\langnp1033\langfenp1033 \sbasedon10 \slocked Body 3 Char;}{\*\cs50 \additive
-\f37\lang1033\langfe1033\langnp1033\langfenp1033 \sbasedon10 \slocked Body 4 Char;}{\*\cs51 \additive \f37\lang1033\langfe1033\langnp1033\langfenp1033 \sbasedon10 \slocked Body 1 Char;}{\s52\ql \li0\ri0\sb120\sa120\widctlpar\brdrt\brdrs\brdrw10\brsp20
-\aspalpha\aspnum\faauto\adjustright\rin0\lin0\rtlgutter\itap0 \b\fs19\lang1033\langfe1033\loch\f37\hich\af37\dbch\af11\cgrid\langnp1033\langfenp1033 \sbasedon35 \snext52 Preamble Border Above;}{
-\s53\ql \li0\ri0\sb120\sa120\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \fs19\lang1033\langfe1033\loch\f37\hich\af37\dbch\af11\cgrid\langnp1033\langfenp1033 \sbasedon0 \snext53 \ssemihidden footnote text;}{\*\cs54 \additive \super
-\sbasedon10 \ssemihidden footnote reference;}{\s55\ql \li0\ri0\sb120\sa120\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \fs19\lang1033\langfe1033\loch\f37\hich\af37\dbch\af11\cgrid\langnp1033\langfenp1033 \sbasedon0 \snext55 \ssemihidden
-endnote text;}{\*\cs56 \additive \super \sbasedon10 \ssemihidden endnote reference;}{\s57\ql \li0\ri0\sb120\sa120\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0
-\fs19\lang1033\langfe1033\loch\f37\hich\af37\dbch\af11\cgrid\langnp1033\langfenp1033 \sbasedon0 \snext57 \ssemihidden annotation text;}{\*\cs58 \additive \fs16 \sbasedon10 \ssemihidden annotation reference;}{\s59\ql \li0\ri0\sa160\sl-240\slmult0
-\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \fs19\lang1033\langfe1033\loch\f37\hich\af37\dbch\af11\cgrid\langnp1033\langfenp1033 \sbasedon0 \snext59 Char;}{\s60\ql \li0\ri0\sa160\sl-240\slmult0
-\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \fs19\lang1033\langfe1033\loch\f37\hich\af37\dbch\af11\cgrid\langnp1033\langfenp1033 \sbasedon0 \snext60 Char Char Char Char;}{\*\cs61 \additive \ul\cf2 \sbasedon10 Hyperlink;}{
-\s62\ql \li0\ri0\sb120\sa120\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \fs16\lang1033\langfe1033\loch\f37\hich\af37\dbch\af11\cgrid\langnp1033\langfenp1033 \sbasedon0 \snext62 \ssemihidden Balloon Text;}{\*\cs63 \additive
-\b\f42\lang1033\langfe1033\langnp1033\langfenp1033 \sbasedon10 Heading 2 Char1;}{\*\cs64 \additive \sbasedon10 page number;}{\s65\ql \li0\ri0\sa160\sl-240\slmult0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0
-\fs19\lang1033\langfe1033\loch\f37\hich\af37\dbch\af11\cgrid\langnp1033\langfenp1033 \sbasedon0 \snext65 Char Char Char Char1;}{\s66\ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0
-\b\fs19\lang1033\langfe1033\loch\f37\hich\af37\dbch\af11\cgrid\langnp1033\langfenp1033 \snext0 \styrsid8999754 Body 0 Bold;}{\s67\ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0
-\fs19\lang1033\langfe1033\loch\f37\hich\af37\dbch\af11\cgrid\langnp1033\langfenp1033 \snext0 \styrsid8999754 Body 0;}}{\*\latentstyles\lsdstimax156\lsdlockeddef0}{\*\listtable{\list\listtemplateid176468498\listhybrid{\listlevel\levelnfc23\levelnfcn23
-\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\leveltemplateid692200086\'01\u-3913 ?;}{\levelnumbers;}\f3\fbias0 \s32\fi-358\li3221\jclisttab\tx3223\lin3221 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0
-\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\leveltemplateid67698691\'01o;}{\levelnumbers;}\f2\fbias0 \fi-360\li1440\jclisttab\tx1440\lin1440 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0
-\levelindent0{\leveltext\leveltemplateid67698693\'01\u-3929 ?;}{\levelnumbers;}\f10\fbias0 \fi-360\li2160\jclisttab\tx2160\lin2160 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext
-\leveltemplateid67698689\'01\u-3913 ?;}{\levelnumbers;}\f3\fbias0 \fi-360\li2880\jclisttab\tx2880\lin2880 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\leveltemplateid67698691
-\'01o;}{\levelnumbers;}\f2\fbias0 \fi-360\li3600\jclisttab\tx3600\lin3600 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\leveltemplateid67698693\'01\u-3929 ?;}{\levelnumbers;}
-\f10\fbias0 \fi-360\li4320\jclisttab\tx4320\lin4320 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\leveltemplateid67698689\'01\u-3913 ?;}{\levelnumbers;}\f3\fbias0 \fi-360\li5040
-\jclisttab\tx5040\lin5040 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\leveltemplateid67698691\'01o;}{\levelnumbers;}\f2\fbias0 \fi-360\li5760\jclisttab\tx5760\lin5760 }{\listlevel
-\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\leveltemplateid67698693\'01\u-3929 ?;}{\levelnumbers;}\f10\fbias0 \fi-360\li6480\jclisttab\tx6480\lin6480 }{\listname ;}\listid196815738}
-{\list\listtemplateid-1793664660{\listlevel\levelnfc3\levelnfcn3\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\'02\'00.;}{\levelnumbers\'01;}\b\i0\fbias0 \s38\fi-360\li360\jclisttab\tx360\lin360 }{\listlevel\levelnfc0
-\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\'02\'01.;}{\levelnumbers\'01;}\b\i0\fbias0 \s39\fi-360\li720\jclisttab\tx720\lin720 }{\listlevel\levelnfc2\levelnfcn2\leveljc0\leveljcn0\levelfollow0
-\levelstartat1\levelspace0\levelindent0{\leveltext\'02\'02);}{\levelnumbers\'01;}\fbias0 \fi-360\li1080\jclisttab\tx1080\lin1080 }{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext
-\'03(\'03);}{\levelnumbers\'02;}\fbias0 \fi-360\li1440\jclisttab\tx1440\lin1440 }{\listlevel\levelnfc4\levelnfcn4\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\'03(\'04);}{\levelnumbers\'02;}\fbias0 \fi-360\li1800
-\jclisttab\tx1800\lin1800 }{\listlevel\levelnfc2\levelnfcn2\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\'03(\'05);}{\levelnumbers\'02;}\fbias0 \fi-360\li2160\jclisttab\tx2160\lin2160 }{\listlevel\levelnfc0\levelnfcn0
-\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\'02\'06.;}{\levelnumbers\'01;}\fbias0 \fi-360\li2520\jclisttab\tx2520\lin2520 }{\listlevel\levelnfc4\levelnfcn4\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0
-\levelindent0{\leveltext\'02\'07.;}{\levelnumbers\'01;}\fbias0 \fi-360\li2880\jclisttab\tx2880\lin2880 }{\listlevel\levelnfc2\levelnfcn2\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\'02\'08.;}{\levelnumbers\'01;}
-\fbias0 \fi-360\li3240\jclisttab\tx3240\lin3240 }{\listname ;}\listid394402059}{\list\listtemplateid1928476992{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\'02\'00.;}{\levelnumbers\'01;}
-\b\i0\f42\fs20\fbias0 \fi-357\li357\jclisttab\tx360\lin357 }{\listlevel\levelnfc4\levelnfcn4\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\'02\'01.;}{\levelnumbers\'01;}\b\i0\f42\fs20\fbias0 \fi-363\li720
-\jclisttab\tx720\lin720 }{\listlevel\levelnfc2\levelnfcn2\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\'02\'02.;}{\levelnumbers\'01;}\b\i0\f37\fs20\fbias0 \s40\fi-357\li1077\jclisttab\tx1440\lin1077 }{\listlevel
-\levelnfc3\levelnfcn3\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\'02\'03.;}{\levelnumbers\'01;}\b0\i0\strike0\f42\fs20\ulnone\fbias0 \fi-358\li1435\jclisttab\tx1437\lin1435 }{\listlevel\levelnfc1\levelnfcn1\leveljc0
-\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\'02\'04.;}{\levelnumbers\'01;}\b0\i0\strike0\f42\fs20\ulnone\fbias0 \fi-357\li1792\jclisttab\tx2155\lin1792 }{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0
-\levelstartat1\levelspace0\levelindent0{\leveltext\'02\'05.;}{\levelnumbers\'01;}\b0\i0\f42\fs20\fbias0 \fi-357\li2149\jclisttab\tx2152\lin2149 }{\listlevel\levelnfc4\levelnfcn4\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0
-{\leveltext\'02\'06.;}{\levelnumbers\'01;}\b0\i0\f42\fs20\fbias0 \fi-357\li2506\jclisttab\tx2509\lin2506 }{\listlevel\levelnfc255\levelnfcn255\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\'02i.;}{\levelnumbers;}
-\b0\i0\f42\fs20\fbias0 \fi-357\li2863\jclisttab\tx2866\lin2863 }{\listlevel\levelnfc255\levelnfcn255\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\'02A.;}{\levelnumbers;}\b0\i0\f42\fs20\fbias0 \fi-358\li3221
-\jclisttab\tx3223\lin3221 }{\listname ;}\listid398796681}{\list\listtemplateid789093748\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\leveltemplateid-317712510
-\'01\u-3913 ?;}{\levelnumbers;}\f3\fbias0 \s25\fi-363\li720\jclisttab\tx720\lin720 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\leveltemplateid67698691\'01o;}{\levelnumbers;}
-\f2\fbias0 \fi-360\li1440\jclisttab\tx1440\lin1440 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\leveltemplateid67698693\'01\u-3929 ?;}{\levelnumbers;}\f10\fbias0 \fi-360\li2160
-\jclisttab\tx2160\lin2160 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\leveltemplateid67698689\'01\u-3913 ?;}{\levelnumbers;}\f3\fbias0 \fi-360\li2880\jclisttab\tx2880\lin2880 }
-{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\leveltemplateid67698691\'01o;}{\levelnumbers;}\f2\fbias0 \fi-360\li3600\jclisttab\tx3600\lin3600 }{\listlevel\levelnfc23\levelnfcn23
-\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\leveltemplateid67698693\'01\u-3929 ?;}{\levelnumbers;}\f10\fbias0 \fi-360\li4320\jclisttab\tx4320\lin4320 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0
-\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\leveltemplateid67698689\'01\u-3913 ?;}{\levelnumbers;}\f3\fbias0 \fi-360\li5040\jclisttab\tx5040\lin5040 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1
-\levelspace0\levelindent0{\leveltext\leveltemplateid67698691\'01o;}{\levelnumbers;}\f2\fbias0 \fi-360\li5760\jclisttab\tx5760\lin5760 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext
-\leveltemplateid67698693\'01\u-3929 ?;}{\levelnumbers;}\f10\fbias0 \fi-360\li6480\jclisttab\tx6480\lin6480 }{\listname ;}\listid477573462}{\list\listtemplateid1948578256{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1
-\levelspace0\levelindent0{\leveltext\'02\'00.;}{\levelnumbers\'01;}\b\i0\f42\fs20\fbias0 \fi-357\li357\jclisttab\tx360\lin357 }{\listlevel\levelnfc4\levelnfcn4\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext
-\'02\'01.;}{\levelnumbers\'01;}\b\i0\fs20\fbias0 \fi-360\li720\jclisttab\tx720\lin720 }{\listlevel\levelnfc2\levelnfcn2\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\'02\'02.;}{\levelnumbers\'01;}\b0\i0\f42\fs20\fbias0
-\fi-357\li1077\jclisttab\tx1440\lin1077 }{\listlevel\levelnfc3\levelnfcn3\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\'02\'03.;}{\levelnumbers\'01;}\b0\i0\strike0\f42\fs20\ulnone\fbias0 \fi-358\li1435
-\jclisttab\tx1437\lin1435 }{\listlevel\levelnfc1\levelnfcn1\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\'02\'04.;}{\levelnumbers\'01;}\b0\i0\strike0\f42\fs20\ulnone\fbias0 \fi-357\li1792\jclisttab\tx2155\lin1792 }
-{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\'02\'05.;}{\levelnumbers\'01;}\b0\i0\f42\fs20\fbias0 \fi-357\li2149\jclisttab\tx2152\lin2149 }{\listlevel\levelnfc4\levelnfcn4\leveljc0
-\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\'02\'06.;}{\levelnumbers\'01;}\b0\i0\f42\fs20\fbias0 \fi-357\li2506\jclisttab\tx2509\lin2506 }{\listlevel\levelnfc255\levelnfcn255\leveljc0\leveljcn0\levelfollow0\levelstartat1
-\levelspace0\levelindent0{\leveltext\'02i.;}{\levelnumbers;}\b0\i0\f42\fs20\fbias0 \fi-357\li2863\jclisttab\tx2866\lin2863 }{\listlevel\levelnfc255\levelnfcn255\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext
-\'02A.;}{\levelnumbers;}\b0\i0\f42\fs20\fbias0 \fi-358\li3221\jclisttab\tx3223\lin3221 }{\listname ;}\listid630479929}{\list\listtemplateid67698717{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0
-{\leveltext\'02\'00);}{\levelnumbers\'01;}\fi-360\li360\jclisttab\tx360\lin360 }{\listlevel\levelnfc4\levelnfcn4\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\'02\'01);}{\levelnumbers\'01;}\fi-360\li720
-\jclisttab\tx720\lin720 }{\listlevel\levelnfc2\levelnfcn2\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\'02\'02);}{\levelnumbers\'01;}\fi-360\li1080\jclisttab\tx1080\lin1080 }{\listlevel\levelnfc0\levelnfcn0\leveljc0
-\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\'03(\'03);}{\levelnumbers\'02;}\fi-360\li1440\jclisttab\tx1440\lin1440 }{\listlevel\levelnfc4\levelnfcn4\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0
-{\leveltext\'03(\'04);}{\levelnumbers\'02;}\fi-360\li1800\jclisttab\tx1800\lin1800 }{\listlevel\levelnfc2\levelnfcn2\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\'03(\'05);}{\levelnumbers\'02;}\fi-360\li2160
-\jclisttab\tx2160\lin2160 }{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\'02\'06.;}{\levelnumbers\'01;}\fi-360\li2520\jclisttab\tx2520\lin2520 }{\listlevel\levelnfc4\levelnfcn4\leveljc0
-\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\'02\'07.;}{\levelnumbers\'01;}\fi-360\li2880\jclisttab\tx2880\lin2880 }{\listlevel\levelnfc2\levelnfcn2\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0
-{\leveltext\'02\'08.;}{\levelnumbers\'01;}\fi-360\li3240\jclisttab\tx3240\lin3240 }{\listname ;}\listid700712945}{\list\listtemplateid1866635226{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0
-{\leveltext\'02\'00.;}{\levelnumbers\'01;}\b\i0\f42\fs20\fbias0 \fi-357\li357\jclisttab\tx360\lin357 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\leveltext\'01\u-3913 ?;}{\levelnumbers;}
-\b\i0\f3\fs20\fbias0 \fi-360\li717\jclisttab\tx717\lin717 }{\listlevel\levelnfc2\levelnfcn2\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\'02\'02.;}{\levelnumbers\'01;}\b\i0\f37\fs20\fbias0 \fi-357\li1077
-\jclisttab\tx1440\lin1077 }{\listlevel\levelnfc3\levelnfcn3\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\'02\'03.;}{\levelnumbers\'01;}\b0\i0\strike0\f42\fs20\ulnone\fbias0 \fi-358\li1435\jclisttab\tx1437\lin1435 }
-{\listlevel\levelnfc1\levelnfcn1\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\'02\'04.;}{\levelnumbers\'01;}\b0\i0\strike0\f42\fs20\ulnone\fbias0 \fi-357\li1792\jclisttab\tx2155\lin1792 }{\listlevel\levelnfc0
-\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\'02\'05.;}{\levelnumbers\'01;}\b0\i0\f42\fs20\fbias0 \fi-357\li2149\jclisttab\tx2152\lin2149 }{\listlevel\levelnfc4\levelnfcn4\leveljc0\leveljcn0\levelfollow0
-\levelstartat1\levelspace0\levelindent0{\leveltext\'02\'06.;}{\levelnumbers\'01;}\b0\i0\f42\fs20\fbias0 \fi-357\li2506\jclisttab\tx2509\lin2506 }{\listlevel\levelnfc255\levelnfcn255\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0
-{\leveltext\'02i.;}{\levelnumbers;}\b0\i0\f42\fs20\fbias0 \fi-357\li2863\jclisttab\tx2866\lin2863 }{\listlevel\levelnfc255\levelnfcn255\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\'02A.;}{\levelnumbers;}
-\b0\i0\f42\fs20\fbias0 \fi-358\li3221\jclisttab\tx3223\lin3221 }{\listname ;}\listid731125385}{\list\listtemplateid680715664{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext
-\'02\'00.;}{\levelnumbers\'01;}\b\i0\f42\fs20\fbias0 \s1\fi-357\li357\jclisttab\tx360\lin357 }{\listlevel\levelnfc4\levelnfcn4\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\'02\'01.;}{\levelnumbers\'01;}
-\b\i0\f42\fs20\fbias0 \s2\fi-363\li720\jclisttab\tx720\lin720 }{\listlevel\levelnfc2\levelnfcn2\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\'02\'02.;}{\levelnumbers\'01;}\b\i0\f37\fs20\fbias0 \s3\fi-357\li1077
-\jclisttab\tx1440\lin1077 }{\listlevel\levelnfc3\levelnfcn3\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\'02\'03.;}{\levelnumbers\'01;}\b0\i0\strike0\f42\fs20\ulnone\fbias0 \s4\fi-358\li1435\jclisttab\tx1437\lin1435 }
-{\listlevel\levelnfc1\levelnfcn1\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\'02\'04.;}{\levelnumbers\'01;}\b0\i0\strike0\f42\fs20\ulnone\fbias0 \s5\fi-357\li1792\jclisttab\tx2155\lin1792 }{\listlevel\levelnfc0
-\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\'02\'05.;}{\levelnumbers\'01;}\b0\i0\f42\fs20\fbias0 \s6\fi-357\li2149\jclisttab\tx2152\lin2149 }{\listlevel\levelnfc4\levelnfcn4\leveljc0\leveljcn0\levelfollow0
-\levelstartat1\levelspace0\levelindent0{\leveltext\'02\'06.;}{\levelnumbers\'01;}\b0\i0\f42\fs20\fbias0 \s7\fi-357\li2506\jclisttab\tx2509\lin2506 }{\listlevel\levelnfc255\levelnfcn255\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0
-{\leveltext\'02i.;}{\levelnumbers;}\b0\i0\f42\fs20\fbias0 \s8\fi-357\li2863\jclisttab\tx2866\lin2863 }{\listlevel\levelnfc255\levelnfcn255\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\'02A.;}{\levelnumbers;}
-\b0\i0\f42\fs20\fbias0 \s9\fi-358\li3221\jclisttab\tx3223\lin3221 }{\listname ;}\listid752163927}{\list\listtemplateid2088029282{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext
-\'02\'00.;}{\levelnumbers\'01;}\b\i0\f42\fs20\fbias0 \fi-357\li357\jclisttab\tx360\lin357 }{\listlevel\levelnfc4\levelnfcn4\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\'02\'01.;}{\levelnumbers\'01;}
-\b\i0\f42\fs20\fbias0 \fi-363\li720\jclisttab\tx720\lin720 }{\listlevel\levelnfc2\levelnfcn2\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\'02\'02.;}{\levelnumbers\'01;}\b\i0\f37\fs20\fbias0 \fi-357\li1077
-\jclisttab\tx1440\lin1077 }{\listlevel\levelnfc3\levelnfcn3\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\'02\'03.;}{\levelnumbers\'01;}\b0\i0\strike0\f42\fs20\ulnone\fbias0 \fi-358\li1435\jclisttab\tx1437\lin1435 }
-{\listlevel\levelnfc1\levelnfcn1\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\'02\'04.;}{\levelnumbers\'01;}\b0\i0\strike0\f42\fs20\ulnone\fbias0 \fi-357\li1792\jclisttab\tx2155\lin1792 }{\listlevel\levelnfc0
-\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\'02\'05.;}{\levelnumbers\'01;}\b0\i0\f42\fs20\fbias0 \fi-357\li2149\jclisttab\tx2152\lin2149 }{\listlevel\levelnfc4\levelnfcn4\leveljc0\leveljcn0\levelfollow0
-\levelstartat1\levelspace0\levelindent0{\leveltext\'02\'06.;}{\levelnumbers\'01;}\b0\i0\f42\fs20\fbias0 \fi-357\li2506\jclisttab\tx2509\lin2506 }{\listlevel\levelnfc255\levelnfcn255\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0
-{\leveltext\'02i.;}{\levelnumbers;}\b0\i0\f42\fs20\fbias0 \fi-357\li2863\jclisttab\tx2866\lin2863 }{\listlevel\levelnfc255\levelnfcn255\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\'02A.;}{\levelnumbers;}
-\b0\i0\f42\fs20\fbias0 \fi-358\li3221\jclisttab\tx3223\lin3221 }{\listname ;}\listid800729109}{\list\listtemplateid-296591990\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext
-\leveltemplateid-48305026\'01\u-3913 ?;}{\levelnumbers;}\f3\fbias0 \s31\fi-357\li2863\jclisttab\tx2866\lin2863 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\leveltemplateid67698691
-\'01o;}{\levelnumbers;}\f2\fbias0 \fi-360\li1440\jclisttab\tx1440\lin1440 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\leveltemplateid67698693\'01\u-3929 ?;}{\levelnumbers;}
-\f10\fbias0 \fi-360\li2160\jclisttab\tx2160\lin2160 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\leveltemplateid67698689\'01\u-3913 ?;}{\levelnumbers;}\f3\fbias0 \fi-360\li2880
-\jclisttab\tx2880\lin2880 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\leveltemplateid67698691\'01o;}{\levelnumbers;}\f2\fbias0 \fi-360\li3600\jclisttab\tx3600\lin3600 }{\listlevel
-\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\leveltemplateid67698693\'01\u-3929 ?;}{\levelnumbers;}\f10\fbias0 \fi-360\li4320\jclisttab\tx4320\lin4320 }{\listlevel\levelnfc23\levelnfcn23
-\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\leveltemplateid67698689\'01\u-3913 ?;}{\levelnumbers;}\f3\fbias0 \fi-360\li5040\jclisttab\tx5040\lin5040 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0
-\levelstartat1\levelspace0\levelindent0{\leveltext\leveltemplateid67698691\'01o;}{\levelnumbers;}\f2\fbias0 \fi-360\li5760\jclisttab\tx5760\lin5760 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0
-{\leveltext\leveltemplateid67698693\'01\u-3929 ?;}{\levelnumbers;}\f10\fbias0 \fi-360\li6480\jclisttab\tx6480\lin6480 }{\listname ;}\listid810947713}{\list\listtemplateid1567531878{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0
-\levelstartat1\levelspace0\levelindent0{\leveltext\'02\'00.;}{\levelnumbers\'01;}\b\i0\f42\fs20\fbias0 \fi-357\li357\jclisttab\tx360\lin357 }{\listlevel\levelnfc4\levelnfcn4\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext
-\'02\'01.;}{\levelnumbers\'01;}\b\i0\f42\fs20\fbias0 \fi-363\li720\jclisttab\tx720\lin720 }{\listlevel\levelnfc2\levelnfcn2\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\'02\'02.;}{\levelnumbers\'01;}
-\b0\i0\f42\fs20\fbias0 \fi-357\li1077\jclisttab\tx1440\lin1077 }{\listlevel\levelnfc3\levelnfcn3\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\'02\'03.;}{\levelnumbers\'01;}\b0\i0\strike0\f42\fs20\ulnone\fbias0
-\fi-358\li1435\jclisttab\tx1437\lin1435 }{\listlevel\levelnfc1\levelnfcn1\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\'02\'04.;}{\levelnumbers\'01;}\b0\i0\strike0\f42\fs20\ulnone\fbias0 \fi-357\li1792
-\jclisttab\tx2155\lin1792 }{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\'02\'05.;}{\levelnumbers\'01;}\b0\i0\f42\fs20\fbias0 \fi-357\li2149\jclisttab\tx2152\lin2149 }{\listlevel
-\levelnfc4\levelnfcn4\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\'02\'06.;}{\levelnumbers\'01;}\b0\i0\f42\fs20\fbias0 \fi-357\li2506\jclisttab\tx2509\lin2506 }{\listlevel\levelnfc255\levelnfcn255\leveljc0\leveljcn0
-\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\'02i.;}{\levelnumbers;}\b0\i0\f42\fs20\fbias0 \fi-357\li2863\jclisttab\tx2866\lin2863 }{\listlevel\levelnfc255\levelnfcn255\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0
-\levelindent0{\leveltext\'02A.;}{\levelnumbers;}\b0\i0\f42\fs20\fbias0 \fi-358\li3221\jclisttab\tx3223\lin3221 }{\listname ;}\listid826823576}{\list\listtemplateid2088029282{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1
-\levelspace0\levelindent0{\leveltext\'02\'00.;}{\levelnumbers\'01;}\b\i0\f42\fs20\fbias0 \fi-357\li357\jclisttab\tx360\lin357 }{\listlevel\levelnfc4\levelnfcn4\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext
-\'02\'01.;}{\levelnumbers\'01;}\b\i0\f42\fs20\fbias0 \fi-363\li720\jclisttab\tx720\lin720 }{\listlevel\levelnfc2\levelnfcn2\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\'02\'02.;}{\levelnumbers\'01;}
-\b\i0\f37\fs20\fbias0 \fi-357\li1077\jclisttab\tx1440\lin1077 }{\listlevel\levelnfc3\levelnfcn3\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\'02\'03.;}{\levelnumbers\'01;}\b0\i0\strike0\f42\fs20\ulnone\fbias0
-\fi-358\li1435\jclisttab\tx1437\lin1435 }{\listlevel\levelnfc1\levelnfcn1\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\'02\'04.;}{\levelnumbers\'01;}\b0\i0\strike0\f42\fs20\ulnone\fbias0 \fi-357\li1792
-\jclisttab\tx2155\lin1792 }{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\'02\'05.;}{\levelnumbers\'01;}\b0\i0\f42\fs20\fbias0 \fi-357\li2149\jclisttab\tx2152\lin2149 }{\listlevel
-\levelnfc4\levelnfcn4\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\'02\'06.;}{\levelnumbers\'01;}\b0\i0\f42\fs20\fbias0 \fi-357\li2506\jclisttab\tx2509\lin2506 }{\listlevel\levelnfc255\levelnfcn255\leveljc0\leveljcn0
-\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\'02i.;}{\levelnumbers;}\b0\i0\f42\fs20\fbias0 \fi-357\li2863\jclisttab\tx2866\lin2863 }{\listlevel\levelnfc255\levelnfcn255\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0
-\levelindent0{\leveltext\'02A.;}{\levelnumbers;}\b0\i0\f42\fs20\fbias0 \fi-358\li3221\jclisttab\tx3223\lin3221 }{\listname ;}\listid974869818}{\list\listtemplateid-1813845996\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0
-\levelstartat1\levelspace0\levelindent0{\leveltext\leveltemplateid2033377338\'01\u-3913 ?;}{\levelnumbers;}\f3\fbias0 \s30\fi-357\li2506\jclisttab\tx2509\lin2506 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0
-\levelindent0{\leveltext\leveltemplateid67698691\'01o;}{\levelnumbers;}\f2\fbias0 \fi-360\li1440\jclisttab\tx1440\lin1440 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext
-\leveltemplateid67698693\'01\u-3929 ?;}{\levelnumbers;}\f10\fbias0 \fi-360\li2160\jclisttab\tx2160\lin2160 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\leveltemplateid67698689
-\'01\u-3913 ?;}{\levelnumbers;}\f3\fbias0 \fi-360\li2880\jclisttab\tx2880\lin2880 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\leveltemplateid67698691\'01o;}{\levelnumbers;}
-\f2\fbias0 \fi-360\li3600\jclisttab\tx3600\lin3600 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\leveltemplateid67698693\'01\u-3929 ?;}{\levelnumbers;}\f10\fbias0 \fi-360\li4320
-\jclisttab\tx4320\lin4320 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\leveltemplateid67698689\'01\u-3913 ?;}{\levelnumbers;}\f3\fbias0 \fi-360\li5040\jclisttab\tx5040\lin5040 }
-{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\leveltemplateid67698691\'01o;}{\levelnumbers;}\f2\fbias0 \fi-360\li5760\jclisttab\tx5760\lin5760 }{\listlevel\levelnfc23\levelnfcn23
-\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\leveltemplateid67698693\'01\u-3929 ?;}{\levelnumbers;}\f10\fbias0 \fi-360\li6480\jclisttab\tx6480\lin6480 }{\listname ;}\listid1219436735}{\list\listtemplateid-41362566
-\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\leveltemplateid-1175557160\'01\u-3913 ?;}{\levelnumbers;}\f3\fbias0 \s27\fi-358\li1435\jclisttab\tx1437\lin1435 }{\listlevel
-\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\leveltemplateid67698691\'01o;}{\levelnumbers;}\f2\fbias0 \fi-360\li1440\jclisttab\tx1440\lin1440 }{\listlevel\levelnfc23\levelnfcn23\leveljc0
-\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\leveltemplateid67698693\'01\u-3929 ?;}{\levelnumbers;}\f10\fbias0 \fi-360\li2160\jclisttab\tx2160\lin2160 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0
-\levelstartat1\levelspace0\levelindent0{\leveltext\leveltemplateid67698689\'01\u-3913 ?;}{\levelnumbers;}\f3\fbias0 \fi-360\li2880\jclisttab\tx2880\lin2880 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0
-\levelindent0{\leveltext\leveltemplateid67698691\'01o;}{\levelnumbers;}\f2\fbias0 \fi-360\li3600\jclisttab\tx3600\lin3600 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext
-\leveltemplateid67698693\'01\u-3929 ?;}{\levelnumbers;}\f10\fbias0 \fi-360\li4320\jclisttab\tx4320\lin4320 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\leveltemplateid67698689
-\'01\u-3913 ?;}{\levelnumbers;}\f3\fbias0 \fi-360\li5040\jclisttab\tx5040\lin5040 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\leveltemplateid67698691\'01o;}{\levelnumbers;}
-\f2\fbias0 \fi-360\li5760\jclisttab\tx5760\lin5760 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\leveltemplateid67698693\'01\u-3929 ?;}{\levelnumbers;}\f10\fbias0 \fi-360\li6480
-\jclisttab\tx6480\lin6480 }{\listname ;}\listid1559511898}{\list\listtemplateid-743794326\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\leveltemplateid1229593488
-\'01\u-3913 ?;}{\levelnumbers;}\f3\fbias0 \s26\fi-357\li1077\jclisttab\tx1080\lin1077 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\leveltemplateid67698691\'01o;}{\levelnumbers;}
-\f2\fbias0 \fi-360\li1440\jclisttab\tx1440\lin1440 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\leveltemplateid67698693\'01\u-3929 ?;}{\levelnumbers;}\f10\fbias0 \fi-360\li2160
-\jclisttab\tx2160\lin2160 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\leveltemplateid67698689\'01\u-3913 ?;}{\levelnumbers;}\f3\fbias0 \fi-360\li2880\jclisttab\tx2880\lin2880 }
-{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\leveltemplateid67698691\'01o;}{\levelnumbers;}\f2\fbias0 \fi-360\li3600\jclisttab\tx3600\lin3600 }{\listlevel\levelnfc23\levelnfcn23
-\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\leveltemplateid67698693\'01\u-3929 ?;}{\levelnumbers;}\f10\fbias0 \fi-360\li4320\jclisttab\tx4320\lin4320 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0
-\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\leveltemplateid67698689\'01\u-3913 ?;}{\levelnumbers;}\f3\fbias0 \fi-360\li5040\jclisttab\tx5040\lin5040 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1
-\levelspace0\levelindent0{\leveltext\leveltemplateid67698691\'01o;}{\levelnumbers;}\f2\fbias0 \fi-360\li5760\jclisttab\tx5760\lin5760 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext
-\leveltemplateid67698693\'01\u-3929 ?;}{\levelnumbers;}\f10\fbias0 \fi-360\li6480\jclisttab\tx6480\lin6480 }{\listname ;}\listid1567649130}{\list\listtemplateid1363474438\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0
-\levelstartat1\levelspace1077\levelindent0{\leveltext\leveltemplateid1637229796\'01\u-3913 ?;}{\levelnumbers;}\f3\fbias0 \s28\fi-357\li1792\jclisttab\tx1795\lin1792 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1
-\levelspace1077\levelindent0{\leveltext\leveltemplateid67698691\'01o;}{\levelnumbers;}\f2\fbias0 \fi-360\li1440\jclisttab\tx1440\lin1440 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace1077\levelindent0
-{\leveltext\leveltemplateid67698693\'01\u-3929 ?;}{\levelnumbers;}\f10\fbias0 \fi-360\li2160\jclisttab\tx2160\lin2160 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace1077\levelindent0{\leveltext
-\leveltemplateid67698689\'01\u-3913 ?;}{\levelnumbers;}\f3\fbias0 \fi-360\li2880\jclisttab\tx2880\lin2880 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace1077\levelindent0{\leveltext\leveltemplateid67698691
-\'01o;}{\levelnumbers;}\f2\fbias0 \fi-360\li3600\jclisttab\tx3600\lin3600 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace1077\levelindent0{\leveltext\leveltemplateid67698693\'01\u-3929 ?;}{\levelnumbers;}
-\f10\fbias0 \fi-360\li4320\jclisttab\tx4320\lin4320 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace1077\levelindent0{\leveltext\leveltemplateid67698689\'01\u-3913 ?;}{\levelnumbers;}\f3\fbias0 \fi-360\li5040
-\jclisttab\tx5040\lin5040 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace1077\levelindent0{\leveltext\leveltemplateid67698691\'01o;}{\levelnumbers;}\f2\fbias0 \fi-360\li5760\jclisttab\tx5760\lin5760 }
-{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace1077\levelindent0{\leveltext\leveltemplateid67698693\'01\u-3929 ?;}{\levelnumbers;}\f10\fbias0 \fi-360\li6480\jclisttab\tx6480\lin6480 }{\listname
-;}\listid1848404271}{\list\listtemplateid-1802592190\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\leveltemplateid961321180\'01\u-3913 ?;}{\levelnumbers;}\f3\fbias0 \s29
-\fi-357\li2149\jclisttab\tx2152\lin2149 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\leveltemplateid67698691\'01o;}{\levelnumbers;}\f2\fbias0 \fi-360\li1440\jclisttab\tx1440\lin1440
-}{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\leveltemplateid67698693\'01\u-3929 ?;}{\levelnumbers;}\f10\fbias0 \fi-360\li2160\jclisttab\tx2160\lin2160 }{\listlevel\levelnfc23
-\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\leveltemplateid67698689\'01\u-3913 ?;}{\levelnumbers;}\f3\fbias0 \fi-360\li2880\jclisttab\tx2880\lin2880 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0
-\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\leveltemplateid67698691\'01o;}{\levelnumbers;}\f2\fbias0 \fi-360\li3600\jclisttab\tx3600\lin3600 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0
-\levelindent0{\leveltext\leveltemplateid67698693\'01\u-3929 ?;}{\levelnumbers;}\f10\fbias0 \fi-360\li4320\jclisttab\tx4320\lin4320 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext
-\leveltemplateid67698689\'01\u-3913 ?;}{\levelnumbers;}\f3\fbias0 \fi-360\li5040\jclisttab\tx5040\lin5040 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\leveltemplateid67698691
-\'01o;}{\levelnumbers;}\f2\fbias0 \fi-360\li5760\jclisttab\tx5760\lin5760 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\leveltemplateid67698693\'01\u-3929 ?;}{\levelnumbers;}
-\f10\fbias0 \fi-360\li6480\jclisttab\tx6480\lin6480 }{\listname ;}\listid1877695764}{\list\listtemplateid1186249844\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext
-\leveltemplateid1182702444\'01\u-3913 ?;}{\levelnumbers;}\f3\fbias0 \s24\fi-357\li357\jclisttab\tx360\lin357 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\leveltemplateid67698691
-\'01o;}{\levelnumbers;}\f2\fbias0 \fi-360\li1440\jclisttab\tx1440\lin1440 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\leveltemplateid67698693\'01\u-3929 ?;}{\levelnumbers;}
-\f10\fbias0 \fi-360\li2160\jclisttab\tx2160\lin2160 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\leveltemplateid67698689\'01\u-3913 ?;}{\levelnumbers;}\f3\fbias0 \fi-360\li2880
-\jclisttab\tx2880\lin2880 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\leveltemplateid67698691\'01o;}{\levelnumbers;}\f2\fbias0 \fi-360\li3600\jclisttab\tx3600\lin3600 }{\listlevel
-\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\leveltemplateid67698693\'01\u-3929 ?;}{\levelnumbers;}\f10\fbias0 \fi-360\li4320\jclisttab\tx4320\lin4320 }{\listlevel\levelnfc23\levelnfcn23
-\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\leveltemplateid67698689\'01\u-3913 ?;}{\levelnumbers;}\f3\fbias0 \fi-360\li5040\jclisttab\tx5040\lin5040 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0
-\levelstartat1\levelspace0\levelindent0{\leveltext\leveltemplateid67698691\'01o;}{\levelnumbers;}\f2\fbias0 \fi-360\li5760\jclisttab\tx5760\lin5760 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0
-{\leveltext\leveltemplateid67698693\'01\u-3929 ?;}{\levelnumbers;}\f10\fbias0 \fi-360\li6480\jclisttab\tx6480\lin6480 }{\listname ;}\listid2054619191}}{\*\listoverridetable{\listoverride\listid2054619191\listoverridecount0\ls1}
-{\listoverride\listid477573462\listoverridecount0\ls2}{\listoverride\listid1567649130\listoverridecount0\ls3}{\listoverride\listid1559511898\listoverridecount0\ls4}{\listoverride\listid1848404271\listoverridecount0\ls5}{\listoverride\listid1877695764
-\listoverridecount0\ls6}{\listoverride\listid1219436735\listoverridecount0\ls7}{\listoverride\listid810947713\listoverridecount0\ls8}{\listoverride\listid196815738\listoverridecount0\ls9}{\listoverride\listid398796681\listoverridecount0\ls10}
-{\listoverride\listid394402059\listoverridecount0\ls11}{\listoverride\listid700712945\listoverridecount0\ls12}{\listoverride\listid826823576\listoverridecount0\ls13}{\listoverride\listid630479929\listoverridecount0\ls14}{\listoverride\listid800729109
-\listoverridecount0\ls15}{\listoverride\listid974869818\listoverridecount0\ls16}{\listoverride\listid752163927\listoverridecount0\ls17}{\listoverride\listid731125385\listoverridecount0\ls18}}{\*\rsidtbl \rsid17701\rsid345491\rsid415609\rsid466243
-\rsid480810\rsid535495\rsid555183\rsid787759\rsid865813\rsid1012355\rsid1122066\rsid1511228\rsid1528414\rsid1845488\rsid1853295\rsid2784514\rsid3042060\rsid3162620\rsid3290859\rsid3370445\rsid3416253\rsid3611186\rsid3739474\rsid3809599\rsid4022155
-\rsid4542824\rsid4595173\rsid4739523\rsid4789936\rsid4865423\rsid4995346\rsid5185544\rsid5459775\rsid5536377\rsid6162132\rsid6184270\rsid6310792\rsid6498245\rsid6758513\rsid7226971\rsid7290457\rsid7345747\rsid7433926\rsid7438204\rsid7619174\rsid7692510
-\rsid7747805\rsid7878867\rsid8081479\rsid8324055\rsid8325040\rsid8419363\rsid8458805\rsid8738620\rsid8812012\rsid8858237\rsid8999754\rsid9048481\rsid9321702\rsid9651656\rsid9857610\rsid9860938\rsid9964378\rsid10049557\rsid10813938\rsid10970601
-\rsid11347136\rsid11558388\rsid11754382\rsid11874088\rsid12000701\rsid12340994\rsid12585274\rsid12596065\rsid12664082\rsid13334496\rsid13908819\rsid14168694\rsid14293847\rsid14491415\rsid14705568\rsid14894057\rsid14897950\rsid14943232\rsid15493712
-\rsid15601712\rsid15872081\rsid15925451\rsid16141742\rsid16395859\rsid16450365\rsid16661796\rsid16712132}{\*\generator Microsoft Word 11.0.6568;}{\info{\title MICROSOFT [PRE-RELEASE ][EVALUATION ]SOFTWARE LICENSE TERMS}
-{\creatim\yr2006\mo3\dy21\hr15\min26}{\revtim\yr2006\mo3\dy21\hr15\min28}{\printim\yr2005\mo7\dy21\hr8\min25}{\version3}{\edmins4}{\nofpages2}{\nofwords837}{\nofchars4776}{\nofcharsws5602}{\vern24579}}{\*\userprops {\propname db_build_version}\proptype30
-{\staticval 2.6}{\propname db_charger_document_reference}\proptype3{\staticval 5271}{\propname db_charger_client_name}\proptype30{\staticval tbc}{\propname db_charger_matter_number}\proptype30{\staticval tbc}{\propname autosave}\proptype30{\staticval fals
-e}{\propname owner}\proptype30{\staticval REDMOND\'5cdcorey}{\propname db_master_reference}\proptype30{\staticval USETERMS_OTHERSUPER_ENGLISH}{\propname db_master_version}\proptype30{\staticval 20060222a}{\propname db_master_clock}\proptype3{\staticval 35
-8}{\propname db_master_name}\proptype30{\staticval List of Beta, Evaluation or Standalone Software License Terms Languages}{\propname db_master_description}\proptype30{\staticval }{\propname db_base_url}\proptype30{\staticval http://usetermassembly/dealb
-uilder_live/DealBuilderNET/dealbuilder.aspx}{\propname ProductVersion}\proptype30{\staticval 0}{\propname MScom}\proptype11{\staticval 0}{\propname Language}\proptype30{\staticval English}{\propname CanadaAvail}\proptype11{\staticval 0}{\propname FileForm
-at}\proptype11{\staticval 0}{\propname MandatoryActivation}\proptype11{\staticval 0}{\propname SoftwareType}\proptype30{\staticval Free, Standalone Software}{\propname ProductName}\proptype30{\staticval <Insert Name of Sample>}{\propname NumberOfCopies}
-\proptype30{\staticval Any number of copies}{\propname StandaloneUseRight}\proptype30{\staticval Only to design, develop and test the user's programs}{\propname MediaElementsTemplates}\proptype11{\staticval 0}{\propname DistributableCode}\proptype11
-{\staticval 1}{\propname DistributableCodeType}\proptype30{\staticval Sample Code}{\propname Transfer}\proptype30{\staticval No transfer permitted}{\propname OtherMicrosoftPrograms}\proptype11{\staticval 0}{\propname PrereleaseCode}\proptype11{\staticval
-0}{\propname ThirdPartyPrograms}\proptype11{\staticval 0}{\propname Benchmarking}\proptype11{\staticval 0}{\propname MPEG}\proptype11{\staticval 0}{\propname InternetBasedServices}\proptype11{\staticval 0}{\propname db_commit}\proptype30{\staticval Produc
-tVersion}}\margl1440\margr1440\margt1080\margb1080 \widowctrl\ftnbj\aenddoc\noxlattoyen\expshrtn\noultrlspc\dntblnsbdb\nospaceforul\hyphcaps0\formshade\horzdoc\dgmargin\dghspace180\dgvspace180\dghorigin1440\dgvorigin1080\dghshow1\dgvshow1
-\jexpand\viewkind4\viewscale125\pgbrdrhead\pgbrdrfoot\splytwnine\ftnlytwnine\htmautsp\nolnhtadjtbl\useltbaln\alntblind\lytcalctblwd\lyttblrtgr\lnbrkrule\rempersonalinfo\rsidroot10813938\viewbksp1 \fet0
-{\*\docvar {db_xml}{<?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>\'0d<!DOCTYPE Document SYSTEM "..\'5cDocument.DTD">\'0d<Document><Control NAME="db_base_url" TYPE="string"><Value>http://usetermassembly/dealbuilder_live/DealBuilderNET/dealbuilder.aspx</Value></Control><C
-ontrol NAME="db_folder_form" TYPE="string"><Value>microsoft</Value></Control><Control NAME="db_folder_stylesheet" TYPE="string"><Value>microsoft</Value></Control><Control NAME="db_folder_image" TYPE="string"><Value>microsoft</Value></Control><Control NAME
-="db_charger_dataset_reference" TYPE="numeric"><Value>5270</Value></Control><Control NAME="db_charger_client_name" TYPE="string"><Value>tbc</Value></Control><Control NAME="db_charger_matter_number" TYPE="string"><Value>tbc</Value></Control><Control NAME="
-db_master_reference" TYPE="string"><Value>USETERMS_OTHERSUPER_ENGLISH</Value></Control><Control NAME="db_master_publish_build" TYPE="string"><Value>2.6</Value></Control><Control NAME="db_master_name" TYPE="string"><Value>List of Beta, Evaluation or Standa
-lone Software License Terms Languages</Value></Control><Control NAME="db_master_description" TYPE="string"><Value> </Value></Control><Control NAME="db_master_version" TYPE="string"><Value>20060222a</Value></Control><Control NAME="db_master_clock" TYPE="nu
-meric"><Value>358</Value></Control><Control NAME="db_master_refresh" TYPE="boolean"><Value>true</Value></Control><Control NAME="db_host_create_onload" TYPE="string"><Value></Value></Control><Control NAME="db_host_input_onload" TYPE="string"><Value></Value
-></Control><Control NAME="db_host_output_onload" TYPE="string"><Value></Value></Control><Control NAME="db_host_exception_onload" TYPE="string"><Value></Value></Control><Control NAME="db_host_javascript" TYPE="string"><Value></Value></Control><Control NAME
-="db_transaction_generator" TYPE="string"><Value>unique</Value></Control><Control NAME="db_transaction_prefix" TYPE="string"><Value></Value></Control><Control NAME="db_transaction_suffix" TYPE="string"><Value></Value></Control><Control NAME="db_evaluate"
-TYPE="boolean"><Value>true</Value></Control><Control NAME="db_evaluate_logic" TYPE="boolean"><Value>true</Value></Control><Control NAME="db_evaluate_repeat" TYPE="boolean"><Value>true</Value></Control><Control NAME="db_evaluate_cross_reference" TYPE="bool
-ean"><Value>true</Value></Control><Control NAME="db_evaluate_calculation" TYPE="boolean"><Value>true</Value></Control><Control NAME="db_evaluate_variable" TYPE="boolean"><Value>true</Value></Control><Control NAME="db_evaluate_include" TYPE="boolean"><Valu
-e>true</Value></Control><Control NAME="db_codeload_include" TYPE="string"><Value>eager</Value></Control><Control NAME="db_locale_input_date_sequence" TYPE="string"><Value>day_month_year</Value></Control><Control NAME="db_locale_input_thousands_char" TYPE=
-"string"><Value>,</Value></Control><Control NAME="db_locale_input_decimalpoint_char" TYPE="string"><Value>.</Value></Control><Control NAME="db_locale_output_date_sequence" TYPE="string"><Value>day_month_year</Value></Control><Control NAME="db_locale_outpu
-t_thousands_char" TYPE="string"><Value>,</Value></Control><Control NAME="db_locale_output_decimalpoint_char" TYPE="string"><Value>.</Value></Control><Control NAME="db_output_hyperlink_target" TYPE="string"><Value>_blank</Value></Control><Control NAME="db_
-output_document_format" TYPE="string"><Value>rtf</Value></Control><Control NAME="db_output_document_redline" TYPE="boolean"><Value>false</Value></Control><Control NAME="db_output_document_redline_cause" TYPE="string"><Value>drafting</Value></Control><Cont
-rol NAME="db_output_document_drafting_notes" TYPE="string"><Value>indefinite</Value></Control><Control NAME="db_output_document_properties" TYPE="string"><Value>true</Value></Control><Control NAME="db_output_document_property" TYPE="string"><Value>autosav
-e|text|false</Value><Value>owner|text|REDMOND\'5cdcorey</Value></Control><Control NAME="db_output_document_variable_xml" TYPE="boolean"><Value>true</Value></Control><Control NAME="db_output_document_termsheet" TYPE="boolean"><Value>false</Value></Control><Co
-ntrol NAME="db_output_document_answers" TYPE="boolean"><Value>true</Value></Control><Control NAME="db_output_document_answers_column" TYPE="string"><Value>prompt</Value><Value>value</Value></Control><Control NAME="db_output_document_answers_row" TYPE="str
-ing"><Value>page</Value><Value>group</Value><Value>sure</Value><Value>unsure</Value><Value>unknown</Value><Value>deferred</Value></Control><Control NAME="db_output_document_answers_relaunch_transaction_hyperlink" TYPE="boolean"><Value>false</Value></Contr
-ol><Control NAME="db_output_document_answers_relaunch_transaction_url" TYPE="string"><Value></Value></Control><Control NAME="db_output_filter_reference" TYPE="string"><Value></Value></Control><Control NAME="db_output_variable_as" TYPE="string"><Value>alia
-s</Value></Control><Control NAME="db_output_variable_highlights" TYPE="boolean"><Value>false</Value></Control><Control NAME="db_output_variable_sequence" TYPE="string"><Value>ascending</Value></Control><Control NAME="db_output_white_space" TYPE="boolean">
-<Value>false</Value></Control><Control NAME="db_output_line_breaks" TYPE="boolean"><Value>true</Value></Control><Control NAME="db_input_show_column_headings" TYPE="boolean"><Value>false</Value></Control><Control NAME="db_input_heading_repetition_column" T
-YPE="string"><Value>Repeat</Value></Control><Control NAME="db_input_heading_highlight_column" TYPE="string"><Value>Check</Value></Control><Control NAME="db_input_heading_prompt_column" TYPE="string"><Value>Prompt</Value></Control><Control NAME="db_input_h
-eading_question_column" TYPE="string"><Value>Answer</Value></Control><Control NAME="db_input_heading_state_column" TYPE="string"><Value>Deferral</Value></Control><Control NAME="db_input_heading_guidance_column" TYPE="string"><Value>Guidance</Value></Contr
-ol><Control NAME="db_input_heading_comment_column" TYPE="string"><Value>Insert your comments below</Value></Control><Control NAME="db_input_heading_variable_name_column" TYPE="string"><Value>Variable</Value></Control><Control NAME="db_input_help_url" TYPE
-="string"><Value>/dealbuilder_live/help/dealbuilder/help.html</Value></Control><Control NAME="db_input_data_validation" TYPE="string"><Value>onsubmit</Value></Control><Control NAME="db_input_show_page_title" TYPE="boolean"><Value>true</Value></Control><Co
-ntrol NAME="db_input_show_group_title" TYPE="boolean"><Value>true</Value></Control><Control NAME="db_input_show_repetition_column" TYPE="boolean"><Value>false</Value></Control><Control NAME="db_input_show_state_column" TYPE="boolean"><Value>true</Value></
-Control><Control NAME="db_input_show_variable_name_column" TYPE="boolean"><Value>false</Value></Control><Control NAME="db_input_show_committed" TYPE="boolean"><Value>false</Value></Control><Control NAME="db_input_show_group_state" TYPE="boolean"><Value>tr
-ue</Value></Control><Control NAME="db_input_show_group_state_threshold" TYPE="numeric"><Value>2</Value></Control><Control NAME="db_input_state_display" TYPE="string"><Value>dropdown</Value></Control><Control NAME="db_input_state_preselect" TYPE="string"><
-Value>sure</Value></Control><Control NAME="db_input_unknown_option" TYPE="string"><Value>Unknown</Value></Control><Control NAME="db_input_unknown_position" TYPE="string"><Value>first</Value></Control><Control NAME="db_input_other_option" TYPE="string"><Va
-lue>Other</Value></Control><Control NAME="db_input_other_position" TYPE="string"><Value>last</Value></Control><Control NAME="db_input_other_width_single" TYPE="numeric"><Value>20</Value></Control><Control NAME="db_input_other_width_multiple" TYPE="numeric
-"><Value>20</Value></Control><Control NAME="db_input_other_depth_multiple" TYPE="numeric"><Value>4</Value></Control><Control NAME="db_input_other_prompt_multiple" TYPE="string"><Value>Specify others:</Value></Control><Control NAME="db_input_other_prompt_s
-ingle" TYPE="string"><Value>Specify other:</Value></Control><Control NAME="db_input_other_prompt_break_before" TYPE="numeric"><Value>1</Value></Control><Control NAME="db_input_other_prompt_break_after" TYPE="numeric"><Value>1</Value></Control><Control NAM
-E="db_input_active_separator_sure_multiline" TYPE="string"><Value>, </Value></Control><Control NAME="db_input_active_separator_sure_multiple" TYPE="string"><Value> and </Value></Control><Control NAME="db_input_active_separator_unsure_multiple" TYPE="strin
-g"><Value> and/or </Value></Control><Control NAME="db_input_active_separator_unsure_single" TYPE="string"><Value> or </Value></Control><Control NAME="db_input_active_boolean_true" TYPE="string"><Value>Yes</Value></Control><Control NAME="db_input_active_bo
-olean_false" TYPE="string"><Value>No</Value></Control><Control NAME="db_input_repeat_navigation_prefix" TYPE="string"><Value>(%1 of %2)&\'3bnbsp\'3b</Value></Control><Control NAME="db_input_repeat_navigation_postfix" TYPE="string"><Value></Value></Control><C
-ontrol NAME="db_input_repeat_navigation_portrayal" TYPE="string"><Value>visible</Value></Control><Control NAME="db_input_repeat_format" TYPE="string"><Value>digits</Value></Control><Control NAME="db_input_repeat_prev" TYPE="string"><Value>Prev</Value></Co
-ntrol><Control NAME="db_input_repeat_next" TYPE="string"><Value>Next</Value></Control><Control NAME="db_input_repeat_separator" TYPE="string"><Value>&\'3bnbsp\'3b|&\'3bnbsp\'3b</Value></Control><Control NAME="db_input_prompt_compulsory_symbol" TYPE="string"><Va
-lue>*</Value></Control><Control NAME="db_input_prompt_compulsory_symbol_location" TYPE="string"><Value>after</Value></Control><Control NAME="db_input_question_compulsory_symbol" TYPE="string"><Value></Value></Control><Control NAME="db_input_question_compu
-lsory_symbol_location" TYPE="string"><Value>after</Value></Control><Control NAME="db_input_disable_when_unknown_compulsory" TYPE="boolean"><Value>true</Value></Control><Control NAME="db_input_disable_when_unknown_non_compulsory" TYPE="boolean"><Value>fals
-e</Value></Control><Control NAME="db_input_simple_alert" TYPE="string"><Value>client_side</Value></Control><Control NAME="db_input_warning_irrelevant_page" TYPE="string"><Value><\'3bU>\'3bWARNING:<\'3b/U>\'3b That page is no longer relevant because of answers
- given on this page or a previous page!</Value></Control><Control NAME="db_input_last_page_next_button" TYPE="string"><Value>enabled</Value></Control><Control NAME="db_input_page_goto_list_content" TYPE="string"><Value>relevant_pages</Value></Control><Var
-iable NAME="ProductVersion" TYPE="string" STATUS="sure"><Value>0</Value></Variable><Variable NAME="MScom" TYPE="boolean" STATUS="sure"><Value>0</Value></Variable><Variable NAME="Language" TYPE="select" STATUS="sure"><Value>English</Value></Variable><Varia
-ble NAME="CanadaAvail" TYPE="boolean" STATUS="sure"><Value>0</Value></Variable><Variable NAME="FileFormat" TYPE="boolean" STATUS="sure"><Value>0</Value></Variable><Variable NAME="SoftwareType" TYPE="select" STATUS="sure"><Value>Free, Standalone Software</
-Value></Variable><Variable NAME="ProductName" TYPE="string" STATUS="sure"><Value><\'3bInsert Name of Sample>\'3b</Value></Variable><Variable NAME="NumberOfCopies" TYPE="select" STATUS="sure"><Value>Any number of copies</Value></Variable><Variable NAME="Stan
-daloneUseRight" TYPE="select" STATUS="sure"><Value>Only to design, develop and test the user&apos\'3bs programs</Value></Variable><Variable NAME="MediaElementsTemplates" TYPE="boolean" STATUS="sure"><Value>0</Value></Variable><Variable NAME="DistributableCod
-e" TYPE="boolean" STATUS="sure"><Value>1</Value></Variable><Variable NAME="DistributableCodeType" TYPE="select" STATUS="sure"><Value>Sample Code</Value></Variable><Variable NAME="Transfer" TYPE="select" STATUS="sure"><Value>No transfer permitted</Value></
-Variable><Variable NAME="OtherMicrosoftPrograms" TYPE="boolean" STATUS="sure"><Value>0</Value></Variable><Variable NAME="PrereleaseCode" TYPE="boolean" STATUS="sure"><Value>0</Value></Variable><Variable NAME="ThirdPartyPrograms" TYPE="boolean" STATUS="sur
-e"><Value>0</Value></Variable><Variable NAME="Benchmarking" TYPE="boolean" STATUS="sure"><Value>0</Value></Variable><Variable NAME="MPEG" TYPE="boolean" STATUS="sure"><Value>0</Value></Variable><Variable NAME="InternetBasedServices" TYPE="boolean" STATUS=
-"sure"><Value>0</Value></Variable></Document>}}{\*\ftnsep \pard\plain \ql \li0\ri0\sb120\sa120\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \fs19\lang1033\langfe1033\loch\af37\hich\af37\dbch\af11\cgrid\langnp1033\langfenp1033 {
-\insrsid11558388 \chftnsep
-\par }}{\*\ftnsepc \pard\plain \ql \li0\ri0\sb120\sa120\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \fs19\lang1033\langfe1033\loch\af37\hich\af37\dbch\af11\cgrid\langnp1033\langfenp1033 {\insrsid11558388 \chftnsepc
-\par }}{\*\aftnsep \pard\plain \ql \li0\ri0\sb120\sa120\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \fs19\lang1033\langfe1033\loch\af37\hich\af37\dbch\af11\cgrid\langnp1033\langfenp1033 {\insrsid11558388 \chftnsep
-\par }}{\*\aftnsepc \pard\plain \ql \li0\ri0\sb120\sa120\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \fs19\lang1033\langfe1033\loch\af37\hich\af37\dbch\af11\cgrid\langnp1033\langfenp1033 {\insrsid11558388 \chftnsepc
-\par }}\sectd \psz1\linex0\endnhere\sectlinegrid360\sectdefaultcl\sectrsid3290859\sftnbj {\*\pnseclvl1\pnucrm\pnqc\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl2\pnucltr\pnqc\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl3
-\pndec\pnqc\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl4\pnlcltr\pnqc\pnstart1\pnindent720\pnhang {\pntxta )}}{\*\pnseclvl5\pndec\pnqc\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl6\pnlcltr\pnqc\pnstart1\pnindent720\pnhang
-{\pntxtb (}{\pntxta )}}{\*\pnseclvl7\pnlcrm\pnqc\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl8\pnlcltr\pnqc\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl9\pnlcrm\pnqc\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}
-\pard\plain \s33\ql \li0\ri0\sb120\sa120\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0\pararsid1511228 \b\fs28\lang1033\langfe1033\loch\af37\hich\af37\dbch\af11\cgrid\langnp1033\langfenp1033 {\insrsid1511228\charrsid11558388
-\hich\af37\dbch\af11\loch\f37 MICROSOFT SOFTWARE LICENSE TERMS
-\par }\pard\plain \s34\ql \li0\ri0\sb120\sa120\widctlpar\brdrb\brdrs\brdrw10\brsp20 \aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0\pararsid1511228 \b\fs28\lang1033\langfe1033\loch\af37\hich\af37\dbch\af11\cgrid\langnp1033\langfenp1033 {
-\insrsid1511228\charrsid11558388 \hich\af37\dbch\af11\loch\f37 MICROSOFT }{\insrsid12340994 \hich\af37\dbch\af11\loch\f37 CLR MANAGED DEBUGGER (MDBG) SOURCE SAMPLE}{\insrsid1511228\charrsid11558388
-\par }\pard\plain \s35\ql \li0\ri0\sb120\sa120\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0\pararsid1511228 \b\fs19\lang1033\langfe1033\loch\af37\hich\af37\dbch\af11\cgrid\langnp1033\langfenp1033 {\b0\insrsid1511228\charrsid11558388
-\hich\af37\dbch\af11\loch\f37 These license terms are an agreement between Microsoft Corporation (or based on where you live, one of i\hich\af37\dbch\af11\loch\f37
-ts affiliates) and you. Please read them. They apply to the software named above, which includes the media on which you received it, if any. The terms also apply to any Microsoft
-\par {\listtext\pard\plain\s25 \f3\fs19\lang1033\langfe1033\langfenp1033\insrsid1511228\charrsid11558388 \loch\af3\dbch\af11\hich\f3 \'b7\tab}}\pard\plain \s25\ql \fi-363\li720\ri0\sb120\sa120\widctlpar
-\jclisttab\tx720\aspalpha\aspnum\faauto\ls2\adjustright\rin0\lin720\itap0\pararsid1511228 \fs19\lang1033\langfe1033\loch\af37\hich\af37\dbch\af11\cgrid\langnp1033\langfenp1033 {\insrsid1511228\charrsid11558388 \hich\af37\dbch\af11\loch\f37 updates,
-\par {\listtext\pard\plain\s25 \f3\fs19\lang1033\langfe1033\langfenp1033\insrsid1511228\charrsid11558388 \loch\af3\dbch\af11\hich\f3 \'b7\tab}\hich\af37\dbch\af11\loch\f37 supplements,
-\par {\listtext\pard\plain\s25 \f3\fs19\lang1033\langfe1033\langfenp1033\insrsid1511228\charrsid11558388 \loch\af3\dbch\af11\hich\f3 \'b7\tab}\hich\af37\dbch\af11\loch\f37 Internet-based services, and
-\par {\listtext\pard\plain\s25 \f3\fs19\lang1033\langfe1033\langfenp1033\insrsid1511228\charrsid11558388 \loch\af3\dbch\af11\hich\f3 \'b7\tab}\hich\af37\dbch\af11\loch\f37 support servic\hich\af37\dbch\af11\loch\f37 es
-\par }\pard\plain \s35\ql \li0\ri0\sb120\sa120\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0\pararsid1511228 \b\fs19\lang1033\langfe1033\loch\af37\hich\af37\dbch\af11\cgrid\langnp1033\langfenp1033 {\b0\insrsid1511228\charrsid11558388
-\hich\af37\dbch\af11\loch\f37 for this software, unless other terms accompany those items. If so, those terms apply.
-\par }{\insrsid1511228\charrsid11558388 \hich\af37\dbch\af11\loch\f37 BY USING THE SOFTWARE, YOU ACCEPT THESE TERMS. IF YOU DO NOT ACCEPT THEM, DO NOT USE THE SOFTWARE.
-\par }\pard\plain \s52\ql \li0\ri0\sb120\sa120\widctlpar\brdrt\brdrs\brdrw10\brsp20 \aspalpha\aspnum\faauto\adjustright\rin0\lin0\rtlgutter\itap0\pararsid1511228 \b\fs19\lang1033\langfe1033\loch\af37\hich\af37\dbch\af11\cgrid\langnp1033\langfenp1033 {
-\insrsid1511228\charrsid11558388 \hich\af37\dbch\af11\loch\f37 If you comply with these license terms, you have the rights below\hich\af37\dbch\af11\loch\f37 .
-\par {\listtext\pard\plain\s1 \b\f42\fs20\lang1033\langfe1033\langfenp1033\insrsid1511228\charrsid11558388 \hich\af42\dbch\af11\loch\f42 1.\tab}}\pard\plain \s1\ql \fi-357\li357\ri0\sb120\sa120\widctlpar
-\jclisttab\tx360\aspalpha\aspnum\faauto\ls17\outlinelevel0\adjustright\rin0\lin357\itap0\pararsid1511228 \b\fs19\lang1033\langfe1033\loch\af37\hich\af37\dbch\af11\cgrid\langnp1033\langfenp1033 {\insrsid1511228\charrsid11558388
-\hich\af37\dbch\af11\loch\f37 INSTALLATION AND USE RIGHTS. }{\b0\insrsid6310792\charrsid6310792
-\par {\listtext\pard\plain\s2 \cs48\b\f3\fs20\lang1033\langfe1033\langfenp1033\insrsid1511228\charrsid11558388 \loch\af3\dbch\af11\hich\f3 \'b7\tab}}\pard\plain \s2\ql \fi-360\li717\ri0\sb120\sa120\widctlpar
-\jclisttab\tx717\aspalpha\aspnum\faauto\ls18\ilvl1\outlinelevel1\adjustright\rin0\lin717\itap0\pararsid6310792 \b\fs19\lang1033\langfe1033\loch\af37\hich\af37\dbch\af11\cgrid\langnp1033\langfenp1033 {\cs48\b0\insrsid1511228\charrsid11558388
-\hich\af37\dbch\af11\loch\f37 You may install}{\cs48\b0\insrsid1511228 \hich\af37\dbch\af11\loch\f37 , modify}{\cs48\b0\insrsid1511228\charrsid11558388 \hich\af37\dbch\af11\loch\f37
- and use any number of copies of the software on your devices to design, develop and test your programs.}{\cs48\b0\insrsid6310792 \hich\af37\dbch\af11\loch\f37 }{\cs48\insrsid6310792\charrsid6310792
-\par {\listtext\pard\plain\s2 \cs48\b\f3\fs20\lang1033\langfe1033\langfenp1033\insrsid6310792 \loch\af3\dbch\af11\hich\f3 \'b7\tab}}{\cs48\b0\insrsid6310792 \hich\af37\dbch\af11\loch\f37 You may not }{\b0\insrsid6310792\charrsid6310792
-\hich\af37\dbch\af11\loch\f37 use the software for commercial software hosting services}{\insrsid6310792 \hich\af37\dbch\af11\loch\f37 .}{\insrsid1511228\charrsid6310792
-\par {\listtext\pard\plain\s1 \b\f42\fs20\lang1033\langfe1033\langfenp1033\insrsid1511228\charrsid11558388 \hich\af42\dbch\af11\loch\f42 2.\tab}}\pard\plain \s1\ql \fi-357\li357\ri0\sb120\sa120\widctlpar
-\jclisttab\tx360\aspalpha\aspnum\faauto\ls17\outlinelevel0\adjustright\rin0\lin357\itap0\pararsid1511228 \b\fs19\lang1033\langfe1033\loch\af37\hich\af37\dbch\af11\cgrid\langnp1033\langfenp1033 {\insrsid1511228\charrsid11558388
-\hich\af37\dbch\af11\loch\f37 ADDITIONAL LICENSING REQUIREMENTS AND/OR USE RIGHTS.
-\par {\listtext\pard\plain\s2 \b\f42\fs20\lang1033\langfe1033\langfenp1033\insrsid1511228\charrsid11558388 \hich\af42\dbch\af11\loch\f42 a.\tab}}\pard\plain \s2\ql \fi-363\li720\ri0\sb120\sa120\widctlpar
-\jclisttab\tx720\aspalpha\aspnum\faauto\ls17\ilvl1\outlinelevel1\adjustright\rin0\lin720\itap0\pararsid1511228 \b\fs19\lang1033\langfe1033\loch\af37\hich\af37\dbch\af11\cgrid\langnp1033\langfenp1033 {\insrsid1511228\charrsid11558388
-\hich\af37\dbch\af11\loch\f37 Distributable Code.}{\cs48\b0\insrsid1511228 \hich\af37\dbch\af11\loch\f37 }{\insrsid1511228\charrsid11558388
-\par {\listtext\pard\plain\s40 \cs48\b\f37\fs20\lang1033\langfe1033\langfenp1033\insrsid1511228 \hich\af37\dbch\af11\loch\f37 i.\tab}}\pard\plain \s40\ql \fi-357\li1077\ri0\sb120\sa120\widctlpar
-\jclisttab\tx1077\jclisttab\tx1440\aspalpha\aspnum\faauto\ls10\ilvl2\outlinelevel2\adjustright\rin0\lin1077\itap0\pararsid1511228 \b\fs19\lang1033\langfe1033\loch\af37\hich\af37\dbch\af11\cgrid\langnp1033\langfenp1033 {\cs48\insrsid1511228
-\hich\af37\dbch\af11\loch\f37 Distribution License}{\cs48\b0\insrsid1511228 \hich\af37\dbch\af11\loch\f37 . I}{\cs48\b0\insrsid1511228\charrsid11558388 \hich\af37\dbch\af11\loch\f37 f you comply with }{\cs48\b0\insrsid1511228
-\hich\af37\dbch\af11\loch\f37 all of }{\cs48\b0\insrsid1511228\charrsid11558388 \hich\af37\dbch\af11\loch\f37 the terms below}{\cs48\b0\insrsid1511228 \hich\af37\dbch\af11\loch\f37 , you may}{\insrsid1511228\charrsid11558388
-\par {\listtext\pard\plain\s41 \f3\fs19\lang1033\langfe1033\langfenp1033\insrsid1511228 \loch\af3\dbch\af11\hich\f3 \'b7\tab}}\pard\plain \s41\ql \fi-358\li1435\ri0\sb120\sa120\widctlpar
-\jclisttab\tx1437\aspalpha\aspnum\faauto\ls4\adjustright\rin0\lin1435\itap0\pararsid1511228 \fs19\ul\lang1033\langfe1033\loch\af37\hich\af37\dbch\af11\cgrid\langnp1033\langfenp1033 {\ulnone\insrsid1511228 \hich\af37\dbch\af11\loch\f37 reproduce and }{
-\ulnone\insrsid1511228\charrsid11558388 \hich\af37\dbch\af11\loch\f37 distribute }{\ulnone\insrsid3809599 \hich\af37\dbch\af11\loch\f37 the software }{\ulnone\insrsid1511228 \hich\af37\dbch\af11\loch\f37
-in source or object code form ("Distributable Code") }{\ulnone\insrsid3809599 \hich\af37\dbch\af11\loch\f37 along with your modifications }{\ulnone\insrsid1511228 \hich\af37\dbch\af11\loch\f37 in programs you develop; and}{
-\insrsid1511228\charrsid11558388
-\par {\listtext\pard\plain\s41 \f3\fs19\lang1033\langfe1033\langfenp1033\insrsid1511228\charrsid11558388 \loch\af3\dbch\af11\hich\f3 \'b7\tab}}{\ulnone\insrsid1511228\charrsid11558388 \hich\af37\dbch\af11\loch\f37
-permit distributors of your programs to copy and distribute the Distributable Code as part of }{\ulnone\insrsid1511228 \hich\af37\dbch\af11\loch\f37 your}{\ulnone\insrsid1511228\charrsid11558388 \hich\af37\dbch\af11\loch\f37 programs.}{
-\insrsid1511228\charrsid11558388
-\par {\listtext\pard\plain\s40 \b\f37\fs20\lang1033\langfe1033\langfenp1033\insrsid1511228\charrsid11558388 \hich\af37\dbch\af11\loch\f37 ii.\tab}}\pard\plain \s40\ql \fi-357\li1077\ri0\sb120\sa120\widctlpar
-\jclisttab\tx1077\jclisttab\tx1440\aspalpha\aspnum\faauto\ls10\ilvl2\outlinelevel2\adjustright\rin0\lin1077\itap0\pararsid1511228 \b\fs19\lang1033\langfe1033\loch\af37\hich\af37\dbch\af11\cgrid\langnp1033\langfenp1033 {\insrsid1511228\charrsid11558388
-\hich\af37\dbch\af11\loch\f37 Distribution Requirements}{\b0\insrsid1511228\charrsid11558388 \hich\af37\dbch\af11\loch\f37 .}{\cs49\b0\insrsid1511228\charrsid11558388 \hich\af37\dbch\af11\loch\f37 For any Distributable Code you distribute, you must}{
-\insrsid1511228\charrsid11558388
-\par {\listtext\pard\plain\s27 \f3\fs19\lang1033\langfe1033\langfenp1033\insrsid1511228\charrsid11558388 \loch\af3\dbch\af11\hich\f3 \'b7\tab}}\pard\plain \s27\ql \fi-358\li1435\ri0\sb120\sa120\widctlpar
-\jclisttab\tx1437\aspalpha\aspnum\faauto\ls4\adjustright\rin0\lin1435\itap0\pararsid1511228 \fs19\lang1033\langfe1033\loch\af37\hich\af37\dbch\af11\cgrid\langnp1033\langfenp1033 {\insrsid1511228\charrsid11558388 \hich\af37\dbch\af11\loch\f37
-add significant primary functionality to it in your programs;
-\par {\listtext\pard\plain\s27 \f3\fs19\lang1033\langfe1033\langfenp1033\insrsid1511228\charrsid11558388 \loch\af3\dbch\af11\hich\f3 \'b7\tab}\hich\af37\dbch\af11\loch\f37
-require distributors and external end users to agree to terms that protect it at least as much as this agreement;
-\par {\listtext\pard\plain\s27 \f3\fs19\lang1033\langfe1033\langfenp1033\insrsid1511228\charrsid11558388 \loch\af3\dbch\af11\hich\f3 \'b7\tab}\hich\af37\dbch\af11\loch\f37 display your valid copyright notice on your programs; and
-\par {\listtext\pard\plain\s27 \f3\fs19\lang1033\langfe1033\langfenp1033\insrsid1511228\charrsid11558388 \loch\af3\dbch\af11\hich\f3 \'b7\tab}\hich\af37\dbch\af11\loch\f37 indemnify, defe\hich\af37\dbch\af11\loch\f37
-nd, and hold harmless Microsoft from any claims, including attorneys\hich\f37 \rquote \loch\f37 fees, related to the distribution or use of your programs.
-\par {\listtext\pard\plain\s40 \b\f37\fs20\lang1033\langfe1033\langfenp1033\insrsid1511228\charrsid11558388 \hich\af37\dbch\af11\loch\f37 iii.\tab}}\pard\plain \s40\ql \fi-357\li1077\ri0\sb120\sa120\widctlpar
-\jclisttab\tx1077\jclisttab\tx1440\aspalpha\aspnum\faauto\ls10\ilvl2\outlinelevel2\adjustright\rin0\lin1077\itap0\pararsid1511228 \b\fs19\lang1033\langfe1033\loch\af37\hich\af37\dbch\af11\cgrid\langnp1033\langfenp1033 {\insrsid1511228\charrsid11558388
-\hich\af37\dbch\af11\loch\f37 Distribution Restrictions.}{\cs49\insrsid1511228\charrsid11558388 \hich\af37\dbch\af11\loch\f37 }{\cs49\b0\insrsid1511228\charrsid11558388 \hich\af37\dbch\af11\loch\f37 You may not}{\insrsid1511228\charrsid11558388
-\par {\listtext\pard\plain\s27 \f3\fs19\lang1033\langfe1033\langfenp1033\insrsid1511228\charrsid11558388 \loch\af3\dbch\af11\hich\f3 \'b7\tab}}\pard\plain \s27\ql \fi-358\li1435\ri0\sb120\sa120\widctlpar
-\jclisttab\tx1437\aspalpha\aspnum\faauto\ls4\adjustright\rin0\lin1435\itap0\pararsid1511228 \fs19\lang1033\langfe1033\loch\af37\hich\af37\dbch\af11\cgrid\langnp1033\langfenp1033 {\insrsid1511228\charrsid11558388 \hich\af37\dbch\af11\loch\f37
-alter any copyright, trademark or patent notice in the Distributable Code;
-\par {\listtext\pard\plain\s27 \f3\fs19\lang1033\langfe1033\langfenp1033\insrsid1511228\charrsid11558388 \loch\af3\dbch\af11\hich\f3 \'b7\tab}\hich\af37\dbch\af11\loch\f37 us\hich\af37\dbch\af11\loch\f37 e Microsoft\hich\f37 \rquote \loch\f37
-s trademarks in your programs\hich\f37 \rquote \loch\f37 names or in a way that suggests your programs come from or are endorsed by Microsoft;
-\par {\listtext\pard\plain\s27 \f3\fs19\lang1033\langfe1033\langfenp1033\insrsid1511228\charrsid11558388 \loch\af3\dbch\af11\hich\f3 \'b7\tab}\hich\af37\dbch\af11\loch\f37 distribute Distributable Code to run on a platform other than the Windows platform;
-
-\par {\listtext\pard\plain\s27 \f3\fs19\lang1033\langfe1033\langfenp1033\insrsid1511228\charrsid11558388 \loch\af3\dbch\af11\hich\f3 \'b7\tab}\hich\af37\dbch\af11\loch\f37 include Distributable Code in malicious, deceptive or unlawful programs; or
-\par {\listtext\pard\plain\s27 \f3\fs19\lang1033\langfe1033\langfenp1033\insrsid1511228\charrsid11558388 \loch\af3\dbch\af11\hich\f3 \'b7\tab}\hich\af37\dbch\af11\loch\f37
-modify or distribute the source code of any Distributable Code so that any part of it becomes subject to an Excluded License. An Excluded License is one that requires, as a cond\hich\af37\dbch\af11\loch\f37
-ition of use, modification or distribution, that
-\par {\listtext\pard\plain\s28 \f3\fs19\lang1033\langfe1033\langfenp1033\insrsid1511228\charrsid11558388 \loch\af3\dbch\af11\hich\f3 \'b7\tab}}\pard\plain \s28\ql \fi-357\li1792\ri0\sb120\sa120\widctlpar
-\jclisttab\tx1795\aspalpha\aspnum\faauto\ls5\adjustright\rin0\lin1792\itap0\pararsid1511228 \fs19\lang1033\langfe1033\loch\af37\hich\af37\dbch\af11\cgrid\langnp1033\langfenp1033 {\insrsid1511228\charrsid11558388 \hich\af37\dbch\af11\loch\f37
-the code be disclosed or distributed in source code form; or
-\par {\listtext\pard\plain\s28 \f3\fs19\lang1033\langfe1033\langfenp1033\insrsid1511228\charrsid11558388 \loch\af3\dbch\af11\hich\f3 \'b7\tab}\hich\af37\dbch\af11\loch\f37 others have the right to modify it.
-\par {\listtext\pard\plain\s1 \b\caps\f42\fs20\lang1033\langfe1033\langfenp1033\insrsid1511228\charrsid11558388 \hich\af42\dbch\af11\loch\f42 3.\tab}}\pard\plain \s1\ql \fi-357\li357\ri0\sb120\sa120\widctlpar
-\jclisttab\tx360\aspalpha\aspnum\faauto\ls17\outlinelevel0\adjustright\rin0\lin357\itap0\pararsid1511228 \b\fs19\lang1033\langfe1033\loch\af37\hich\af37\dbch\af11\cgrid\langnp1033\langfenp1033 {\caps\insrsid1511228\charrsid11558388
-\hich\af37\dbch\af11\loch\f37 Scope of License}{\insrsid1511228\charrsid11558388 \hich\af37\dbch\af11\loch\f37 .}{\b0\insrsid1511228\charrsid11558388 \hich\af37\dbch\af11\loch\f37
- The software is licensed, not sold. This agreement only gives you some rights to us\hich\af37\dbch\af11\loch\f37
-e the software. Microsoft reserves all other rights. Unless applicable law gives you more rights despite this limitation, you may use the software only as expressly permitted in this agreement. }{\insrsid1511228\charrsid11558388
-\par {\listtext\pard\plain\s1 \b\caps\f42\fs20\lang1033\langfe1033\langfenp1033\insrsid1511228\charrsid11558388 \hich\af42\dbch\af11\loch\f42 4.\tab}}{\caps\insrsid1511228\charrsid11558388 \hich\af37\dbch\af11\loch\f37 Export Restrictions}{
-\insrsid1511228\charrsid11558388 \hich\af37\dbch\af11\loch\f37 .}{\b0\insrsid1511228\charrsid11558388 \hich\af37\dbch\af11\loch\f37 The software is subject to United\hich\af37\dbch\af11\loch\f37
- States export laws and regulations. You must comply with all domestic and international export laws and regulations that apply to the software. These laws include restrictions on destinations, end users and end use. For additional information, see }
-{\field\flddirty{\*\fldinst {\cs61\b0\ul\cf2\insrsid1511228\charrsid11558388 \hich\af37\dbch\af11\loch\f37 HYP\hich\af37\dbch\af11\loch\f37 ERLINK "http://www.microsoft.com/exporting" }{\cs61\b0\ul\cf2\insrsid1853295\charrsid11558388 {\*\datafield
-00d0c9ea79f9bace118c8200aa004ba90b02000000170000001c0000007700770077002e006d006900630072006f0073006f00660074002e0063006f006d002f006500780070006f007200740069006e0067000000e0c9ea79f9bace118c8200aa004ba90b4600000068007400740070003a002f002f007700770077002e00
-6d006900630072006f0073006f00660074002e0063006f006d002f006500780070006f007200740069006e006700000000000000000000000000000000000000000000000000000000e10000000000000000001800000000000000000000000000000000000000000000000000000000000000000000140000000000000000
-00007220000000010000000000002000000000004e000000000000000000000000}}}{\fldrslt {\cs61\b0\ul\cf2\insrsid1511228\charrsid11558388 \hich\af37\dbch\af11\loch\f37 www.microsoft.com/exporting}}}{\b0\insrsid1511228\charrsid11558388 \hich\af37\dbch\af11\loch\f37
-.}{\cs61\insrsid1511228\charrsid11558388
-\par {\listtext\pard\plain\s1 \b\caps\f42\fs20\lang1033\langfe1033\langfenp1033\insrsid1511228\charrsid11558388 \hich\af42\dbch\af11\loch\f42 5.\tab}}{\caps\insrsid1511228\charrsid11558388 \hich\af37\dbch\af11\loch\f37 SUPPORT SERVICES.}{
-\insrsid1511228\charrsid11558388 \hich\af37\dbch\af11\loch\f37 }{\b0\insrsid1511228\charrsid11558388 \hich\af37\dbch\af11\loch\f37 \hich\f37 Because this software is \'93\loch\f37 \hich\f37 as is,\'94\loch\f37 we may not provide support services for it.
-}{\insrsid1511228\charrsid11558388
-\par {\listtext\pard\plain\s1 \b\caps\f42\fs20\lang1033\langfe1033\langfenp1033\insrsid1511228\charrsid11558388 \hich\af42\dbch\af11\loch\f42 6.\tab}}{\caps\insrsid1511228\charrsid11558388 \hich\af37\dbch\af11\loch\f37 Entire Agreement.}{
-\b0\insrsid1511228\charrsid11558388 \hich\af37\dbch\af11\loch\f37 This agreement, and the terms for supplements, updates, Int\hich\af37\dbch\af11\loch\f37
-ernet-based services and support services that you use, are the entire agreement for the software and support services.
-\par {\listtext\pard\plain\s1 \b\caps\f42\fs20\cf1\lang1033\langfe1033\langfenp1033\insrsid1511228\charrsid11558388 \hich\af42\dbch\af11\loch\f42 7.\tab}}\pard
-\s1\ql \fi-360\li360\ri0\sb120\sa120\keepn\widctlpar\aspalpha\aspnum\faauto\ls17\outlinelevel0\adjustright\rin0\lin360\itap0\pararsid1511228 {\caps\cf1\insrsid1511228\charrsid11558388 \hich\af37\dbch\af11\loch\f37 Applicable Law}{
-\cf1\insrsid1511228\charrsid11558388 \hich\af37\dbch\af11\loch\f37 .
-\par {\listtext\pard\plain\s2 \b\f42\fs20\lang1033\langfe1033\langfenp1033\insrsid1511228\charrsid11558388 \hich\af42\dbch\af11\loch\f42 a.\tab}}\pard\plain \s2\ql \fi-363\li720\ri0\sb120\sa120\widctlpar
-\jclisttab\tx720\aspalpha\aspnum\faauto\ls17\ilvl1\outlinelevel1\adjustright\rin0\lin720\itap0\pararsid1511228 \b\fs19\lang1033\langfe1033\loch\af37\hich\af37\dbch\af11\cgrid\langnp1033\langfenp1033 {\insrsid1511228\charrsid11558388
-\hich\af37\dbch\af11\loch\f37 United States.}{\b0\insrsid1511228\charrsid11558388 \hich\af37\dbch\af11\loch\f37 If you acquired the software in the United States, Washington state law go\hich\af37\dbch\af11\loch\f37
-verns the interpretation of this agreement and applies to claims for breach of it, regardless of conflict of laws principles. The laws of the state where you live govern all other claims, including claims under state consumer protection laws, unfair comp
-\hich\af37\dbch\af11\loch\f37 e\hich\af37\dbch\af11\loch\f37 tition laws, and in tort.}{\insrsid1511228\charrsid11558388
-\par {\listtext\pard\plain\s2 \b\f42\fs20\lang1033\langfe1033\langfenp1033\insrsid1511228\charrsid11558388 \hich\af42\dbch\af11\loch\f42 b.\tab}}{\insrsid1511228\charrsid11558388 \hich\af37\dbch\af11\loch\f37 Outside the United States.}{
-\b0\insrsid1511228\charrsid11558388 \hich\af37\dbch\af11\loch\f37 If you acquired the software in any other country, the laws of that country apply.}{\insrsid1511228\charrsid11558388
-\par {\listtext\pard\plain\s1 \b\caps\f42\fs20\lang1033\langfe1033\langfenp1033\insrsid1511228\charrsid11558388 \hich\af42\dbch\af11\loch\f42 8.\tab}}\pard\plain \s1\ql \fi-357\li357\ri0\sb120\sa120\widctlpar
-\jclisttab\tx360\aspalpha\aspnum\faauto\ls17\outlinelevel0\adjustright\rin0\lin357\itap0\pararsid1511228 \b\fs19\lang1033\langfe1033\loch\af37\hich\af37\dbch\af11\cgrid\langnp1033\langfenp1033 {\caps\insrsid1511228\charrsid11558388
-\hich\af37\dbch\af11\loch\f37 Legal Effect.}{\b0\insrsid1511228\charrsid11558388 \hich\af37\dbch\af11\loch\f37 This agreement describes certain legal rights. You may have other rights under the laws of your c\hich\af37\dbch\af11\loch\f37
-ountry. You may also have rights with respect to the party from whom you acquired the software. This agreement does not change your rights under the laws of your country if the laws of your country do not permit it to do so.}{
-\caps\insrsid1511228\charrsid11558388
-\par {\listtext\pard\plain\s1 \b\caps\f42\fs20\lang1033\langfe1033\langfenp1033\insrsid1511228\charrsid11558388 \hich\af42\dbch\af11\loch\f42 9.\tab}}{\caps\insrsid1511228\charrsid11558388 \hich\af37\dbch\af11\loch\f37 Disclaimer of Warranty.}{
-\insrsid1511228\charrsid11558388 \hich\af37\dbch\af11\loch\f37 }{\caps\insrsid1511228\charrsid11558388 \hich\af37\dbch\af11\loch\f37 \hich\f37 The software is licensed \'93\loch\f37 \hich\f37 as-is.\'94\loch\f37
- You bear the risk of using it. Microsoft gives no express warranties, guarantees or conditions. You may have additional consumer rights under your local laws which this agreement cannot change. To the extent permitted\hich\af37\dbch\af11\loch\f37
-\hich\af37\dbch\af11\loch\f37 under your local laws, Microsoft excludes the implied warranties of merchantability, fitness for a particular purpose and non-infringement.
-\par {\listtext\pard\plain\s1 \b\caps\f42\fs20\lang1033\langfe1033\langfenp1033\insrsid1511228\charrsid11558388 \hich\af42\dbch\af11\loch\f42 10.\tab}}\pard \s1\ql \fi-360\li360\ri0\sb120\sa120\widctlpar
-\jclisttab\tx360\aspalpha\aspnum\faauto\ls17\outlinelevel0\adjustright\rin0\lin360\itap0\pararsid1511228 {\caps\insrsid1511228\charrsid11558388 \hich\af37\dbch\af11\loch\f37
-Limitation on and Exclusion of Remedies and Damages. You can recover from Microsoft and its suppliers only dire\hich\af37\dbch\af11\loch\f37
-ct damages up to U.S. $5.00. You cannot recover any other damages, including consequential, lost profits, special, indirect or incidental damages.
-\par }\pard\plain \s15\ql \li357\ri0\sb120\sa120\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin357\itap0\pararsid1511228 \fs19\lang1033\langfe1033\loch\af37\hich\af37\dbch\af11\cgrid\langnp1033\langfenp1033 {\insrsid1511228\charrsid11558388
-\hich\af37\dbch\af11\loch\f37 This limitation applies to
-\par {\listtext\pard\plain\s25 \f3\fs19\lang1033\langfe1033\langfenp1033\insrsid1511228\charrsid11558388 \loch\af3\dbch\af11\hich\f3 \'b7\tab}}\pard\plain \s25\ql \fi-363\li720\ri0\sb120\sa120\widctlpar
-\jclisttab\tx720\aspalpha\aspnum\faauto\ls2\adjustright\rin0\lin720\itap0\pararsid1511228 \fs19\lang1033\langfe1033\loch\af37\hich\af37\dbch\af11\cgrid\langnp1033\langfenp1033 {\insrsid1511228\charrsid11558388 \hich\af37\dbch\af11\loch\f37
-anything related to the software, services, content (including code) on third p\hich\af37\dbch\af11\loch\f37 arty Internet sites, or third party programs; and
-\par {\listtext\pard\plain\s25 \f3\fs19\lang1033\langfe1033\langfenp1033\insrsid1511228\charrsid11558388 \loch\af3\dbch\af11\hich\f3 \'b7\tab}\hich\af37\dbch\af11\loch\f37
-claims for breach of contract, breach of warranty, guarantee or condition, strict liability, negligence, or other tort to the extent permitted by applicable law.
-\par }\pard\plain \ql \li360\ri0\sb120\sa120\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin360\itap0\pararsid1511228 \fs19\lang1033\langfe1033\loch\af37\hich\af37\dbch\af11\cgrid\langnp1033\langfenp1033 {\insrsid1511228\charrsid11558388
-\hich\af37\dbch\af11\loch\f37 It also applies even if Microsoft knew or \hich\af37\dbch\af11\loch\f37
-should have known about the possibility of the damages. The above limitation or exclusion may not apply to you because your country may not allow the exclusion or limitation of incidental, consequential or other damages.}{
-\insrsid1511228\charrsid11558388
-\par }\pard \ql \li0\ri0\sb120\sa120\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0\pararsid1511228 {\insrsid9964378\charrsid1511228
-\par }}
\ No newline at end of file |