Example #1
0
        public MSFStreamSymbols(MSFStream rawstream, int index)
            : base(rawstream.GetFlattenedBuffer())
        {
            Name = $"DBI Symbols ({index})";

            ParseAllSymbols();
        }
Example #2
0
        public MSFStreamDBIModule(MSFStream rawstream, int index, int dbimoduleindex, uint symbytes, uint linesbytes, uint c13linesbytes)
            : base(rawstream.GetFlattenedBuffer())
        {
            Name = $"DBI Module {dbimoduleindex} ({index})";

            ParseAllSymbols(symbytes);
            ParseAllLines(linesbytes);
            ParseAllC13Lines(c13linesbytes);
        }
Example #3
0
        public MSFStreamPublics(MSFStream rawstream, int index)
            : base(rawstream.GetFlattenedBuffer())
        {
            Name = $"DBI Publics ({index})";

            AddressMap = new List <TypedByteSequence <uint> >();
            Thunks     = new List <TypedByteSequence <uint> >();
            Sections   = new List <SectionMapEntry>();

            ParsePublicsHeader();
            ParseAddressMap();
            ParseThunkMap();
            ParseSectionMap();
        }
Example #4
0
        public static Symbol MakeSymbol(MSFStream stream, TypedByteSequence <ushort> size, TypedByteSequence <ushort> type)
        {
            var seq = new MaskedByteSequence(stream.GetFlattenedBuffer(), stream.GetReadOffset() - 4, size.ExtractedValue + 2, "Symbol");

            switch (type.ExtractedValue)
            {
            case 0x1108:         // S_UDT
                return(new SymbolUDT(stream, size, type, seq));

            case 0x110e:         // S_PUB32
                return(new SymbolPublic(stream, size, type, seq));

            case 0x1125:         // S_PROCREF
                return(new SymbolProcRef(stream, size, type, seq));

            case 0x1136:        // S_SECTION
                return(new SymbolSection(stream, size, type, seq));
            }

            // TODO - count unknown symbols in the stream
            return(new Symbol {
                Size = size, Type = type, CorrespondingByteSequence = seq
            });
        }