[Mono-bugs] [Bug 460400] [Not-a-Bug] mdb does not complain when you set break point to invalid line

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Wed Jan 7 12:00:52 EST 2009


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

User martin at novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=460400#c7





--- Comment #7 from Martin Baulig <martin at novell.com>  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.


More information about the mono-bugs mailing list