Author: martin
Date: 2006-06-01 08:16:59 -0400 (Thu, 01 Jun 2006)
New Revision: 61369

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

        * frontend/Command.cs
        (BreakCommand): Added `-local' argument; change default behaviour
        to `-global'.



Modified: trunk/debugger/ChangeLog
===================================================================
--- trunk/debugger/ChangeLog    2006-06-01 12:15:09 UTC (rev 61368)
+++ trunk/debugger/ChangeLog    2006-06-01 12:16:59 UTC (rev 61369)
@@ -1,5 +1,11 @@
 2006-06-01  Martin Baulig  <[EMAIL PROTECTED]>
 
+       * frontend/Command.cs
+       (BreakCommand): Added `-local' argument; change default behaviour
+       to `-global'.
+
+2006-06-01  Martin Baulig  <[EMAIL PROTECTED]>
+
        * backends/server/x86_64-arch.c
        (server_ptrace_push_registers): Properly align the stack.
        (server_ptrace_call_method_*): Likewise.

Modified: trunk/debugger/frontend/Command.cs
===================================================================
--- trunk/debugger/frontend/Command.cs  2006-06-01 12:15:09 UTC (rev 61368)
+++ trunk/debugger/frontend/Command.cs  2006-06-01 12:16:59 UTC (rev 61369)
@@ -2137,7 +2137,7 @@
        public class BreakCommand : SourceCommand, IDocumentableCommand
        {
                string group;
-               bool global;
+               bool global, local;
                int domain = 0;
                ThreadGroup tgroup;
                TargetAddress address = TargetAddress.Null;
@@ -2152,6 +2152,11 @@
                        set { global = value; }
                }
 
+               public bool Local {
+                       get { return local; }
+                       set { local = value; }
+               }
+
                public int Domain {
                        get { return domain; }
                        set { domain = value; }
@@ -2160,13 +2165,25 @@
                protected override bool DoResolve (ScriptingContext context)
                {
                        if (global) {
+                               if (local)
+                                       throw new ScriptingException (
+                                               "Cannot use both -local and 
-global.");
+
                                if (Group != null)
                                        throw new ScriptingException (
                                                "Cannot use both -group and 
-global.");
 
                                tgroup = ThreadGroup.Global;
+                       } else if (local) {
+                               if (Group != null)
+                                       throw new ScriptingException (
+                                               "Cannot use both -group and 
-local.");
+
+                               tgroup = context.Interpreter.GetThreadGroup 
(Group, false);
+                       } else if (Group != null) {
+                               tgroup = context.Interpreter.GetThreadGroup 
(Group, false);
                        } else {
-                               tgroup = context.Interpreter.GetThreadGroup 
(Group, false);
+                               tgroup = ThreadGroup.Global;
                        }
 
                        bool resolved = base.DoResolve (context);

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

Reply via email to