PageRenderTime 30ms CodeModel.GetById 19ms app.highlight 7ms RepoModel.GetById 1ms app.codeStats 1ms

/symbols/pdb/Microsoft.Cci.Pdb/DbiModuleInfo.cs

http://github.com/jbevain/cecil
C# | 50 lines | 40 code | 3 blank | 7 comment | 2 complexity | 7d686a32cfd98357e140e37a4fadc780 MD5 | raw file
 1// Copyright (c) Microsoft. All rights reserved.
 2// Licensed under the MIT license. See LICENSE file in the project root for full license information.
 3
 4using System;
 5
 6namespace Microsoft.Cci.Pdb {
 7  internal class DbiModuleInfo {
 8    internal DbiModuleInfo(BitAccess bits, bool readStrings) {
 9      bits.ReadInt32(out opened);
10      new DbiSecCon(bits);
11      bits.ReadUInt16(out flags);
12      bits.ReadInt16(out stream);
13      bits.ReadInt32(out cbSyms);
14      bits.ReadInt32(out cbOldLines);
15      bits.ReadInt32(out cbLines);
16      bits.ReadInt16(out files);
17      bits.ReadInt16(out pad1);
18      bits.ReadUInt32(out offsets);
19      bits.ReadInt32(out niSource);
20      bits.ReadInt32(out niCompiler);
21      if (readStrings) {
22        bits.ReadCString(out moduleName);
23        bits.ReadCString(out objectName);
24      } else {
25        bits.SkipCString(out moduleName);
26        bits.SkipCString(out objectName);
27      }
28      bits.Align(4);
29      //if (opened != 0 || pad1 != 0) {
30      //  throw new PdbException("Invalid DBI module. "+
31      //                                 "(opened={0}, pad={1})", opened, pad1);
32      //}
33    }
34
35    internal int opened;                 //  0..3
36    //internal DbiSecCon section;                //  4..31
37    internal ushort flags;                  // 32..33
38    internal short stream;                 // 34..35
39    internal int cbSyms;                 // 36..39
40    internal int cbOldLines;             // 40..43
41    internal int cbLines;                // 44..57
42    internal short files;                  // 48..49
43    internal short pad1;                   // 50..51
44    internal uint offsets;
45    internal int niSource;
46    internal int niCompiler;
47    internal string moduleName;
48    internal string objectName;
49  }
50}