DbiSecCon.cs 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  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. namespace Microsoft.Cci.Pdb {
  13. internal struct DbiSecCon {
  14. internal DbiSecCon(BitAccess bits) {
  15. bits.ReadInt16(out section);
  16. bits.ReadInt16(out pad1);
  17. bits.ReadInt32(out offset);
  18. bits.ReadInt32(out size);
  19. bits.ReadUInt32(out flags);
  20. bits.ReadInt16(out module);
  21. bits.ReadInt16(out pad2);
  22. bits.ReadUInt32(out dataCrc);
  23. bits.ReadUInt32(out relocCrc);
  24. //if (pad1 != 0 || pad2 != 0) {
  25. // throw new PdbException("Invalid DBI section. "+
  26. // "(pad1={0}, pad2={1})",
  27. // pad1, pad2);
  28. //}
  29. }
  30. internal short section; // 0..1
  31. internal short pad1; // 2..3
  32. internal int offset; // 4..7
  33. internal int size; // 8..11
  34. internal uint flags; // 12..15
  35. internal short module; // 16..17
  36. internal short pad2; // 18..19
  37. internal uint dataCrc; // 20..23
  38. internal uint relocCrc; // 24..27
  39. }
  40. }