Click here to Skip to main content
15,893,588 members
Articles / Programming Languages / C#

Building .NET Coverage Tool

Rate me:
Please Sign up or sign in to vote.
4.94/5 (34 votes)
25 Aug 2009MIT8 min read 85.4K   2.3K   109  
This article is a walkthrough for building a .NET coverage tool
//-----------------------------------------------------------------------------
//
// Copyright (C) Microsoft Corporation.  All Rights Reserved.
//
//-----------------------------------------------------------------------------
using System;

namespace Microsoft.Cci.Pdb {
  internal struct DbiHeader {
    internal DbiHeader(BitAccess bits) {
      bits.ReadInt32(out sig);
      bits.ReadInt32(out ver);
      bits.ReadInt32(out age);
      bits.ReadInt16(out gssymStream);
      bits.ReadUInt16(out vers);
      bits.ReadInt16(out pssymStream);
      bits.ReadUInt16(out pdbver);
      bits.ReadInt16(out symrecStream);
      bits.ReadUInt16(out pdbver2);
      bits.ReadInt32(out gpmodiSize);
      bits.ReadInt32(out secconSize);
      bits.ReadInt32(out secmapSize);
      bits.ReadInt32(out filinfSize);
      bits.ReadInt32(out tsmapSize);
      bits.ReadInt32(out mfcIndex);
      bits.ReadInt32(out dbghdrSize);
      bits.ReadInt32(out ecinfoSize);
      bits.ReadUInt16(out flags);
      bits.ReadUInt16(out machine);
      bits.ReadInt32(out reserved);
    }

    internal int sig;                        // 0..3
    internal int ver;                        // 4..7
    internal int age;                        // 8..11
    internal short gssymStream;                // 12..13
    internal ushort vers;                       // 14..15
    internal short pssymStream;                // 16..17
    internal ushort pdbver;                     // 18..19
    internal short symrecStream;               // 20..21
    internal ushort pdbver2;                    // 22..23
    internal int gpmodiSize;                 // 24..27
    internal int secconSize;                 // 28..31
    internal int secmapSize;                 // 32..35
    internal int filinfSize;                 // 36..39
    internal int tsmapSize;                  // 40..43
    internal int mfcIndex;                   // 44..47
    internal int dbghdrSize;                 // 48..51
    internal int ecinfoSize;                 // 52..55
    internal ushort flags;                      // 56..57
    internal ushort machine;                    // 58..59
    internal int reserved;                   // 60..63
  }
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The MIT License


Written By
Software Developer (Senior)
United Kingdom United Kingdom
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions