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

User [email protected] added comment
https://bugzilla.novell.com/show_bug.cgi?id=460400#c7





--- Comment #7 from Martin Baulig <[email protected]>  2009-01-07 10:00:52 MST 
---
I quickly hacked a check for the "file:line" pattern, also checking for other
junk like ":" or "test.cs:" etc.

However, I don't want to see today's date in the svn history, so waiting till
tomorrow ....


====
--- frontend/Command.cs (revision 122605)
+++ frontend/Command.cs (working copy)
@@ -3136,10 +3136,17 @@
                                        return true;
                        }

-                       if (Argument.IndexOf (':') > 0)
+                       uint line;
+                       int pos = Argument.IndexOf (':');
+                       if (pos == 0)
+                               throw new ScriptingException ("Invalid
breakpoint expression");
+                       else if (pos > 0) {
+                               string tmp = Argument.Substring (pos+1);
+                               if (!UInt32.TryParse (tmp, out line))
+                                       throw new ScriptingException ("Invalid
breakpoint expression");
                                return true;
+                       }

-                       uint line;
                        if (UInt32.TryParse (Argument, out line)) {
                                if (!context.Interpreter.HasTarget)
                                        throw new ScriptingException ("Cannot
insert breakpoint by line: no current source file.");
=====


-- 
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
_______________________________________________
mono-bugs maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-bugs

Reply via email to