Author: martin
Date: 2006-05-20 12:39:23 -0400 (Sat, 20 May 2006)
New Revision: 60891
Modified:
trunk/debugger/ChangeLog
trunk/debugger/frontend/Command.cs
Log:
2006-05-20 Martin Baulig <[EMAIL PROTECTED]>
* frontend/Command.cs
(SourceCommand.DoResolve): Also lookup native methods.
(BreakCommand): Add `-global' argument as a shortcut for
`-group global'.
Modified: trunk/debugger/ChangeLog
===================================================================
--- trunk/debugger/ChangeLog 2006-05-20 16:08:46 UTC (rev 60890)
+++ trunk/debugger/ChangeLog 2006-05-20 16:39:23 UTC (rev 60891)
@@ -1,3 +1,10 @@
+2006-05-20 Martin Baulig <[EMAIL PROTECTED]>
+
+ * frontend/Command.cs
+ (SourceCommand.DoResolve): Also lookup native methods.
+ (BreakCommand): Add `-global' argument as a shortcut for
+ `-group global'.
+
2006-05-17 Martin Baulig <[EMAIL PROTECTED]>
* frontend/Interpreter.cs
Modified: trunk/debugger/frontend/Command.cs
===================================================================
--- trunk/debugger/frontend/Command.cs 2006-05-20 16:08:46 UTC (rev 60890)
+++ trunk/debugger/frontend/Command.cs 2006-05-20 16:39:23 UTC (rev 60891)
@@ -2025,15 +2025,21 @@
} catch {
}
- Expression expr = ParseExpression (context);
- if (expr == null)
- return false;
+ MethodExpression mexpr;
+ try {
+ Expression expr = ParseExpression (context);
+ if (expr == null)
+ return false;
- MethodExpression mexpr = expr.ResolveMethod (context,
type);
- if (mexpr == null)
- return false;
+ mexpr = expr.ResolveMethod (context, type);
+ } catch {
+ mexpr = null;
+ }
- location = mexpr.EvaluateSource (context);
+ if (mexpr != null)
+ location = mexpr.EvaluateSource (context);
+ else
+ location = context.FindMethod (Argument);
return location != null;
}
}
@@ -2132,6 +2138,7 @@
public class BreakCommand : SourceCommand, IDocumentableCommand
{
string group;
+ bool global;
int domain = 0;
ThreadGroup tgroup;
@@ -2140,6 +2147,11 @@
set { group = value; }
}
+ public bool Global {
+ get { return global; }
+ set { global = value; }
+ }
+
public int Domain {
get { return domain; }
set { domain = value; }
@@ -2151,7 +2163,16 @@
if (!resolved)
throw new ScriptingException ("No such method:
`{0}'", Argument);
- tgroup = context.Interpreter.GetThreadGroup (Group,
false);
+ if (global) {
+ if (Group != null)
+ throw new ScriptingException (
+ "Cannot use both -group and
-global.");
+
+ tgroup = ThreadGroup.Global;
+ } else {
+ tgroup = context.Interpreter.GetThreadGroup
(Group, false);
+ }
+
return true;
}
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches