diff --git a/src/coreclr/debug/daccess/request.cpp b/src/coreclr/debug/daccess/request.cpp index 6fee2ee38f8d25..2c843d1118dd9c 100644 --- a/src/coreclr/debug/daccess/request.cpp +++ b/src/coreclr/debug/daccess/request.cpp @@ -720,7 +720,7 @@ ClrDataAccess::GetThreadAllocData(CLRDATA_ADDRESS addr, struct DacpAllocData *da Thread* thread = PTR_Thread(TO_TADDR(addr)); - gc_alloc_context* pAllocContext = thread->GetAllocContext(); + PTR_gc_alloc_context pAllocContext = thread->GetAllocContext(); if (pAllocContext != NULL) { @@ -827,7 +827,7 @@ HRESULT ClrDataAccess::GetThreadDataImpl(CLRDATA_ADDRESS threadAddr, struct Dacp threadData->state = thread->m_State; threadData->preemptiveGCDisabled = thread->m_fPreemptiveGCDisabled; - gc_alloc_context* allocContext = thread->GetAllocContext(); + PTR_gc_alloc_context allocContext = thread->GetAllocContext(); if (allocContext) { threadData->allocContextPtr = TO_CDADDR(allocContext->alloc_ptr); diff --git a/src/coreclr/vm/threads.h b/src/coreclr/vm/threads.h index dfbf0664fe5674..a83a1bc20bbc62 100644 --- a/src/coreclr/vm/threads.h +++ b/src/coreclr/vm/threads.h @@ -448,6 +448,8 @@ class TailCallTls const PortableTailCallFrame* GetFrame() { return m_frame; } }; +typedef DPTR(struct gc_alloc_context) PTR_gc_alloc_context; + // #ThreadClass // // A code:Thread contains all the per-thread information needed by the runtime. We can get this @@ -947,12 +949,12 @@ class Thread // We store a pointer to this thread's alloc context here for easier introspection // from other threads and diagnostic tools - gc_alloc_context* m_alloc_context; + PTR_gc_alloc_context m_alloc_context; public: - inline void InitAllocContext() { LIMITED_METHOD_CONTRACT; m_alloc_context = &t_thread_alloc_context; } + inline void InitAllocContext() { LIMITED_METHOD_CONTRACT; m_alloc_context = PTR_gc_alloc_context(&t_thread_alloc_context); } - inline gc_alloc_context *GetAllocContext() { LIMITED_METHOD_CONTRACT; return m_alloc_context; } + inline PTR_gc_alloc_context GetAllocContext() { LIMITED_METHOD_CONTRACT; return m_alloc_context; } // This is the type handle of the first object in the alloc context at the time // we fire the AllocationTick event. It's only for tooling purpose.