summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMike McLaughlin <mikem@microsoft.com>2019-10-30 16:12:47 -0700
committerGitHub <noreply@github.com>2019-10-30 16:12:47 -0700
commit934ef618a9e3abf968e5783b8efa28e9c1caf295 (patch)
treefc0cdae5de341a7747bd709a14e69c76826cd219 /src
parent93584136cf938d5f65e98e3bb7f0580526ae0716 (diff)
downloadcoreclr-934ef618a9e3abf968e5783b8efa28e9c1caf295.tar.gz
coreclr-934ef618a9e3abf968e5783b8efa28e9c1caf295.tar.bz2
coreclr-934ef618a9e3abf968e5783b8efa28e9c1caf295.zip
Fix minidumps not loading in VS issue (#27553)
Fix a function that was ifdef'ed needed for the metadata locator callbacks to work. Fix some not properly DAC'ized code in the type desc and server GC code. Caused an exception during dump generation. Issue: https://github.com/dotnet/coreclr/issues/26907
Diffstat (limited to 'src')
-rw-r--r--src/debug/daccess/dacdbiimpl.cpp7
-rw-r--r--src/debug/daccess/request_svr.cpp4
-rw-r--r--src/vm/typedesc.cpp4
3 files changed, 5 insertions, 10 deletions
diff --git a/src/debug/daccess/dacdbiimpl.cpp b/src/debug/daccess/dacdbiimpl.cpp
index a65233c2d0..fb930c16fa 100644
--- a/src/debug/daccess/dacdbiimpl.cpp
+++ b/src/debug/daccess/dacdbiimpl.cpp
@@ -1238,12 +1238,6 @@ bool DacDbiInterfaceImpl::GetMetaDataFileInfoFromPEFile(VMPTR_PEFile vmPEFile,
bool &isNGEN,
IStringHolder* pStrFilename)
{
-#if !defined(FEATURE_PREJIT)
-
- return false;
-
-#else // defined(FEATURE_PREJIT)
-
DD_ENTER_MAY_THROW;
DWORD dwDataSize;
@@ -1266,7 +1260,6 @@ bool DacDbiInterfaceImpl::GetMetaDataFileInfoFromPEFile(VMPTR_PEFile vmPEFile,
pStrFilename->AssignCopy(wszFilePath);
return ret;
-#endif // !defined(FEATURE_PREJIT)
}
diff --git a/src/debug/daccess/request_svr.cpp b/src/debug/daccess/request_svr.cpp
index 8b3f11fd4d..20419fb039 100644
--- a/src/debug/daccess/request_svr.cpp
+++ b/src/debug/daccess/request_svr.cpp
@@ -227,7 +227,9 @@ ClrDataAccess::EnumSvrGlobalMemoryRegions(CLRDataEnumMemoryFlags flags)
size_t gen_table_size = g_gcDacGlobals->generation_size * (*g_gcDacGlobals->max_gen + 2);
DacEnumMemoryRegion(dac_cast<TADDR>(pHeap), sizeof(dac_gc_heap));
DacEnumMemoryRegion(dac_cast<TADDR>(pHeap->finalize_queue), sizeof(dac_finalize_queue));
- DacEnumMemoryRegion(dac_cast<TADDR>(pHeap->generation_table), gen_table_size);
+
+ TADDR taddrTable = dac_cast<TADDR>(pHeap) + offsetof(dac_gc_heap, generation_table);
+ DacEnumMemoryRegion(taddrTable, gen_table_size);
// enumerating the generations from max (which is normally gen2) to max+1 gives you
// the segment list for all the normal segements plus the large heap segment (max+1)
diff --git a/src/vm/typedesc.cpp b/src/vm/typedesc.cpp
index 74be17ad05..983a403cef 100644
--- a/src/vm/typedesc.cpp
+++ b/src/vm/typedesc.cpp
@@ -229,9 +229,9 @@ void TypeDesc::GetName(SString &ssBuf)
th = TypeHandle(this);
if (kind == ELEMENT_TYPE_ARRAY)
- rank = ((ArrayTypeDesc*) this)->GetRank();
+ rank = dac_cast<PTR_ArrayTypeDesc>(this)->GetRank();
else if (CorTypeInfo::IsGenericVariable(kind))
- rank = ((TypeVarTypeDesc*) this)->GetIndex();
+ rank = dac_cast<PTR_TypeVarTypeDesc>(this)->GetIndex();
else
rank = 0;