예제 #1
0
		public ModuleInfo(IServiceContainer ctx, SpanStream __stream) : base(__stream) {
			DBIReader dbi = ctx.GetService<DBIReader>();
			this.EC = dbi.EC;

			OpenModuleHandle = ReadUInt32();
			SectionContribution = new SectionContrib(this);

			Position += SectionContrib.SIZE;

			Flags = new ModuleInfoFlags(ReadUInt16());
			StreamNumber = ReadInt16();

			SymbolsSize = ReadUInt32();
			LinesSize = ReadUInt32();
			C13LinesSize = ReadUInt32();

			NumberOfFiles = ReadUInt16();
			ReadUInt16();

			FileNameOffsets = ReadUInt32();

			ECInfo = Read<ECInfo>();

			ModuleName = ReadCString();
			ObjectFileName = ReadCString();
		}
예제 #2
0
        public ModuleInfo(IServiceContainer ctx, SpanStream __stream, int modIndex) : base(__stream)
        {
            long savedPosition = Position;

            this.ModuleIndex = modIndex;
            DBIReader dbi = ctx.GetService <DBIReader>();

            this.dbi = dbi;

            MSFReader msf = ctx.GetService <MSFReader>();

            OpenModuleHandle = ReadUInt32();

            switch (msf.FileType)
            {
            case PDBType.Big:
                SectionContribution = new SectionContrib(ctx, this);
                Position           += SectionContrib.SIZE;
                break;

            case PDBType.Small:
                SectionContribution = new SectionContrib40(ctx, this);
                Position           += SectionContrib40.SIZE;
                break;
            }

            Flags        = new ModuleInfoFlags(ReadUInt16());
            StreamNumber = ReadInt16();

            SymbolsSize  = ReadUInt32();
            LinesSize    = ReadUInt32();
            C13LinesSize = ReadUInt32();

            NumberOfFiles = ReadUInt16();
            ReadUInt16();

            FileNameOffsets = ReadUInt32();

            if (msf.FileType == PDBType.Big)
            {
                ECInfo = Read <ECInfo>();
            }
            else
            {
                ECInfo = null;
            }

            ModuleName     = ReadCString();
            ObjectFileName = ReadCString();

            Size = Position - savedPosition;

            ///////

            SectionContribs = new CachedEnumerable <SectionContrib40>(
                this.dbi.SectionContribs.GetByModule(this)
                );
        }