Skip to content
Merged
Changes from all commits
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
12 changes: 11 additions & 1 deletion src/TraceEvent/RegisteredTraceEventParser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1046,7 +1046,17 @@ private DynamicTraceEventData.PayloadFetchClassInfo ParseFields(int startField,
else
{
Debug.WriteLine(" Field is an array of size " + ((fixedCount != 0) ? fixedCount.ToString() : "VARIABLE") + " of type " + ((propertyFetch.Type ?? typeof(void))) + " at offset " + arrayFieldOffset.ToString("x"));
propertyFetch = DynamicTraceEventData.PayloadFetch.ArrayPayloadFetch(arrayFieldOffset, propertyFetch, arraySize, fixedCount, projectCharArrayAsString:false);
if (fixedCount != 0)
{
// Use FixedCountArrayPayloadFetch so that Size is set to the total byte size
// (fixedCount * element.Size) rather than just the element count, ensuring that
// subsequent field offsets are computed correctly.
propertyFetch = DynamicTraceEventData.PayloadFetch.FixedCountArrayPayloadFetch(arrayFieldOffset, propertyFetch, fixedCount, projectCharArrayAsString:false);
}
else
{
propertyFetch = DynamicTraceEventData.PayloadFetch.ArrayPayloadFetch(arrayFieldOffset, propertyFetch, arraySize, 0, projectCharArrayAsString:false);
}
}

fieldOffset = ushort.MaxValue; // Indicate that the next offset must be computed at run time.
Expand Down