Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/coreclr/debug/runtimeinfo/datadescriptor.h
Original file line number Diff line number Diff line change
Expand Up @@ -968,6 +968,7 @@ CDAC_GLOBAL_POINTER(StringMethodTable, &::g_pStringClass)
CDAC_GLOBAL_POINTER(SyncTableEntries, &::g_pSyncTable)
CDAC_GLOBAL_POINTER(MiniMetaDataBuffAddress, &::g_MiniMetaDataBuffAddress)
CDAC_GLOBAL_POINTER(MiniMetaDataBuffMaxSize, &::g_MiniMetaDataBuffMaxSize)
CDAC_GLOBAL_POINTER(DacNotificationFlags, &::g_dacNotificationFlags)
#ifdef STRESS_LOG
CDAC_GLOBAL(StressLogEnabled, uint8, 1)
CDAC_GLOBAL_POINTER(StressLog, &g_pStressLog)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ public static class Globals

public const string MiniMetaDataBuffAddress = nameof(MiniMetaDataBuffAddress);
public const string MiniMetaDataBuffMaxSize = nameof(MiniMetaDataBuffMaxSize);
public const string DacNotificationFlags = nameof(DacNotificationFlags);

public const string StressLogEnabled = nameof(StressLogEnabled);
public const string StressLogHasModuleTable = nameof(StressLogHasModuleTable);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
using System;
using System.Runtime.InteropServices;
using System.Runtime.InteropServices.Marshalling;
using System.Diagnostics;

namespace Microsoft.Diagnostics.DataContractReader.Legacy;

Expand Down Expand Up @@ -210,8 +211,27 @@ int IXCLRDataProcess.SetCodeNotifications(
=> _legacyProcess is not null ? _legacyProcess.SetCodeNotifications(numTokens, mods, singleMod, tokens, flags, singleFlags) : HResults.E_NOTIMPL;

int IXCLRDataProcess.GetOtherNotificationFlags(uint* flags)
=> _legacyProcess is not null ? _legacyProcess.GetOtherNotificationFlags(flags) : HResults.E_NOTIMPL;

{
int hr = HResults.S_OK;
try
{
*flags = _target.Read<uint>(_target.ReadGlobalPointer(Constants.Globals.DacNotificationFlags));
}
catch (System.Exception ex)
{
return ex.HResult;
}
#if DEBUG
if (_legacyProcess is not null)
{
uint flagsLocal;
int hrLocal = _legacyProcess.GetOtherNotificationFlags(&flagsLocal);
Debug.Assert(hrLocal == HResults.S_OK, $"cDAC: {hr:x}, DAC: {hrLocal:x}");
Debug.Assert(*flags == flagsLocal);
}
#endif
return hr;
}
int IXCLRDataProcess.SetOtherNotificationFlags(uint flags)
=> _legacyProcess is not null ? _legacyProcess.SetOtherNotificationFlags(flags) : HResults.E_NOTIMPL;

Expand Down
Loading