Thu Nov 30 17:36:43 CET 2006 Paolo Molaro <lupus@ximian.com>

* gui/gtk/SourceWindow.cs: work around Gtk bug.
	* coverage.c: disable domain unload for now and make sure
	methods names are encoded correctly in the XML file.


svn path=/trunk/monocov/; revision=68755
This commit is contained in:
Paolo Molaro 2006-11-30 16:38:03 +00:00
Родитель d8805b62ae
Коммит 57cbc81324
4 изменённых файлов: 22 добавлений и 4 удалений

Просмотреть файл

@ -1,4 +1,10 @@
Thu Nov 30 17:36:43 CET 2006 Paolo Molaro <lupus@ximian.com>
* gui/gtk/SourceWindow.cs: work around Gtk bug.
* coverage.c: disable domain unload for now and make sure
methods names are encoded correctly in the XML file.
Thu Nov 30 12:15:03 CET 2006 Paolo Molaro <lupus@ximian.com>
* Ship a Cecil binary in the source tarball. Added a

3
README
Просмотреть файл

@ -72,10 +72,9 @@ To export the data as HTML, run monocov like this:
2.5 KNOWN BUGS
--------------
In the source code view (when double-clicking on an entry), the view is not
scrolled to the first line of the method.
The --debug option to mono should not be required and it should be enabled
by default.
We disable mono's domain unload since we don't handle that case yet.
3. UTILITY PROGRAMS
-------------------

Просмотреть файл

@ -118,6 +118,8 @@ mono_profiler_startup (char *arg)
mono_profiler_set_events (MONO_PROFILE_INS_COVERAGE | MONO_PROFILE_ASSEMBLY_EVENTS);
mono_profiler_install_coverage_filter (collect_coverage_for);
mono_profiler_install_assembly (NULL, assembly_load, NULL, NULL);
/* we don't deal with unloading, so disable it for now */
setenv ("MONO_NO_UNLOAD", "1", 1);
}
static void
@ -226,6 +228,7 @@ add_filter (MonoProfiler *prof, const char *filter)
prof->filtered_classes = g_hash_table_new (NULL, NULL);
}
spec = NULL; /* compile a pattern later */
g_ptr_array_add (prof->filters, spec);
g_ptr_array_add (prof->filters_as_str, g_strdup (filter));
}
@ -271,9 +274,9 @@ static void
output_method (MonoMethod *method, gpointer dummy, MonoProfiler *prof)
{
MonoMethodHeader *header;
int i;
char *classname;
char *tmpsig;
char *tmpname;
FILE *outfile;
MonoClass *klass;
MonoImage *image;
@ -288,12 +291,16 @@ output_method (MonoMethod *method, gpointer dummy, MonoProfiler *prof)
classname = mono_type_get_name (mono_class_get_type (klass));
image = mono_class_get_image (klass);
tmpname = mono_method_get_name (method);
tmpname = g_markup_escape_text (tmpname, strlen (tmpname));
fprintf (outfile, "\t<method assembly=\"%s\" class=\"%s\" name=\"%s (%s)\" token=\"%d\">\n",
mono_image_get_name (image),
classname, mono_method_get_name (method),
classname, tmpname,
tmpsig, mono_method_get_token (method));
g_free (tmpsig);
g_free (tmpname);
fprintf (outfile, "\t\t");
count = 0;
prev_offset = 0;

Просмотреть файл

@ -66,6 +66,12 @@ namespace MonoCov.Gui.Gtk{
text_view.ScrollToIter (iter, 0.0, true, 0, 0.5);
text_view.PlaceCursorOnscreen ();
Console.WriteLine ("scrolled to line: {0}", method.Model.startLine - 1);
// the first time we need to do this workaround for
// it to actually work...
while (Application.EventsPending ())
Application.RunIteration ();
text_view.ScrollToIter (iter, 0.0, true, 0, 0.5);
text_view.PlaceCursorOnscreen ();
}
}
}