コード例 #1
0
ファイル: DbiModuleInfo.cs プロジェクト: halukmy/CryMono
 internal DbiModuleInfo(BitAccess bits, bool readStrings) {
   bits.ReadInt32(out opened);
   section = new DbiSecCon(bits);
   bits.ReadUInt16(out flags);
   bits.ReadInt16(out stream);
   bits.ReadInt32(out cbSyms);
   bits.ReadInt32(out cbOldLines);
   bits.ReadInt32(out cbLines);
   bits.ReadInt16(out files);
   bits.ReadInt16(out pad1);
   bits.ReadUInt32(out offsets);
   bits.ReadInt32(out niSource);
   bits.ReadInt32(out niCompiler);
   if (readStrings) {
     bits.ReadCString(out moduleName);
     bits.ReadCString(out objectName);
   } else {
     bits.SkipCString(out moduleName);
     bits.SkipCString(out objectName);
   }
   bits.Align(4);
   //if (opened != 0 || pad1 != 0) {
   //  throw new PdbException("Invalid DBI module. "+
   //                                 "(opened={0}, pad={1})", opened, pad1);
   //}
 }
コード例 #2
0
 internal DbiModuleInfo(BitAccess bits, bool readStrings)
 {
     bits.ReadInt32(out opened);
     new DbiSecCon(bits);
     bits.ReadUInt16(out flags);
     bits.ReadInt16(out stream);
     bits.ReadInt32(out cbSyms);
     bits.ReadInt32(out cbOldLines);
     bits.ReadInt32(out cbLines);
     bits.ReadInt16(out files);
     bits.ReadInt16(out pad1);
     bits.ReadUInt32(out offsets);
     bits.ReadInt32(out niSource);
     bits.ReadInt32(out niCompiler);
     if (readStrings)
     {
         bits.ReadCString(out moduleName);
         bits.ReadCString(out objectName);
     }
     else
     {
         bits.SkipCString(out moduleName);
         bits.SkipCString(out objectName);
     }
     bits.Align(4);
     //if (opened != 0 || pad1 != 0) {
     //  throw new PdbException("Invalid DBI module. "+
     //                                 "(opened={0}, pad={1})", opened, pad1);
     //}
 }
コード例 #3
0
ファイル: DbiSecCon.cs プロジェクト: Refresh06/visualmutator
 internal DbiSecCon(BitAccess bits) {
   bits.ReadInt16(out section);
   bits.ReadInt16(out pad1);
   bits.ReadInt32(out offset);
   bits.ReadInt32(out size);
   bits.ReadUInt32(out flags);
   bits.ReadInt16(out module);
   bits.ReadInt16(out pad2);
   bits.ReadUInt32(out dataCrc);
   bits.ReadUInt32(out relocCrc);
   //if (pad1 != 0 || pad2 != 0) {
   //  throw new PdbException("Invalid DBI section. "+
   //                                 "(pad1={0}, pad2={1})",
   //                         pad1, pad2);
   //}
 }
コード例 #4
0
 internal DbiSecCon(BitAccess bits)
 {
     bits.ReadInt16(out section);
     bits.ReadInt16(out pad1);
     bits.ReadInt32(out offset);
     bits.ReadInt32(out size);
     bits.ReadUInt32(out flags);
     bits.ReadInt16(out module);
     bits.ReadInt16(out pad2);
     bits.ReadUInt32(out dataCrc);
     bits.ReadUInt32(out relocCrc);
     //if (pad1 != 0 || pad2 != 0) {
     //  throw new PdbException("Invalid DBI section. "+
     //                                 "(pad1={0}, pad2={1})",
     //                         pad1, pad2);
     //}
 }
コード例 #5
0
ファイル: DbiHeader.cs プロジェクト: modulexcite/IL2JS
 internal DbiHeader(BitAccess bits) {
   bits.ReadInt32(out sig);
   bits.ReadInt32(out ver);
   bits.ReadInt32(out age);
   bits.ReadInt16(out gssymStream);
   bits.ReadUInt16(out vers);
   bits.ReadInt16(out pssymStream);
   bits.ReadUInt16(out pdbver);
   bits.ReadInt16(out symrecStream);
   bits.ReadUInt16(out pdbver2);
   bits.ReadInt32(out gpmodiSize);
   bits.ReadInt32(out secconSize);
   bits.ReadInt32(out secmapSize);
   bits.ReadInt32(out filinfSize);
   bits.ReadInt32(out tsmapSize);
   bits.ReadInt32(out mfcIndex);
   bits.ReadInt32(out dbghdrSize);
   bits.ReadInt32(out ecinfoSize);
   bits.ReadUInt16(out flags);
   bits.ReadUInt16(out machine);
   bits.ReadInt32(out reserved);
 }
コード例 #6
0
ファイル: DbiHeader.cs プロジェクト: xuan2261/ILMerge
 internal DbiHeader(BitAccess bits)
 {
     bits.ReadInt32(out sig);
     bits.ReadInt32(out ver);
     bits.ReadInt32(out age);
     bits.ReadInt16(out gssymStream);
     bits.ReadUInt16(out vers);
     bits.ReadInt16(out pssymStream);
     bits.ReadUInt16(out pdbver);
     bits.ReadInt16(out symrecStream);
     bits.ReadUInt16(out pdbver2);
     bits.ReadInt32(out gpmodiSize);
     bits.ReadInt32(out secconSize);
     bits.ReadInt32(out secmapSize);
     bits.ReadInt32(out filinfSize);
     bits.ReadInt32(out tsmapSize);
     bits.ReadInt32(out mfcIndex);
     bits.ReadInt32(out dbghdrSize);
     bits.ReadInt32(out ecinfoSize);
     bits.ReadUInt16(out flags);
     bits.ReadUInt16(out machine);
     bits.ReadInt32(out reserved);
 }
コード例 #7
0
ファイル: PdbConstant.cs プロジェクト: taktopiyush/cci
        internal PdbConstant(BitAccess bits)
        {
            bits.ReadUInt32(out this.token);
            byte tag1;

            bits.ReadUInt8(out tag1);
            byte tag2;

            bits.ReadUInt8(out tag2);
            if (tag2 == 0)
            {
                this.value = tag1;
            }
            else if (tag2 == 0x80)
            {
                switch (tag1)
                {
                case 0x00: //sbyte
                    sbyte sb;
                    bits.ReadInt8(out sb);
                    this.value = sb;
                    break;

                case 0x01: //short
                    short s;
                    bits.ReadInt16(out s);
                    this.value = s;
                    break;

                case 0x02: //ushort
                    ushort us;
                    bits.ReadUInt16(out us);
                    this.value = us;
                    break;

                case 0x03: //int
                    int i;
                    bits.ReadInt32(out i);
                    this.value = i;
                    break;

                case 0x04: //uint
                    uint ui;
                    bits.ReadUInt32(out ui);
                    this.value = ui;
                    break;

                case 0x05: //float
                    this.value = bits.ReadFloat();
                    break;

                case 0x06: //double
                    this.value = bits.ReadDouble();
                    break;

                case 0x09: //long
                    long sl;
                    bits.ReadInt64(out sl);
                    this.value = sl;
                    break;

                case 0x0a: //ulong
                    ulong ul;
                    bits.ReadUInt64(out ul);
                    this.value = ul;
                    break;

                case 0x10: //string
                    string str;
                    bits.ReadBString(out str);
                    this.value = str;
                    break;

                case 0x19: //decimal
                    this.value = bits.ReadDecimal();
                    break;

                default:
                    //TODO: error
                    break;
                }
            }
            else
            {
                //TODO: error
            }
            bits.ReadCString(out name);
        }
コード例 #8
0
 internal PdbConstant(BitAccess bits)
 {
   bits.ReadUInt32(out this.token);
   byte tag1;
   bits.ReadUInt8(out tag1);
   byte tag2;
   bits.ReadUInt8(out tag2);
   if (tag2 == 0)
   {
     this.value = tag1;
   }
   else if (tag2 == 0x80)
   {
     switch (tag1)
     {
       case 0x00: //sbyte
         sbyte sb;
         bits.ReadInt8(out sb);
         this.value = sb;
         break;
       case 0x01: //short
         short s;
         bits.ReadInt16(out s);
         this.value = s;
         break;
       case 0x02: //ushort
         ushort us;
         bits.ReadUInt16(out us);
         this.value = us;
         break;
       case 0x03: //int
         int i;
         bits.ReadInt32(out i);
         this.value = i;
         break;
       case 0x04: //uint
         uint ui;
         bits.ReadUInt32(out ui);
         this.value = ui;
         break;
       case 0x05: //float
         this.value = bits.ReadFloat();
         break;
       case 0x06: //double
         this.value = bits.ReadDouble();
         break;
       case 0x09: //long
         long sl;
         bits.ReadInt64(out sl);
         this.value = sl;
         break;
       case 0x0a: //ulong
         ulong ul;
         bits.ReadUInt64(out ul);
         this.value = ul;
         break;
       case 0x10: //string
         string str;
         bits.ReadBString(out str);
         this.value = str;
         break;
       case 0x19: //decimal
         this.value = bits.ReadDecimal();
         break;
       default:
         //TODO: error
         break;
     }
   }
   else
   {
     //TODO: error
   }
   bits.ReadCString(out name);
 }
コード例 #9
0
ファイル: PdbConstant.cs プロジェクト: RoqueDeicide/CryCIL
 internal PdbConstant(BitAccess bits)
 {
     bits.ReadUInt32(out this.Token);
     byte tag1;
     bits.ReadUInt8(out tag1);
     byte tag2;
     bits.ReadUInt8(out tag2);
     switch (tag2)
     {
         case 0:
             this.Value = tag1;
             break;
         case 0x80:
             switch (tag1)
             {
                 case 0x01: //short
                     short s;
                     bits.ReadInt16(out s);
                     this.Value = s;
                     break;
                 case 0x02: //ushort
                     ushort us;
                     bits.ReadUInt16(out us);
                     this.Value = us;
                     break;
                 case 0x03: //int
                     int i;
                     bits.ReadInt32(out i);
                     this.Value = i;
                     break;
                 case 0x04: //uint
                     uint ui;
                     bits.ReadUInt32(out ui);
                     this.Value = ui;
                     break;
                 case 0x05: //float
                     this.Value = bits.ReadFloat();
                     break;
                 case 0x06: //double
                     this.Value = bits.ReadDouble();
                     break;
                 case 0x09: //long
                     long sl;
                     bits.ReadInt64(out sl);
                     this.Value = sl;
                     break;
                 case 0x0a: //ulong
                     ulong ul;
                     bits.ReadUInt64(out ul);
                     this.Value = ul;
                     break;
                 case 0x10: //string
                     string str;
                     bits.ReadBString(out str);
                     this.Value = str;
                     break;
                 case 0x19: //decimal
                     this.Value = bits.ReadDecimal();
                     break;
             }
             break;
     }
     bits.ReadCString(out this.Name);
 }
コード例 #10
0
        internal PdbConstant(BitAccess bits)
        {
            bits.ReadUInt32(out this.Token);
            byte tag1;

            bits.ReadUInt8(out tag1);
            byte tag2;

            bits.ReadUInt8(out tag2);
            switch (tag2)
            {
            case 0:
                this.Value = tag1;
                break;

            case 0x80:
                switch (tag1)
                {
                case 0x01:                                 //short
                    short s;
                    bits.ReadInt16(out s);
                    this.Value = s;
                    break;

                case 0x02:                                 //ushort
                    ushort us;
                    bits.ReadUInt16(out us);
                    this.Value = us;
                    break;

                case 0x03:                                 //int
                    int i;
                    bits.ReadInt32(out i);
                    this.Value = i;
                    break;

                case 0x04:                                 //uint
                    uint ui;
                    bits.ReadUInt32(out ui);
                    this.Value = ui;
                    break;

                case 0x05:                                 //float
                    this.Value = bits.ReadFloat();
                    break;

                case 0x06:                                 //double
                    this.Value = bits.ReadDouble();
                    break;

                case 0x09:                                 //long
                    long sl;
                    bits.ReadInt64(out sl);
                    this.Value = sl;
                    break;

                case 0x0a:                                 //ulong
                    ulong ul;
                    bits.ReadUInt64(out ul);
                    this.Value = ul;
                    break;

                case 0x10:                                 //string
                    string str;
                    bits.ReadBString(out str);
                    this.Value = str;
                    break;

                case 0x19:                                 //decimal
                    this.Value = bits.ReadDecimal();
                    break;
                }
                break;
            }
            bits.ReadCString(out this.Name);
        }