Ejemplo n.º 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);
        }
Ejemplo n.º 2
0
 public SmxDebugFilesTable(FileHeader file, SectionEntry header, SmxNameTable names)
     : base(file, header)
 {
     entries_ = DebugFileEntry.From(file.SectionReader(header), header, names);
 }
Ejemplo n.º 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;
 }