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