Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/debugger-libs.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/CorApi
diff options
context:
space:
mode:
authorArtem Bukhonov <Artem.Bukhonov@jetbrains.com>2017-01-10 21:19:45 +0300
committerArtem Bukhonov <Artem.Bukhonov@jetbrains.com>2017-01-10 21:19:45 +0300
commit24d3bcf59a79fa9de17d4188fd13389e8240d048 (patch)
treedf56df0141b445c42ffa450e9db7779f302d7931 /CorApi
parent781039b9ae985e314eb3227b1794168b1835cc32 (diff)
Handle some other COR_ELEMENT_TYPES to avoid exceptions in ReadType
Diffstat (limited to 'CorApi')
-rw-r--r--CorApi/ICorDebugWrappers.cs45
1 files changed, 37 insertions, 8 deletions
diff --git a/CorApi/ICorDebugWrappers.cs b/CorApi/ICorDebugWrappers.cs
index 5f8f793..51625f0 100644
--- a/CorApi/ICorDebugWrappers.cs
+++ b/CorApi/ICorDebugWrappers.cs
@@ -156,8 +156,8 @@ namespace Microsoft.Samples.Debugging.CorDebug.NativeApi
USER_UNSAFE_POINT = 0x80
}
- // [Xamarin] Expression evaluator.
- [CLSCompliant(true)]
+ // [Xamarin] Expression evaluator.
+ [CLSCompliant (true)]
[Flags]
public enum CorElementType
{
@@ -171,7 +171,7 @@ namespace Microsoft.Samples.Debugging.CorDebug.NativeApi
ELEMENT_TYPE_CMOD_REQD = 0x1f,
ELEMENT_TYPE_END = 0,
ELEMENT_TYPE_FNPTR = 0x1b,
- ELEMENT_TYPE_GENERICINST = 0x15,
+ ELEMENT_TYPE_GENERICINST = 0x15,
ELEMENT_TYPE_I = 0x18,
ELEMENT_TYPE_I1 = 4,
ELEMENT_TYPE_I2 = 6,
@@ -180,13 +180,13 @@ namespace Microsoft.Samples.Debugging.CorDebug.NativeApi
ELEMENT_TYPE_INTERNAL = 0x21,
ELEMENT_TYPE_MAX = 0x22,
ELEMENT_TYPE_MODIFIER = 0x40,
- ELEMENT_TYPE_MVAR = 0x1e,
+ ELEMENT_TYPE_MVAR = 0x1e,
ELEMENT_TYPE_OBJECT = 0x1c,
- ELEMENT_TYPE_PINNED = 0x45,
+ ELEMENT_TYPE_PINNED = 0x05 | ELEMENT_TYPE_MODIFIER,
ELEMENT_TYPE_PTR = 15,
ELEMENT_TYPE_R4 = 12,
ELEMENT_TYPE_R8 = 13,
- ELEMENT_TYPE_SENTINEL = 0x41,
+ ELEMENT_TYPE_SENTINEL = 0x01 | ELEMENT_TYPE_MODIFIER,
ELEMENT_TYPE_STRING = 14,
ELEMENT_TYPE_SZARRAY = 0x1d,
ELEMENT_TYPE_TYPEDBYREF = 0x16,
@@ -196,8 +196,37 @@ namespace Microsoft.Samples.Debugging.CorDebug.NativeApi
ELEMENT_TYPE_U4 = 9,
ELEMENT_TYPE_U8 = 11,
ELEMENT_TYPE_VALUETYPE = 0x11,
- ELEMENT_TYPE_VAR = 0x13,
- ELEMENT_TYPE_VOID = 1
+ 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