[Monodevelop-patches-list] r1124 - trunk/MonoDevelop/src/Main/Base/Services

commit-watcher at mono-cvs.ximian.com commit-watcher at mono-cvs.ximian.com
Sat Mar 6 10:37:55 EST 2004


Author: martin
Date: 2004-03-06 10:37:55 -0500 (Sat, 06 Mar 2004)
New Revision: 1124

Modified:
   trunk/MonoDevelop/src/Main/Base/Services/DebuggingService.cs
Log:
Insert the breakpoints inside an idle handler.


Modified: trunk/MonoDevelop/src/Main/Base/Services/DebuggingService.cs
===================================================================
--- trunk/MonoDevelop/src/Main/Base/Services/DebuggingService.cs	2004-03-06 05:21:02 UTC (rev 1123)
+++ trunk/MonoDevelop/src/Main/Base/Services/DebuggingService.cs	2004-03-06 15:37:55 UTC (rev 1124)
@@ -115,29 +115,9 @@
 		{
 			this.proc = process;
 
-			string[] keys = new string [breakpoints.Keys.Count];
-			breakpoints.Keys.CopyTo (keys, 0);
-			foreach (string key in keys) {
-				Breakpoint point = CreateBreakpoint (key);
-				string[] toks = point.Name.Split (':');
-				string filename = toks [0];
-				int linenumber = Int32.Parse (toks [1]);
-				SourceLocation loc = backend.FindLocation(filename, linenumber);
-				if (loc == null) {
-					Console.WriteLine ("Couldn't find breakpoint location " + key + " " + backend.Modules.Length);
-					return;
-				}
-				breakpoints [key] = loc.InsertBreakpoint (proc, point);
-				if (breakpoints [key] == null)
-					//throw new Exception ("Couldn't insert breakpoint " + key);
-					return;
-			}
-
 			proc.TargetEvent += new TargetEventHandler (target_event);
 
 			Gtk.Timeout.Add (1, new Gtk.Function (EmitStarted));
-
-			proc.Continue (false);
 		}
 
 		private void target_event (object sender, TargetEventArgs args)
@@ -157,8 +137,33 @@
 			}
 		}
 
+		void insert_breakpoints ()
+		{
+			string[] keys = new string [breakpoints.Keys.Count];
+			breakpoints.Keys.CopyTo (keys, 0);
+			foreach (string key in keys) {
+				Breakpoint point = CreateBreakpoint (key);
+				string[] toks = point.Name.Split (':');
+				string filename = toks [0];
+				int linenumber = Int32.Parse (toks [1]);
+				SourceLocation loc = backend.FindLocation(filename, linenumber);
+				if (loc == null) {
+					Console.WriteLine ("Couldn't find breakpoint location " + key + " " + backend.Modules.Length);
+					return;
+				}
+				breakpoints [key] = loc.InsertBreakpoint (proc, point);
+				if (breakpoints [key] == null)
+					//throw new Exception ("Couldn't insert breakpoint " + key);
+					return;
+			}
+		}
+
 		bool EmitStarted ()
 		{
+			insert_breakpoints ();
+
+			proc.Continue (false);
+
 			if (StartedEvent != null)
 				StartedEvent (this, new EventArgs ());
 




More information about the Monodevelop-patches-list mailing list