[Mono-dev] Profiler and coverage problem?
Csaba Balazs
csaba.balazs at researchstudio.at
Fri Nov 30 05:45:11 EST 2007
Hi,
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");
reader.Read();
reader.Close();
}
}
The test.xml is just a sample.
Compiling:
gmcs -debug MinProba.cs or mcs -debug MinProba.cs
Running with monocov:
mono --debug --profile=monocov MinProba.exe
Result:
Dumping coverage data to MinProba.exe.cov ...
Done.
At the point of "reader.Read()" we call the System.Xml.XmlTextReader Read
method.
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,
Csaba
More information about the Mono-devel-list
mailing list