[Monodevelop-patches-list] r1111 - in trunk/MonoDevelop: . src/Main/Base/Services
commit-watcher at mono-cvs.ximian.com
commit-watcher at mono-cvs.ximian.com
Thu Mar 4 16:27:02 EST 2004
Author: mkestner
Date: 2004-03-04 16:27:02 -0500 (Thu, 04 Mar 2004)
New Revision: 1111
Modified:
trunk/MonoDevelop/ChangeLog
trunk/MonoDevelop/src/Main/Base/Services/DebuggingService.cs
Log:
2004-03-04 Mike Kestner <mkestner at ximian.com>
* Main/Base/Services/DebuggingService.cs : add Started/Stopped and
Paused/Resumed events plus a CurrentFrame property.
Modified: trunk/MonoDevelop/ChangeLog
===================================================================
--- trunk/MonoDevelop/ChangeLog 2004-03-04 20:17:26 UTC (rev 1110)
+++ trunk/MonoDevelop/ChangeLog 2004-03-04 21:27:02 UTC (rev 1111)
@@ -1,5 +1,10 @@
2004-03-04 Mike Kestner <mkestner at ximian.com>
+ * Main/Base/Services/DebuggingService.cs : add Started/Stopped and
+ Paused/Resumed events plus a CurrentFrame property.
+
+2004-03-04 Mike Kestner <mkestner at ximian.com>
+
* Main/Base/Services/DebuggingService.cs : add Pause/Resume and make
IsRunning public.
Modified: trunk/MonoDevelop/src/Main/Base/Services/DebuggingService.cs
===================================================================
--- trunk/MonoDevelop/src/Main/Base/Services/DebuggingService.cs 2004-03-04 20:17:26 UTC (rev 1110)
+++ trunk/MonoDevelop/src/Main/Base/Services/DebuggingService.cs 2004-03-04 21:27:02 UTC (rev 1111)
@@ -39,6 +39,8 @@
if (!Debugging)
return;
+ if (StoppedEvent != null)
+ StoppedEvent (this, new EventArgs ());
backend.Dispose ();
backend = null;
proc = null;
@@ -131,6 +133,8 @@
proc.TargetEvent += new TargetEventHandler (target_event);
+ Gtk.Timeout.Add (1, new Gtk.Function (EmitStarted));
+
proc.Continue (false);
}
@@ -143,9 +147,40 @@
case TargetEventType.TargetSignaled:
Gtk.Timeout.Add (1, new Gtk.Function (KillApplication));
break;
+ case TargetEventType.TargetStopped:
+ case TargetEventType.TargetRunning:
+ Gtk.Timeout.Add (1, new Gtk.Function (ChangeState));
+ break;
+ case TargetEventType.TargetHitBreakpoint:
+ default:
+ break;
}
}
+ bool EmitStarted ()
+ {
+ if (StartedEvent != null)
+ StartedEvent (this, new EventArgs ());
+
+ return false;
+ }
+
+ bool ChangeState ()
+ {
+ if (IsRunning) {
+ if (ResumedEvent != null) {
+ ResumedEvent (this, new EventArgs ());
+ }
+ } else if (PausedEvent != null)
+ PausedEvent (this, new EventArgs ());
+ return false;
+ }
+
+ public event EventHandler PausedEvent;
+ public event EventHandler ResumedEvent;
+ public event EventHandler StartedEvent;
+ public event EventHandler StoppedEvent;
+
bool KillApplication ()
{
Cleanup ();
@@ -208,6 +243,14 @@
}
}
+ public StackFrame CurrentFrame {
+ get {
+ if (IsRunning)
+ return null;
+ return proc.GetBacktrace ().Frames[0];
+ }
+ }
+
public string LookupValue (string expr)
{
return "";
More information about the Monodevelop-patches-list
mailing list