Author: martin
Date: 2006-06-01 09:44:15 -0400 (Thu, 01 Jun 2006)
New Revision: 61374

Modified:
   trunk/debugger/ChangeLog
   trunk/debugger/backends/SingleSteppingEngine.cs
Log:
2006-06-01  Martin Baulig  <[EMAIL PROTECTED]>

        * backends/SingleSteppingEngine.cs
        (SingleSteppingEngine): Correctly handle the THROW_EXCEPTION /
        HANDLE_EXCEPTION notification.



Modified: trunk/debugger/ChangeLog
===================================================================
--- trunk/debugger/ChangeLog    2006-06-01 13:43:13 UTC (rev 61373)
+++ trunk/debugger/ChangeLog    2006-06-01 13:44:15 UTC (rev 61374)
@@ -1,5 +1,11 @@
 2006-06-01  Martin Baulig  <[EMAIL PROTECTED]>
 
+       * backends/SingleSteppingEngine.cs
+       (SingleSteppingEngine): Correctly handle the THROW_EXCEPTION /
+       HANDLE_EXCEPTION notification.
+
+2006-06-01  Martin Baulig  <[EMAIL PROTECTED]>
+
        * frontend/Command.cs
        (BreakCommand): Added `-local' argument; change default behaviour
        to `-global'.

Modified: trunk/debugger/backends/SingleSteppingEngine.cs
===================================================================
--- trunk/debugger/backends/SingleSteppingEngine.cs     2006-06-01 13:43:13 UTC 
(rev 61373)
+++ trunk/debugger/backends/SingleSteppingEngine.cs     2006-06-01 13:44:15 UTC 
(rev 61374)
@@ -205,28 +205,32 @@
 
                        if ((message == 
Inferior.ChildEventType.THROW_EXCEPTION) ||
                            (message == 
Inferior.ChildEventType.HANDLE_EXCEPTION)) {
-                               TargetAddress stack = new TargetAddress (
+                               TargetAddress info = new TargetAddress (
                                        inferior.AddressDomain, cevent.Data1);
                                TargetAddress ip = new TargetAddress (
                                        manager.AddressDomain, cevent.Data2);
 
                                Report.Debug (DebugFlags.EventLoop,
                                              "{0} received exception: {1} {2} 
{3}",
-                                             this, message, stack, ip);
+                                             this, message, info, ip);
 
+                               TargetAddress stack = inferior.ReadAddress 
(info);
+                               TargetAddress exc = inferior.ReadAddress (info 
+ inferior.TargetAddressSize);
+
                                bool stop_on_exc;
                                if (message == 
Inferior.ChildEventType.THROW_EXCEPTION)
-                                       stop_on_exc = throw_exception (stack, 
ip);
+                                       stop_on_exc = throw_exception (stack, 
exc, ip);
                                else
-                                       stop_on_exc = handle_exception (stack, 
ip);
+                                       stop_on_exc = handle_exception (stack, 
exc, ip);
 
                                Report.Debug (DebugFlags.SSE,
-                                             "{0} {1}stopping at exception 
({2}:{3}) - {4} - {5}",
-                                             this, stop_on_exc ? "" : "not ", 
stack, ip,
+                                             "{0} {1}stopping at exception 
({2}:{3}:{4}) - {5} - {6}",
+                                             this, stop_on_exc ? "" : "not ", 
stack, exc, ip,
                                              current_operation, 
temp_breakpoint_id);
 
                                if (stop_on_exc) {
-                                       PushOperation (new OperationException 
(ip, stack, false));
+                                       inferior.WriteInteger (info + 2 * 
inferior.TargetAddressSize, 1);
+                                       PushOperation (new OperationException 
(ip, exc, false));
                                        return;
                                }
 
@@ -877,10 +881,8 @@
                        return true;
                }
 
-               bool throw_exception (TargetAddress info, TargetAddress ip)
+               bool throw_exception (TargetAddress stack, TargetAddress exc, 
TargetAddress ip)
                {
-                       TargetAddress exc = inferior.ReadAddress (info + 
inferior.TargetAddressSize);
-
                        Report.Debug (DebugFlags.SSE,
                                      "{0} throwing exception {1} at {2} while 
running {3}", this, exc, ip,
                                      current_operation);
@@ -903,18 +905,14 @@
                                Report.Debug (DebugFlags.SSE,
                                              "{0} stopped on exception {1} at 
{2}", this, exc, ip);
 
-                               inferior.WriteInteger (info + 2 * 
inferior.TargetAddressSize, 1);
                                return true;
                        }
 
                        return false;
                }
 
-               bool handle_exception (TargetAddress info, TargetAddress ip)
+               bool handle_exception (TargetAddress stack, TargetAddress exc, 
TargetAddress ip)
                {
-                       TargetAddress stack = inferior.ReadAddress (info);
-                       TargetAddress exc = inferior.ReadAddress (info + 
inferior.TargetAddressSize);
-
                        Report.Debug (DebugFlags.SSE,
                                      "{0} handling exception {1} at {2} while 
running {3}", this, exc, ip,
                                      current_operation);

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

Reply via email to