[Mono-bugs] [Bug 678234] Crash while debugging on a real device

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Fri Apr 1 10:39:23 EDT 2011


https://bugzilla.novell.com/show_bug.cgi?id=678234

https://bugzilla.novell.com/show_bug.cgi?id=678234#c7


--- Comment #7 from Martin Baulig <martin at novell.com> 2011-04-01 14:39:22 UTC ---
Added

=====
        public void Martin_Test (long thread_id)
        {
            var thread = GetThread (0, thread_id);
            LoggingService.LogMessage ("MARTIN TEST: {0:x}", thread_id);

            var frame = thread.GetFrames ()[0];
            var method = frame.Method;
            var locals = method.GetLocals ();

            foreach (var local in locals) {
                if (local.Name == "")
                    continue;

                var value = frame.GetValue (local);
                LoggingService.LogMessage ("LOCAL VALUE: {0}", value);

                var obj = value as ObjectMirror;
                if (obj != null)
                    PrintObject (thread, obj);
            }
        }

        MethodMirror LookupToString (TypeMirror type)
        {
            while (type != null) {
                var to_string = type.GetMethod ("ToString");
                LoggingService.LogMessage ("LOOKUP TOSTRING: {0} {1}",
type.FullName, to_string != null);
                if (to_string != null)
                    return to_string;

                type = type.BaseType;
            }

            return null;
        }

        void PrintObject (ThreadMirror thread, ObjectMirror obj)
        {
            var to_string = LookupToString (obj.Type);
            LoggingService.LogMessage ("PRINT OBJECT: {0} {1}",
obj.Type.FullName, to_string != null);

            var result = obj.InvokeMethod (thread, to_string, null);
            LoggingService.LogMessage ("PRINT OBJECT DONE: {0}", result);
        }
=====

to SoftDebuggerSession and invoked it whenever VS wants to evaluate an
expression.

Now it's not crashing anymore !

Using the real evaluator still does.

-- 
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.


More information about the mono-bugs mailing list