diff --git a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Control/AppDomain.cs b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Control/AppDomain.cs index cad084bc41..5be52dd0c1 100644 --- a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Control/AppDomain.cs +++ b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Control/AppDomain.cs @@ -40,7 +40,7 @@ namespace Debugger } } - internal ICorDebugAppDomain CorDebugAppDomain { + internal ICorDebugAppDomain CorAppDomain { get { return corAppDomain; } diff --git a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Control/AppDomainCollection.cs b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Control/AppDomainCollection.cs index c8de09f54d..e658a774c4 100644 --- a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Control/AppDomainCollection.cs +++ b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Control/AppDomainCollection.cs @@ -19,7 +19,7 @@ namespace Debugger public AppDomain this[ICorDebugAppDomain corAppDomain] { get { foreach(AppDomain a in this) { - if (a.CorDebugAppDomain.Equals(corAppDomain)) { + if (a.CorAppDomain.Equals(corAppDomain)) { return a; } } diff --git a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Metadata/DebugType.cs b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Metadata/DebugType.cs index 089762790c..6721a4754c 100644 --- a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Metadata/DebugType.cs +++ b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Metadata/DebugType.cs @@ -401,6 +401,36 @@ namespace Debugger.MetaData return Create(module.AppDomain, genInstance); } + if (sigType is ARRAY) { + ARRAY arraySig = (ARRAY)sigType; + DebugType elementType = Create(module, arraySig.Type, declaringType); + ICorDebugType res = module.AppDomain.CorAppDomain.CastTo().GetArrayOrPointerType((uint)sigType.ElementType, (uint)arraySig.Shape.Rank, elementType.CorType); + return Create(module.AppDomain, res); + } + + if (sigType is SZARRAY) { + SZARRAY arraySig = (SZARRAY)sigType; + DebugType elementType = Create(module, arraySig.Type, declaringType); + ICorDebugType res = module.AppDomain.CorAppDomain.CastTo().GetArrayOrPointerType((uint)sigType.ElementType, 1, elementType.CorType); + return Create(module.AppDomain, res); + } + + if (sigType is PTR) { + PTR ptrSig = (PTR)sigType; + DebugType elementType; + if (ptrSig.Void) { + elementType = Create(module.AppDomain, typeof(void).FullName); + } else { + elementType = Create(module, ptrSig.PtrType, declaringType); + } + ICorDebugType res = module.AppDomain.CorAppDomain.CastTo().GetArrayOrPointerType((uint)sigType.ElementType, 0, elementType.CorType); + return Create(module.AppDomain, res); + } + + if (sigType is FNPTR) { + // TODO: FNPTR + } + throw new NotImplementedException(sigType.ElementType.ToString()); } diff --git a/src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/DebugTypes.cs b/src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/DebugTypes.cs index 91189be288..5f2149cc61 100644 --- a/src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/DebugTypes.cs +++ b/src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/DebugTypes.cs @@ -21,6 +21,7 @@ namespace Debugger.Tests.TestPrograms public char c; public IntPtr intPtr; public int* pInt; + public void* pVoid; public int[] intArray; public int[,] intMultiArray; public List intList; @@ -124,10 +125,10 @@ namespace Debugger.Tests { mscorlib.dll (No symbols) DebugTypes.exe (Has symbols) - Break DebugTypes.cs:75,4-75,40 + Break DebugTypes.cs:76,4-76,40 + Count="15"> + Type="System.Int32*" /> + + + + Type="System.Int32[]" /> + Type="System.Int32[,]" /> + Type="System.Collections.Generic.List<System.Int32>[]" /> @@ -775,7 +785,7 @@ namespace Debugger.Tests { - Break DebugTypes.cs:92,4-92,40 + Break DebugTypes.cs:93,4-93,40