[Mono-dev] Profiler and coverage problem?

Csaba Balazs csaba.balazs at researchstudio.at
Fri Nov 30 05:45:11 EST 2007


I try to check the monocov (0.2) tool for testing the code coverage.

I have found something unclear.

A small sample:

using System;
using System.Xml;

public class MinProba {
	public static void Main(String[] args) {
		XmlTextReader reader = new XmlTextReader("test.xml");

The test.xml is just a sample.

gmcs -debug MinProba.cs    or    mcs -debug MinProba.cs

Running with monocov:
mono --debug --profile=monocov MinProba.exe

Dumping coverage data to MinProba.exe.cov ...

At the point of "reader.Read()" we call the System.Xml.XmlTextReader Read

Its source (from XmlTextReader.cs):

public override bool Read ()
    if (Binary != null)
       Binary.Reset ();

This Binary property is from the parent class (XmlReader).
There is no "XmlReader.get_Binary" method tag in the generated COV file, but it
obviously called. Only the XmlReader .ctor call tag is there.

If I use the "mono --debug --trace MinProba.exe", the problem is the same.

I have disassembled the System.Xml.dll, and this function call is there!

What is wrong? Is it a monocov or mono profiler interface problem?

Thank you in advance,


More information about the Mono-devel-list mailing list