update MEF to preview 9
[mcs.git] / tools / pdb2mdb / DbiModuleInfo.cs
bloba9a5b2ab2351ae2d440111cfc4d6e88cfc690446
1 //-----------------------------------------------------------------------------
2 //
3 // Copyright (C) Microsoft Corporation. All Rights Reserved.
4 //
5 //-----------------------------------------------------------------------------
6 using System;
8 namespace Microsoft.Cci.Pdb {
9 internal class DbiModuleInfo {
10 internal DbiModuleInfo(BitAccess bits, bool readStrings) {
11 bits.ReadInt32(out opened);
12 section = new DbiSecCon(bits);
13 bits.ReadUInt16(out flags);
14 bits.ReadInt16(out stream);
15 bits.ReadInt32(out cbSyms);
16 bits.ReadInt32(out cbOldLines);
17 bits.ReadInt32(out cbLines);
18 bits.ReadInt16(out files);
19 bits.ReadInt16(out pad1);
20 bits.ReadUInt32(out offsets);
21 bits.ReadInt32(out niSource);
22 bits.ReadInt32(out niCompiler);
23 if (readStrings) {
24 bits.ReadCString(out moduleName);
25 bits.ReadCString(out objectName);
26 } else {
27 bits.SkipCString(out moduleName);
28 bits.SkipCString(out objectName);
30 bits.Align(4);
31 //if (opened != 0 || pad1 != 0) {
32 // throw new PdbException("Invalid DBI module. "+
33 // "(opened={0}, pad={1})", opened, pad1);
34 //}
37 internal int opened; // 0..3
38 internal DbiSecCon section; // 4..31
39 internal ushort flags; // 32..33
40 internal short stream; // 34..35
41 internal int cbSyms; // 36..39
42 internal int cbOldLines; // 40..43
43 internal int cbLines; // 44..57
44 internal short files; // 48..49
45 internal short pad1; // 50..51
46 internal uint offsets;
47 internal int niSource;
48 internal int niCompiler;
49 internal string moduleName;
50 internal string objectName;