Click here to Skip to main content
11,479,412 members (37,606 online)
Click here to Skip to main content
Articles » Languages » C# » Applications » Downloads
Add your own
alternative version

Building .NET Coverage Tool

, 25 Aug 2009 MIT 45.4K 1.7K 106
This article is a walkthrough for building a .NET coverage tool
Coverage.NET_demo.zip
TestApp
TestApp.exe
TestApp.pdb
Tool
Coverage.Counter.dll
Coverage.exe
Mono.Cecil.dll
Mono.Tools.Pdb2Mdb.dll
Coverage.NET_src.zip
Coverage
Common
Instrument
Properties
Report
Coverage.Counter
Properties
Mono.Cecil
src
AUTHORS
ChangeLog
CodeGen
cecil-gen-attributes.rb
cecil-gen-sources.rb
cecil-gen-tests.rb
cecil-gen-types.rb
cecil-gen.rb
cecil-mig.rb
cecil-update-rev
templates
configure
default.build
Makefile
mono-cecil.pc.in
Mono.Cecil
Mono.Cecil.Binary
Mono.Cecil.Cil
Mono.Cecil.dll.sources
Mono.Cecil.Metadata
Mono.Cecil.Signatures
Mono.Xml
ChangeLog
NEWS
README
standalone.make
TODO
Mono.Tools.Pdb2Mdb
Properties
src
ChangeLog
LICENSE
Makefile
pdb2mdb.exe.sources
//-----------------------------------------------------------------------------
//
// Copyright (C) Microsoft Corporation.  All Rights Reserved.
//
//-----------------------------------------------------------------------------
using System;

namespace Microsoft.Cci.Pdb {
  internal class DbiModuleInfo {
    internal DbiModuleInfo(BitAccess bits, bool readStrings) {
      bits.ReadInt32(out opened);
      section = new DbiSecCon(bits);
      bits.ReadUInt16(out flags);
      bits.ReadInt16(out stream);
      bits.ReadInt32(out cbSyms);
      bits.ReadInt32(out cbOldLines);
      bits.ReadInt32(out cbLines);
      bits.ReadInt16(out files);
      bits.ReadInt16(out pad1);
      bits.ReadUInt32(out offsets);
      bits.ReadInt32(out niSource);
      bits.ReadInt32(out niCompiler);
      if (readStrings) {
        bits.ReadCString(out moduleName);
        bits.ReadCString(out objectName);
      } else {
        bits.SkipCString(out moduleName);
        bits.SkipCString(out objectName);
      }
      bits.Align(4);
      //if (opened != 0 || pad1 != 0) {
      //  throw new PdbException("Invalid DBI module. "+
      //                                 "(opened={0}, pad={1})", opened, pad1);
      //}
    }

    internal int opened;                 //  0..3
    internal DbiSecCon section;                //  4..31
    internal ushort flags;                  // 32..33
    internal short stream;                 // 34..35
    internal int cbSyms;                 // 36..39
    internal int cbOldLines;             // 40..43
    internal int cbLines;                // 44..57
    internal short files;                  // 48..49
    internal short pad1;                   // 50..51
    internal uint offsets;
    internal int niSource;
    internal int niCompiler;
    internal string moduleName;
    internal string objectName;
  }
}

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

Share

About the Author

Sergiy Sakharov
Software Developer (Senior)
United Kingdom United Kingdom
No Biography provided

| Advertise | Privacy | Terms of Use | Mobile
Web04 | 2.8.150520.1 | Last Updated 25 Aug 2009
Article Copyright 2009 by Sergiy Sakharov
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid