[Monodevelop-patches-list] r1116 - in trunk/MonoDevelop: . src/Main/Base/Services

commit-watcher at mono-cvs.ximian.com commit-watcher at mono-cvs.ximian.com
Fri Mar 5 12:51:17 EST 2004


Author: mkestner
Date: 2004-03-05 12:51:17 -0500 (Fri, 05 Mar 2004)
New Revision: 1116

Modified:
   trunk/MonoDevelop/ChangeLog
   trunk/MonoDevelop/src/Main/Base/Services/DebuggingService.cs
Log:
2004-03-05  Mike Kestner  <mkestner at ximian.com>

	* Main/Base/Services/DebuggingService.cs : add StepInto and
	implement StepOver.  Use proc.CurrentFrame where possible.



Modified: trunk/MonoDevelop/ChangeLog
===================================================================
--- trunk/MonoDevelop/ChangeLog	2004-03-05 14:14:17 UTC (rev 1115)
+++ trunk/MonoDevelop/ChangeLog	2004-03-05 17:51:17 UTC (rev 1116)
@@ -1,3 +1,8 @@
+2004-03-05  Mike Kestner  <mkestner at ximian.com>
+
+	* Main/Base/Services/DebuggingService.cs : add StepInto and
+	implement StepOver.  Use proc.CurrentFrame where possible.
+
 2004-03-05  John BouAntoun  <jba-mono at optusnet.com.au>
 
 	* src/Main/Base/Gui/Dialogs/ProjectOptionsDialog.cs : added configuration renaming

Modified: trunk/MonoDevelop/src/Main/Base/Services/DebuggingService.cs
===================================================================
--- trunk/MonoDevelop/src/Main/Base/Services/DebuggingService.cs	2004-03-05 14:14:17 UTC (rev 1115)
+++ trunk/MonoDevelop/src/Main/Base/Services/DebuggingService.cs	2004-03-05 17:51:17 UTC (rev 1116)
@@ -72,11 +72,6 @@
 			return point;
 		}
 
-		public void StepOver ()
-		{
-
-		}
-
 		public bool AddBreakpoint (string filename, int linenum)
 		{
 			string key = filename + ":" + linenum;
@@ -141,8 +136,6 @@
 
 		private void target_event (object sender, TargetEventArgs args)
 		{
-			Console.WriteLine ("TARGET EVENT: {0}", args);
-
 			switch (args.Type) {
 			case TargetEventType.TargetExited:
 			case TargetEventType.TargetSignaled:
@@ -174,10 +167,6 @@
 				}
 			} else if (PausedEvent != null) {
 				PausedEvent (this, new EventArgs ());
-				Console.WriteLine ("file:line is " + CurrentFilename + ":" + CurrentLineNumber);
-				Console.WriteLine ("trace:");
-				foreach (string s in Backtrace)
-					Console.WriteLine (s);
 			}
 			return false;
 		}
@@ -235,15 +224,35 @@
 			backend = null;
 		}
 
+		public void StepInto ()
+		{
+			if (!Debugging)
+				throw new Exception ("Can't step without running debugger.");
+
+			if (IsRunning)
+				throw new Exception ("Can't step unless paused.");
+
+			proc.StepLine (false);
+		}
+
+		public void StepOver ()
+		{
+			if (!Debugging)
+				throw new Exception ("Can't step without running debugger.");
+
+			if (IsRunning)
+				throw new Exception ("Can't step unless paused.");
+
+			proc.NextLine (false);
+		}
+
 		public string[] Backtrace {
 			get {
 				Backtrace trace = proc.GetBacktrace ();
 				string[] result = new string [trace.Length];
 				int i = 0;
-				foreach (StackFrame frame in trace.Frames) {
+				foreach (StackFrame frame in trace.Frames)
 					result [i++] = frame.SourceAddress.Name;
-					Console.WriteLine (result [i-1]);
-				}
 
 				return result;
 			}
@@ -253,7 +262,7 @@
 			get {
 				if (IsRunning)
 					return null;
-				return proc.GetBacktrace ().Frames[0];
+				return proc.CurrentFrame;
 			}
 		}
 
@@ -262,10 +271,10 @@
 				if (IsRunning)
 					return String.Empty;
 
-				if (proc.GetBacktrace ().Frames [0].SourceAddress.MethodSource.IsDynamic)
+				if (proc.CurrentFrame.SourceAddress.MethodSource.IsDynamic)
 					return String.Empty;
 
-				return proc.GetBacktrace ().Frames [0].SourceAddress.MethodSource.SourceFile.FileName;
+				return proc.CurrentFrame.SourceAddress.MethodSource.SourceFile.FileName;
 			}
 		}
 
@@ -274,7 +283,7 @@
 				if (IsRunning)
 					return -1;
 
-				return proc.GetBacktrace ().Frames [0].SourceAddress.Row;
+				return proc.CurrentFrame.SourceAddress.Row;
 			}
 		}
 




More information about the Monodevelop-patches-list mailing list