}
-BOOL DacValidateMethodTable(MethodTable *pMT, BOOL &bIsFree)
+BOOL DacValidateMethodTable(PTR_MethodTable pMT, BOOL &bIsFree)
{
// Verify things are right.
BOOL retval = FALSE;
SOSDacEnter();
- MethodTable* mTable = PTR_MethodTable(TO_TADDR(mt));
+ PTR_MethodTable mTable = PTR_MethodTable(TO_TADDR(mt));
BOOL bIsFree = FALSE;
if (!DacValidateMethodTable(mTable, bIsFree))
{
SOSDacEnter();
TADDR mtTADDR = DACGetMethodTableFromObjectPointer(TO_TADDR(obj), m_pTarget);
- MethodTable *mt = PTR_MethodTable(mtTADDR);
+ PTR_MethodTable mt = PTR_MethodTable(mtTADDR);
// Object must be a string
BOOL bFree = FALSE;
// Don't turn the Object into a pointer, it is too costly on
// scans of the gc heap.
- MethodTable *mt = NULL;
+ PTR_MethodTable mt = NULL;
TADDR mtTADDR = DACGetMethodTableFromObjectPointer(CLRDATA_ADDRESS_TO_TADDR(obj), m_pTarget);
if (mtTADDR != NULL)
mt = PTR_MethodTable(mtTADDR);
SOSDacEnter();
- MethodTable* pMT = PTR_MethodTable(TO_TADDR(mt));
+ PTR_MethodTable pMT = PTR_MethodTable(TO_TADDR(mt));
BOOL bIsFree = FALSE;
if (!DacValidateMethodTable(pMT, bIsFree))
{
SOSDacEnter();
- MethodTable *pMT = PTR_MethodTable(TO_TADDR(mt));
+ PTR_MethodTable pMT = PTR_MethodTable(TO_TADDR(mt));
BOOL free = FALSE;
if (mt == HOST_CDADDR(g_pFreeObjectMethodTable))
SOSDacEnter();
- MethodTable* pMT = PTR_MethodTable(TO_TADDR(mt));
+ PTR_MethodTable pMT = PTR_MethodTable(TO_TADDR(mt));
BOOL bIsFree = FALSE;
if (!pMT || !DacValidateMethodTable(pMT, bIsFree))
{
SOSDacEnter();
- MethodTable* pMT = PTR_MethodTable(TO_TADDR(mt));
+ PTR_MethodTable pMT = PTR_MethodTable(TO_TADDR(mt));
BOOL bIsFree = FALSE;
if (!pMT || !DacValidateMethodTable(pMT, bIsFree))
{
SOSDacEnter();
- MethodTable *pMT = PTR_MethodTable(TO_TADDR(mt));
+ PTR_MethodTable pMT = PTR_MethodTable(TO_TADDR(mt));
BOOL bIsFree = FALSE;
if (!DacValidateMethodTable(pMT, bIsFree))
{
hr = E_INVALIDARG;
BOOL bFree = FALSE;
- MethodTable *mt = NULL;
+ PTR_MethodTable mt = NULL;
if (SUCCEEDED(hr))
{
mt = PTR_MethodTable(mtTADDR);
hr = E_INVALIDARG;
BOOL bFree = FALSE;
- MethodTable *mt = NULL;
+ PTR_MethodTable mt = NULL;
if (SUCCEEDED(hr))
{
mt = PTR_MethodTable(mtTADDR);
DWORD size = GetEndOffsetOfOptionalMembers();
DacEnumMemoryRegion(dac_cast<TADDR>(this), size);
+ // Make sure the GCDescs are added to the dump
+ if (ContainsPointers())
+ {
+ PTR_CGCDesc gcdesc = CGCDesc::GetCGCDescFromMT(this);
+ size_t size = gcdesc->GetSize();
+ // Manually calculate the start of the GCDescs because CGCDesc::GetStartOfGCData() isn't DAC'ified.
+ TADDR gcdescStart = dac_cast<TADDR>(this) - size;
+ DacEnumMemoryRegion(gcdescStart, size);
+ }
+
if (!IsCanonicalMethodTable())
{
PTR_MethodTable pMTCanonical = GetCanonicalMethodTable();