From: Sean Gillespie Date: Fri, 9 Sep 2016 13:53:48 +0000 (-0700) Subject: Only reference IGCHeap::gcHeapType when FEATURE_SVR_GC is defined X-Git-Tag: submit/tizen/20210909.063632~11030^2~9447^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=97a38df5286c90ed86cbe0d58c78bd7bb2c85e3f;p=platform%2Fupstream%2Fdotnet%2Fruntime.git Only reference IGCHeap::gcHeapType when FEATURE_SVR_GC is defined Commit migrated from https://github.com/dotnet/coreclr/commit/c4d22a210bc28923906b205b219e8bf5c8e58926 --- diff --git a/src/coreclr/src/debug/daccess/request.cpp b/src/coreclr/src/debug/daccess/request.cpp index 9de09e7..e38befa 100644 --- a/src/coreclr/src/debug/daccess/request.cpp +++ b/src/coreclr/src/debug/daccess/request.cpp @@ -2960,8 +2960,13 @@ ClrDataAccess::GetGCHeapData(struct DacpGcHeapData *gcheapData) SOSDacEnter(); + // for server GC-capable builds only, we need to check and see if IGCHeap::gcHeapType + // is GC_HEAP_INVALID, in which case we fail. + // IGCHeap::gcHeapType doesn't exist on non-server-GC capable builds.' +#ifdef FEATURE_SVR_GC size_t gcHeapValue = 0; ULONG32 returned = 0; + TADDR gcHeapTypeLocation = m_globalBase + g_dacGlobals.IGCHeap__gcHeapType; // @todo Microsoft: we should probably be capturing the HRESULT from ReadVirtual. We could @@ -2986,6 +2991,7 @@ ClrDataAccess::GetGCHeapData(struct DacpGcHeapData *gcheapData) hr = E_FAIL; goto cleanup; } +#endif // Now we can get other important information about the heap gcheapData->g_max_generation = GCHeapUtilities::GetMaxGeneration(); @@ -3005,8 +3011,10 @@ ClrDataAccess::GetGCHeapData(struct DacpGcHeapData *gcheapData) gcheapData->HeapCount = 1; } +#ifdef FEATURE_SVR_GC cleanup: ; +#endif SOSDacLeave(); return hr;