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