Debian Codegraph @

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

raw
1 //-----------------------------------------------------------------------------
2 //
3 // Copyright (c) Microsoft. All rights reserved.
4 // This code is licensed under the Microsoft Public License.
5 // THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF
6 // ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY
7 // IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR
8 // PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.
9 //
10 //-----------------------------------------------------------------------------
11 using System;
12
13 namespace Microsoft.Cci.Pdb {
14 internal class DbiModuleInfo {
15 internal DbiModuleInfo(BitAccess bits, bool readStrings) {
16 bits.ReadInt32(out opened);
17 new DbiSecCon(bits);
18 bits.ReadUInt16(out flags);
19 bits.ReadInt16(out stream);
20 bits.ReadInt32(out cbSyms);
21 bits.ReadInt32(out cbOldLines);
22 bits.ReadInt32(out cbLines);
23 bits.ReadInt16(out files);
24 bits.ReadInt16(out pad1);
25 bits.ReadUInt32(out offsets);
26 bits.ReadInt32(out niSource);
27 bits.ReadInt32(out niCompiler);
28 if (readStrings) {
29 bits.ReadCString(out moduleName);
30 bits.ReadCString(out objectName);
31 } else {
32 bits.SkipCString(out moduleName);
33 bits.SkipCString(out objectName);
34 }
35 bits.Align(4);
36 //if (opened != 0 || pad1 != 0) {
37 // throw new PdbException("Invalid DBI module. "+
38 // "(opened={0}, pad={1})", opened, pad1);
39 //}
40 }
41
42 internal int opened; // 0..3
43 //internal DbiSecCon section; // 4..31
44 internal ushort flags; // 32..33
45 internal short stream; // 34..35
46 internal int cbSyms; // 36..39
47 internal int cbOldLines; // 40..43
48 internal int cbLines; // 44..57
49 internal short files; // 48..49
50 internal short pad1; // 50..51
51 internal uint offsets;
52 internal int niSource;
53 internal int niCompiler;
54 internal string moduleName;
55 internal string objectName;
56 }
57 }