From c4d22a210bc28923906b205b219e8bf5c8e58926 Mon Sep 17 00:00:00 2001 From: Sean Gillespie Date: Fri, 9 Sep 2016 06:53:48 -0700 Subject: Only reference IGCHeap::gcHeapType when FEATURE_SVR_GC is defined --- src/debug/daccess/request.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/debug/daccess/request.cpp b/src/debug/daccess/request.cpp index 9de09e7f85..e38befafa7 100644 --- a/src/debug/daccess/request.cpp +++ b/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; -- cgit v1.2.3