Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ ReadDebugDirectoryEntries()

static ImmutableArray< DebugDirectoryEntry > System.Reflection.PortableExecutable.PEReader.ReadDebugDirectoryEntries ( BlobReader reader)
inlinestaticpackage

Definition at line 316 of file PEReader.cs.

317 {
318 int num = reader.Length / 28;
319 ImmutableArray<DebugDirectoryEntry>.Builder builder = ImmutableArray.CreateBuilder<DebugDirectoryEntry>(num);
320 for (int i = 0; i < num; i++)
321 {
322 if (reader.ReadInt32() != 0)
323 {
324 throw new BadImageFormatException(System.SR.InvalidDebugDirectoryEntryCharacteristics);
325 }
326 uint stamp = reader.ReadUInt32();
327 ushort majorVersion = reader.ReadUInt16();
328 ushort minorVersion = reader.ReadUInt16();
329 DebugDirectoryEntryType type = (DebugDirectoryEntryType)reader.ReadInt32();
330 int dataSize = reader.ReadInt32();
331 int dataRelativeVirtualAddress = reader.ReadInt32();
332 int dataPointer = reader.ReadInt32();
333 builder.Add(new DebugDirectoryEntry(stamp, majorVersion, minorVersion, type, dataSize, dataRelativeVirtualAddress, dataPointer));
334 }
335 return builder.MoveToImmutable();
336 }
static string InvalidDebugDirectoryEntryCharacteristics
Definition SR.cs:156
Definition SR.cs:7

References System.SR.InvalidDebugDirectoryEntryCharacteristics, System.Reflection.Metadata.BlobReader.ReadInt32(), System.Reflection.Metadata.BlobReader.ReadUInt16(), System.Reflection.Metadata.BlobReader.ReadUInt32(), and System.type.

Referenced by System.Reflection.PortableExecutable.PEReader.ReadDebugDirectory().