docs/design/datacontracts/Notifications.md
This contract is for debugger notifications.
// Set the GC notification for condemned generations
// The argument is a bitmask where the i-th bit set represents the i-th generation.
void SetGcNotification(int condemnedGeneration);
Data descriptors used: none
Global variables used:
| Global Name | Type | Purpose |
|---|---|---|
GcNotificationFlags | TargetPointer | Global flag for storing GC notification data |
Contracts used: none
void SetGcNotification(int condemnedGeneration)
{
TargetPointer pGcNotificationFlags = _target.ReadGlobalPointer("GcNotificationFlags");
uint currentFlags = _target.Read<uint>(pGcNotificationFlags);
if (condemnedGeneration == 0)
_target.Write<uint>(pGcNotificationFlags, 0);
else
{
_target.Write<uint>(pGcNotificationFlags, (uint)(currentFlags | condemnedGeneration));
}
}