* fixed class size calculation (dotnet/coreclr#10916)
authorBuyduck <ivan.vagin@partner.samsung.com>
Tue, 18 Apr 2017 08:02:14 +0000 (11:02 +0300)
committerJan Vorlicek <janvorli@microsoft.com>
Tue, 18 Apr 2017 08:02:14 +0000 (01:02 -0700)
Commit migrated from https://github.com/dotnet/coreclr/commit/12fe7a2082696b8b2aa0aed22e8fad01750b8080

src/coreclr/src/vm/gdbjit.cpp

index fe8e211..ace6b76 100644 (file)
@@ -1095,7 +1095,7 @@ ClassTypeInfo::ClassTypeInfo(TypeHandle typeHandle, int num_members, FunctionMem
     {
         case ELEMENT_TYPE_VALUETYPE:
         case ELEMENT_TYPE_CLASS:
-            m_type_size = pMT->IsValueType() ? typeHandle.GetSize() : typeHandle.AsMethodTable()->GetClass()->GetSize();
+            m_type_size = pMT->IsValueType() ? typeHandle.GetSize() : typeHandle.AsMethodTable()->GetBaseSize();
             break;
         case ELEMENT_TYPE_ARRAY:
         case ELEMENT_TYPE_SZARRAY: