Exemple #1
0
        public static DebugFileEntry[] From(BinaryReader rd, SectionEntry header, SmxNameTable names)
        {
            if (header.Size % Size != 0)
            {
                throw new Exception("invalid debug file table size");
            }
            var count   = header.Size / Size;
            var entries = new DebugFileEntry[count];

            for (var i = 0; i < count; i++)
            {
                var entry = new DebugFileEntry();
                entry.Address  = rd.ReadUInt32();
                entry.nameoffs = rd.ReadInt32();
                entry.Name     = names.StringAt(entry.nameoffs);
                entries[i]     = entry;
            }
            return(entries);
        }
Exemple #2
0
 public SmxDebugFilesTable(FileHeader file, SectionEntry header, SmxNameTable names)
     : base(file, header)
 {
     entries_ = DebugFileEntry.From(file.SectionReader(header), header, names);
 }
Exemple #3
0
 public static DebugFileEntry[] From(BinaryReader rd, SectionEntry header, SmxNameTable names)
 {
     if (header.Size % Size != 0)
         throw new Exception("invalid debug file table size");
     var count = header.Size / Size;
     var entries = new DebugFileEntry[count];
     for (var i = 0; i < count; i++)
     {
         var entry = new DebugFileEntry();
         entry.Address = rd.ReadUInt32();
         entry.nameoffs = rd.ReadInt32();
         entry.Name = names.StringAt(entry.nameoffs);
         entries[i] = entry;
     }
     return entries;
 }