Repository: dotnet/runtime
File: src/coreclr/inc/dacprivate.h (C/C++)

Code before:
    CLRDATA_ADDRESS pDynamicClassTable = 0;
    CLRDATA_ADDRESS pGCStaticDataStart = 0;
    CLRDATA_ADDRESS pNonGCStaticDataStart = 0;

    // Called when you have a pointer to the DomainLocalModule
    HRESULT Request(ISOSDacInterface *sos, CLRDATA_ADDRESS addr)
    {
        return sos->GetDomainLocalModuleData(addr, this);
    }
};


struct MSLAYOUT DacpThreadLocalModuleData
{
    // These two parameters are used as input params when calling the
    // no-argument form of Request below.
    CLRDATA_ADDRESS threadAddr = 0;
    ULONG64 ModuleIndex = 0;

    CLRDATA_ADDRESS pClassData = 0;
    CLRDATA_ADDRESS pDynamicClassTable = 0;
    CLRDATA_ADDRESS pGCStaticDataStart = 0;
    CLRDATA_ADDRESS pNonGCStaticDataStart = 0;
};

enum ModuleFlags {IS_REFLECTION_EMIT = 0x00000040};

struct MSLAYOUT DacpModuleData
{
    CLRDATA_ADDRESS Address = 0;
    CLRDATA_ADDRESS PEAssembly = 0; // Actually the module address in .NET 9+
    CLRDATA_ADDRESS ilBase = 0;
    CLRDATA_ADDRESS metadataStart = 0;
    ULONG64 metadataSize = 0;
    CLRDATA_ADDRESS Assembly = 0; // Assembly pointer
    BOOL bIsReflection = FALSE;
    BOOL bIsPEFile = FALSE;
    ULONG64 dwBaseClassIndex = 0;
    ULONG64 dwModuleID = 0;

    DWORD dwTransientFlags = 0;

    CLRDATA_ADDRESS TypeDefToMethodTableMap = 0;
    CLRDATA_ADDRESS TypeRefToMethodTableMap = 0;
    CLRDATA_ADDRESS MethodDefToDescMap = 0;
    CLRDATA_ADDRESS FieldDefToDescMap = 0;
    CLRDATA_ADDRESS MemberRefToDescMap = 0;
    CLRDATA_ADDRESS FileReferencesMap = 0;
    CLRDATA_ADDRESS ManifestModuleReferencesMap = 0;

    CLRDATA_ADDRESS LoaderAllocator = 0;

Review comment (suggestion):
Should this be EditAndContinue instead of RefEmit to match what SOS needs? https://github.com/dotnet/diagnostics/pull/5715/files#diff-d35a7b5d66dc64f79dbf4b9f236b5ce2b7a9bc8d8d97d1e609f94334dc03f4ddR3954

Code after:
    CLRDATA_ADDRESS pDynamicClassTable = 0;
    CLRDATA_ADDRESS pGCStaticDataStart = 0;
    CLRDATA_ADDRESS pNonGCStaticDataStart = 0;

    // Called when you have a pointer to the DomainLocalModule
    HRESULT Request(ISOSDacInterface *sos, CLRDATA_ADDRESS addr)
    {
        return sos->GetDomainLocalModuleData(addr, this);
    }
};


struct MSLAYOUT DacpThreadLocalModuleData
{
    // These two parameters are used as input params when calling the
    // no-argument form of Request below.
    CLRDATA_ADDRESS threadAddr = 0;
    ULONG64 ModuleIndex = 0;

    CLRDATA_ADDRESS pClassData = 0;
    CLRDATA_ADDRESS pDynamicClassTable = 0;
    CLRDATA_ADDRESS pGCStaticDataStart = 0;
    CLRDATA_ADDRESS pNonGCStaticDataStart = 0;
};

struct MSLAYOUT DacpModuleData
{
    enum TransientFlags
    {
        IsEditAndContinue = 0x00000208, // Flags for .NET Framework (0x00000200) and .NET Core (0x00000008)
    };

    CLRDATA_ADDRESS Address = 0;
    CLRDATA_ADDRESS PEAssembly = 0; // Actually the module address in .NET 9+
    CLRDATA_ADDRESS ilBase = 0;
    CLRDATA_ADDRESS metadataStart = 0;
    ULONG64 metadataSize = 0;
    CLRDATA_ADDRESS Assembly = 0; // Assembly pointer
    BOOL bIsReflection = FALSE;
    BOOL bIsPEFile = FALSE;
    ULONG64 dwBaseClassIndex = 0;
    ULONG64 dwModuleID = 0;

    DWORD dwTransientFlags = 0;

    CLRDATA_ADDRESS TypeDefToMethodTableMap = 0;
    CLRDATA_ADDRESS TypeRefToMethodTableMap = 0;
    CLRDATA_ADDRESS MethodDefToDescMap = 0;
    CLRDATA_ADDRESS FieldDefToDescMap = 0;
    CLRDATA_ADDRESS MemberRefToDescMap = 0;
    CLRDATA_ADDRESS FileReferencesMap = 0;