This is the mail archive of the
frysk-cvs@sources.redhat.com
mailing list for the frysk project.
[SCM] master: Add SteppingEngine.blockedByActionPoint.
- From: tthomas at sourceware dot org
- To: frysk-cvs at sourceware dot org
- Date: 17 Apr 2008 18:55:45 -0000
- Subject: [SCM] master: Add SteppingEngine.blockedByActionPoint.
- Reply-to: frysk at sourceware dot org
The branch, master has been updated
via 3b312031cd9b151a21d5d0ad3d7a35cd4a1fd4d3 (commit)
from 35624ff9b23a0d4113a5f41f3840d600aacda7df (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email.
- Log -----------------------------------------------------------------
commit 3b312031cd9b151a21d5d0ad3d7a35cd4a1fd4d3
Author: Teresa Thomas <tthomas@redhat.com>
Date: Thu Apr 17 14:49:58 2008 -0400
Add SteppingEngine.blockedByActionPoint.
frysk-core/frysk/stepping/ChangeLog:
2008-04-17 Teresa Thomas <tthomas@redhat.com>
* SteppingEngine.java (blockedByActionPoint): New.
frysk-core/frysk/hpd/ChangeLog:
2008-04-17 Teresa Thomas <tthomas@redhat.com>
* WatchCommand.java (WatchpointObserver.updateHit):
Use SteppingEngine.blockedByActionPoint
-----------------------------------------------------------------------
Summary of changes:
frysk-core/frysk/hpd/ChangeLog | 7 +++++-
frysk-core/frysk/hpd/WatchCommand.java | 8 ++----
frysk-core/frysk/stepping/ChangeLog | 6 ++++-
frysk-core/frysk/stepping/SteppingEngine.java | 27 +++++++++++++------------
4 files changed, 28 insertions(+), 20 deletions(-)
First 500 lines of diff:
diff --git a/frysk-core/frysk/hpd/ChangeLog b/frysk-core/frysk/hpd/ChangeLog
index e468416..029315c 100644
--- a/frysk-core/frysk/hpd/ChangeLog
+++ b/frysk-core/frysk/hpd/ChangeLog
@@ -1,5 +1,10 @@
-2008-04-17 Andrew Cagney <cagney@redhat.com>
+2008-04-17 Teresa Thomas <tthomas@redhat.com>
+ * WatchCommand.java (WatchpointObserver.updateHit):
+ Use SteppingEngine.blockedByActionPoint
+
+2008-04-17 Andrew Cagney <cagney@redhat.com>
+
* TestBreakpoints.java: Use frysk.config.Prefix.
* TestWatchCommand.java: Ditto.
* TestSysRoot.java: Ditto.
diff --git a/frysk-core/frysk/hpd/WatchCommand.java b/frysk-core/frysk/hpd/WatchCommand.java
index 55b98d9..5a8170f 100644
--- a/frysk-core/frysk/hpd/WatchCommand.java
+++ b/frysk-core/frysk/hpd/WatchCommand.java
@@ -134,11 +134,9 @@ class WatchCommand extends ParameterizedCommand {
cli.outWriter.println();
// Remember the previous value
oldValue = newValue.toPrint();
-
- cli.getSteppingEngine().requestAddSteppingObserver(task);
- // Add the watch observer to the task's blockers list
- cli.getSteppingEngine().addBlocker(task, this);
- cli.getSteppingEngine().setTaskStopped(task);
+
+ cli.getSteppingEngine().blockedByActionPoint(task, this);
+ task.requestUnblock(this);
return Action.BLOCK;
}
diff --git a/frysk-core/frysk/stepping/ChangeLog b/frysk-core/frysk/stepping/ChangeLog
index 6012bc6..d3dd5b6 100644
--- a/frysk-core/frysk/stepping/ChangeLog
+++ b/frysk-core/frysk/stepping/ChangeLog
@@ -1,5 +1,9 @@
-2008-04-16 Andrew Cagney <cagney@redhat.com>
+2008-04-17 Teresa Thomas <tthomas@redhat.com>
+
+ * SteppingEngine.java (blockedByActionPoint): New.
+2008-04-16 Andrew Cagney <cagney@redhat.com>
+
* TestStepping.java: Use frysk.config.Prefix.
* TestSteppingEngine.java: Ditto.
diff --git a/frysk-core/frysk/stepping/SteppingEngine.java b/frysk-core/frysk/stepping/SteppingEngine.java
index 8902d4e..c380dd3 100644
--- a/frysk-core/frysk/stepping/SteppingEngine.java
+++ b/frysk-core/frysk/stepping/SteppingEngine.java
@@ -981,13 +981,25 @@ public class SteppingEngine {
}
/**
- * Set the current state of the task as stopped.
+ * Sets the stepping engine on being hit by an action point.
+ *
+ * to - Observer that causes task to block.
*/
- public void setTaskStopped(Task task) {
+ public void blockedByActionPoint(Task task, TaskObserver to) {
+ // Requests the addition of the stepping observer to task if
+ // not inserted already.
+ if (!(task.isInstructionObserverAdded(this.steppingObserver))) {
+ task.requestAddInstructionObserver(this.steppingObserver);
+ }
+
+ // Add the observer to the task's blockers list
+ addBlocker(task, to);
+
TaskStepEngine tse = null;
tse = (TaskStepEngine) this.taskStateMap.get(task);
if (!tse.isStopped()) {
+ // Set the state of task as stopped
tse.setState(new StoppedState(task));
// Remove the task from the running tasks list
this.runningTasks.remove(task);
@@ -995,17 +1007,6 @@ public class SteppingEngine {
}
/**
- * Requests the addition of the stepping observer to task if
- * not inserted already.
- */
- public void requestAddSteppingObserver(Task task) {
-
- if (!(task.isInstructionObserverAdded(this.steppingObserver))) {
- task.requestAddInstructionObserver(this.steppingObserver);
- }
- }
-
- /**
* Adds the given Observer to this.steppingObserver's Observer list.
*
* @param o The Observer to be added.
hooks/post-receive
--
frysk system monitor/debugger