This is the mail archive of the
frysk-cvs@sources.redhat.com
mailing list for the frysk project.
[SCM] master: Fix SteppingEngine aborting when tasks have been only run(bz# 5482).
- From: rmoseley at sourceware dot org
- To: frysk-cvs at sourceware dot org
- Date: 13 Dec 2007 03:14:40 -0000
- Subject: [SCM] master: Fix SteppingEngine aborting when tasks have been only run(bz# 5482).
- Reply-to: frysk at sourceware dot org
The branch, master has been updated
via 6e336c8e877a60dc82d621ae7f06f0c8dcb01099 (commit)
from 1cc9d6f4bc5db27bf30ff59207d5588bf090495c (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email.
- Log -----------------------------------------------------------------
commit 6e336c8e877a60dc82d621ae7f06f0c8dcb01099
Author: Rick Moseley <rmoseley@localhost.localdomain>
Date: Wed Dec 12 21:14:03 2007 -0600
Fix SteppingEngine aborting when tasks have been only run(bz# 5482).
SteppingEngine.java (updateTerminated): Fix bz #5482.
TestKillCommand.java (testLoadKill): For testing bz #5482.
-----------------------------------------------------------------------
Summary of changes:
frysk-core/frysk/hpd/ChangeLog | 1 +
frysk-core/frysk/hpd/TestKillCommand.java | 24 ++++++++++++++++++++++--
frysk-core/frysk/stepping/ChangeLog | 4 ++++
frysk-core/frysk/stepping/SteppingEngine.java | 5 +++--
4 files changed, 30 insertions(+), 4 deletions(-)
First 500 lines of diff:
diff --git a/frysk-core/frysk/hpd/ChangeLog b/frysk-core/frysk/hpd/ChangeLog
index f1326c3..4313944 100644
--- a/frysk-core/frysk/hpd/ChangeLog
+++ b/frysk-core/frysk/hpd/ChangeLog
@@ -1,6 +1,7 @@
2007-12-12 Rick Moseley <rmoseley@redhat.com>
* TestHpdTestHarness.java: New for testing bz #5480.
+ * TestKillCommand.java (testLoadKill): New for bz #5482.
2007-12-11 Rick Moseley <rmoseley@redhat.com>
diff --git a/frysk-core/frysk/hpd/TestKillCommand.java b/frysk-core/frysk/hpd/TestKillCommand.java
index 338ff8f..fd5571d 100644
--- a/frysk-core/frysk/hpd/TestKillCommand.java
+++ b/frysk-core/frysk/hpd/TestKillCommand.java
@@ -79,8 +79,9 @@ public class TestKillCommand extends TestLib {
* more than the set of commands you see here in one sequence. Just
* uncommenting the next 2 statements after this comment causes this
* test to fail for no good reason. A bug will be filed on this and the
- * lines can be uncommented when fixed.
- e.send("run\n");
+ * lines can be uncommented when fixed. */
+ /*
+ e.send(5, "run", "Attached to process*");
e.expect(5, "Attached to process*");
e.send("go\n");
e.expect(5, "Running process*");
@@ -93,4 +94,23 @@ public class TestKillCommand extends TestLib {
e.expect(5, "Quitting*"); */
e.close();
}
+
+ /**
+ * Test when all you have done is loaded/run the process and not
+ * have done a "go" on it.
+ */
+ public void testLoadKill() {
+ e = new HpdTestbed();
+ e.send("load " + Config.getPkgLibFile("funit-threads-looper").getPath()
+ + "\n");
+ e.expect(5, "Loaded executable file*");
+ e.send("run\n");
+ e.expect(5, "Attached to process*");
+ e.send("kill\n");
+ e.expect(5, "Killing process*");
+ //e.send("quit\n");
+ //e.expect("Quitting*");
+ e.close();
+ }
+
}
diff --git a/frysk-core/frysk/stepping/ChangeLog b/frysk-core/frysk/stepping/ChangeLog
index 787279a..40001c8 100644
--- a/frysk-core/frysk/stepping/ChangeLog
+++ b/frysk-core/frysk/stepping/ChangeLog
@@ -1,3 +1,7 @@
+2007-12-12 Rick Moseley <rmoseley@redhat.com>
+
+ * SteppingEngine.java (updateTerminated): Fix bz# 5482.
+
2007-12-11 Andrew Cagney <cagney@redhat.com>
* TestStepping.java: Update; DebugInfoFrame's .getLines() replaced
diff --git a/frysk-core/frysk/stepping/SteppingEngine.java b/frysk-core/frysk/stepping/SteppingEngine.java
index 9daaf4b..68584ca 100644
--- a/frysk-core/frysk/stepping/SteppingEngine.java
+++ b/frysk-core/frysk/stepping/SteppingEngine.java
@@ -1167,14 +1167,15 @@ public class SteppingEngine {
* as terminated and notify the observers of the event. */
Proc proc = task.getProc();
Integer context = (Integer)SteppingEngine.this.contextMap.get(proc);
- SteppingEngine.this.contextMap.put(proc, new Integer(
+ if (!SteppingEngine.this.contextMap.isEmpty())
+ SteppingEngine.this.contextMap.put(proc, new Integer(
context.intValue() - 1));
TaskStepEngine tse
= (TaskStepEngine)SteppingEngine.this.taskStateMap
.get(task);
// Must have missed the terminating event
- if (tse.isAlive()) {
+ if (tse != null && tse.isAlive()) {
tse.setState(new StepTerminatedState(task));
if (signal)
hooks/post-receive
--
frysk system monitor/debugger