private static int WriteCodeViewData(BlobBuilder builder, string pdbPath, Guid pdbGuid) { int start = builder.Count; builder.WriteByte((byte)'R'); builder.WriteByte((byte)'S'); builder.WriteByte((byte)'D'); builder.WriteByte((byte)'S'); // PDB id: builder.WriteGuid(pdbGuid); // age builder.WriteUInt32(1); // UTF-8 encoded zero-terminated path to PDB int pathStart = builder.Count; builder.WriteUTF8(pdbPath, allowUnpairedSurrogates: true); builder.WriteByte(0); return builder.Count - start; }