Author: lupus
Date: 2006-11-30 11:38:03 -0500 (Thu, 30 Nov 2006)
New Revision: 68755

Modified:
   trunk/monocov/ChangeLog
   trunk/monocov/README
   trunk/monocov/coverage.c
   trunk/monocov/gui/gtk/SourceWindow.cs
Log:


Thu Nov 30 17:36:43 CET 2006 Paolo Molaro <[EMAIL PROTECTED]>

        * 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.



Modified: trunk/monocov/ChangeLog
===================================================================
--- trunk/monocov/ChangeLog     2006-11-30 16:10:04 UTC (rev 68754)
+++ trunk/monocov/ChangeLog     2006-11-30 16:38:03 UTC (rev 68755)
@@ -1,4 +1,10 @@
 
+Thu Nov 30 17:36:43 CET 2006 Paolo Molaro <[EMAIL PROTECTED]>
+
+       * 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 <[EMAIL PROTECTED]>
 
        * Ship a Cecil binary in the source tarball. Added a

Modified: trunk/monocov/README
===================================================================
--- trunk/monocov/README        2006-11-30 16:10:04 UTC (rev 68754)
+++ trunk/monocov/README        2006-11-30 16:38:03 UTC (rev 68755)
@@ -72,10 +72,9 @@
 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
 -------------------

Modified: trunk/monocov/coverage.c
===================================================================
--- trunk/monocov/coverage.c    2006-11-30 16:10:04 UTC (rev 68754)
+++ trunk/monocov/coverage.c    2006-11-30 16:38:03 UTC (rev 68755)
@@ -118,6 +118,8 @@
        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 @@
                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 @@
 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 @@
        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;

Modified: trunk/monocov/gui/gtk/SourceWindow.cs
===================================================================
--- trunk/monocov/gui/gtk/SourceWindow.cs       2006-11-30 16:10:04 UTC (rev 
68754)
+++ trunk/monocov/gui/gtk/SourceWindow.cs       2006-11-30 16:38:03 UTC (rev 
68755)
@@ -66,6 +66,12 @@
                        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 ();
                }
        }
 }

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to