Author: toshok
Date: 2005-05-02 13:53:18 -0400 (Mon, 02 May 2005)
New Revision: 43894

Modified:
   trunk/debugger/ChangeLog
   trunk/debugger/backends/classes/MonoVariableLocation.cs
   trunk/debugger/backends/mono/MonoVariable.cs
Log:
2005-05-02  Chris Toshok  <[EMAIL PROTECTED]>

        * backends/mono/MonoVariable.cs (MonoVariable.SetObject): Never
        accept rewrites of large portions of functionality without proper
        testing.  Implement this method again so it, oh, I dunno, actually
        *does* something?

        * backends/classes/MonoVariableLocation.cs
        (MonoVariableLocation.WriteBuffer): handle some more interesting
        value-in-register cases: 1. the buffer size is larger than the
        size we can stuff in a register (currently maxed at sizeof(long)?
        ugh.) 2. the buffer size is *smaller* than the TargetIntegerSize,
        as it is with things like booleans.  This makes "set ok = true"
        work while debugging mcs.



Modified: trunk/debugger/ChangeLog
===================================================================
--- trunk/debugger/ChangeLog    2005-05-02 17:23:05 UTC (rev 43893)
+++ trunk/debugger/ChangeLog    2005-05-02 17:53:18 UTC (rev 43894)
@@ -1,5 +1,20 @@
 2005-05-02  Chris Toshok  <[EMAIL PROTECTED]>
 
+       * backends/mono/MonoVariable.cs (MonoVariable.SetObject): Never
+       accept rewrites of large portions of functionality without proper
+       testing.  Implement this method again so it, oh, I dunno, actually
+       *does* something?
+
+       * backends/classes/MonoVariableLocation.cs
+       (MonoVariableLocation.WriteBuffer): handle some more interesting
+       value-in-register cases: 1. the buffer size is larger than the
+       size we can stuff in a register (currently maxed at sizeof(long)?
+       ugh.) 2. the buffer size is *smaller* than the TargetIntegerSize,
+       as it is with things like booleans.  This makes "set ok = true"
+       work while debugging mcs.
+
+2005-05-02  Chris Toshok  <[EMAIL PROTECTED]>
+
        * backends/ThreadManager.cs (ThreadManager.Dispose): fix bug
        disposing of main_process.
 

Modified: trunk/debugger/backends/classes/MonoVariableLocation.cs
===================================================================
--- trunk/debugger/backends/classes/MonoVariableLocation.cs     2005-05-02 
17:23:05 UTC (rev 43893)
+++ trunk/debugger/backends/classes/MonoVariableLocation.cs     2005-05-02 
17:53:18 UTC (rev 43894)
@@ -84,7 +84,20 @@
 
                        long contents;
                        ITargetAccess memory = TargetAccess;
-                       if (memory.TargetIntegerSize == 4)
+
+                       if (data.Length > memory.TargetIntegerSize)
+                               throw new InternalError ();
+
+                       if (data.Length < memory.TargetIntegerSize) {
+                               switch (data.Length) {
+                               case 1: contents = data[0]; break;
+                               case 2: contents = BitConverter.ToInt16 (data, 
0); break;
+                               case 4: contents = BitConverter.ToInt32 (data, 
0); break;
+                               default:
+                                 throw new InternalError ();
+                               }
+                       }
+                       else if (memory.TargetIntegerSize == 4)
                                contents = BitConverter.ToInt32 (data, 0);
                        else if (memory.TargetIntegerSize == 8)
                                contents = BitConverter.ToInt64 (data, 0);

Modified: trunk/debugger/backends/mono/MonoVariable.cs
===================================================================
--- trunk/debugger/backends/mono/MonoVariable.cs        2005-05-02 17:23:05 UTC 
(rev 43893)
+++ trunk/debugger/backends/mono/MonoVariable.cs        2005-05-02 17:53:18 UTC 
(rev 43894)
@@ -135,8 +135,12 @@
                {
                        if (obj.TypeInfo.Type != Type)
                                throw new InvalidOperationException ();
-                       // TargetLocation location = GetLocation (frame);
-                       // type.SetObject (location, (MonoObject) obj);
+
+                       MonoObject var_object = (MonoObject)GetObject (frame);
+                       if (var_object == null)
+                               return;
+
+                       var_object.SetObject (obj);
                }
 
                public override string ToString ()

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

Reply via email to