public inbox for frysk-cvs@sourceware.org
help / color / mirror / Atom feed
* [SCM] master: Mark Task as justStarted when receiving an ExecedEvent.
@ 2008-04-09 14:14 mark
0 siblings, 0 replies; only message in thread
From: mark @ 2008-04-09 14:14 UTC (permalink / raw)
To: frysk-cvs
The branch, master has been updated
via a3efa3a7e09b2760484ce7e6b0d67e74b170e8bb (commit)
from d1a490efa853a1a7c0d4c8f9c19e104950ade138 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email.
- Log -----------------------------------------------------------------
commit a3efa3a7e09b2760484ce7e6b0d67e74b170e8bb
Author: Mark Wielaard <mwielaard@redhat.com>
Date: Wed Apr 9 16:06:46 2008 +0200
Mark Task as justStarted when receiving an ExecedEvent.
frysk-core/frysk/proc/ChangeLog
2008-04-09 Mark Wielaard <mwielaard@redhat.com>
* TestTaskObserverInstruction (testFirstInstructionAtEntry):
New test.
frysk-core/frysk/proc/live/ChangeLog
2008-04-09 Mark Wielaard <mwielaard@redhat.com>
* LinuxPtraceTaskState.java (Running.handleExecedEvent): Mark
Task as justStarted.
-----------------------------------------------------------------------
Summary of changes:
frysk-core/frysk/proc/ChangeLog | 5 +++
.../frysk/proc/TestTaskObserverInstruction.java | 27 ++++++++++++++++++++
frysk-core/frysk/proc/live/ChangeLog | 5 +++
.../frysk/proc/live/LinuxPtraceTaskState.java | 4 +++
4 files changed, 41 insertions(+), 0 deletions(-)
First 500 lines of diff:
diff --git a/frysk-core/frysk/proc/ChangeLog b/frysk-core/frysk/proc/ChangeLog
index ffcdbbf..eab7ef8 100644
--- a/frysk-core/frysk/proc/ChangeLog
+++ b/frysk-core/frysk/proc/ChangeLog
@@ -1,3 +1,8 @@
+2008-04-09 Mark Wielaard <mwielaard@redhat.com>
+
+ * TestTaskObserverInstruction (testFirstInstructionAtEntry):
+ New test.
+
2008-04-07 Stan Cox <scox@redhat.com>
* Host.java (requestCreateAttachedProc): Add libs parameter. Change
diff --git a/frysk-core/frysk/proc/TestTaskObserverInstruction.java b/frysk-core/frysk/proc/TestTaskObserverInstruction.java
index d5e3d2a..546a763 100644
--- a/frysk-core/frysk/proc/TestTaskObserverInstruction.java
+++ b/frysk-core/frysk/proc/TestTaskObserverInstruction.java
@@ -43,6 +43,9 @@ import frysk.testbed.TestLib;
import frysk.testbed.Offspring;
import frysk.testbed.SlaveOffspring;
+import frysk.testbed.DaemonBlockedAtEntry;
+import frysk.config.Config;
+
public class TestTaskObserverInstruction extends TestLib
{
public void testInstruction()
@@ -136,6 +139,30 @@ public class TestTaskObserverInstruction extends TestLib
assertTrue("InstructionObserver hit", instr.hit == 2);
}
+ /**
+ * Tests stepping the very first instruction (actualy the start of the
+ * dynamic loader which is going to load the actual program). This is
+ * a nasty corner case since this isn't a "real step" but actually the
+ * kernel adjusting the task so that it will start running.
+ */
+ public void testFirstInstructionAtEntry()
+ {
+ DaemonBlockedAtEntry daemon;
+ daemon = new DaemonBlockedAtEntry(Config.getPkgLibFile("funit-child"));
+ Task task = daemon.getMainTask();
+
+ InstructionObserver instr = new InstructionObserver();
+ task.requestAddInstructionObserver(instr);
+ assertRunUntilStop("add InstructionObserver");
+ assertTrue("InstructionObserver added", instr.added);
+ assertTrue("InstructionObserver hit", instr.hit == 1);
+
+ daemon.requestUnblock();
+ task.requestUnblock(instr);
+ assertRunUntilStop("step first instruction");
+ assertTrue("InstructionObserver hit again", instr.hit == 2);
+ }
+
private class StepAttachedObserver implements TaskAttachedObserverXXX
{
private final InstructionObserver instr;
diff --git a/frysk-core/frysk/proc/live/ChangeLog b/frysk-core/frysk/proc/live/ChangeLog
index 99e9c3a..1435679 100644
--- a/frysk-core/frysk/proc/live/ChangeLog
+++ b/frysk-core/frysk/proc/live/ChangeLog
@@ -1,3 +1,8 @@
+2008-04-09 Mark Wielaard <mwielaard@redhat.com>
+
+ * LinuxPtraceTaskState.java (Running.handleExecedEvent): Mark
+ Task as justStarted.
+
2008-04-08 Phil Muldoon <pmuldoon@redhat.com>
Mark Wielaard <mwielaard@redhat.com>
diff --git a/frysk-core/frysk/proc/live/LinuxPtraceTaskState.java b/frysk-core/frysk/proc/live/LinuxPtraceTaskState.java
index 3e590c4..9a71530 100644
--- a/frysk-core/frysk/proc/live/LinuxPtraceTaskState.java
+++ b/frysk-core/frysk/proc/live/LinuxPtraceTaskState.java
@@ -891,6 +891,10 @@ abstract class LinuxPtraceTaskState extends State {
((TaskObservation) i.next()).delete();
}
+ // Mark this LinuxPtraceTask as just started. See
+ // Running.handleTrapped for more explanation.
+ task.justStartedXXX = true;
+
if (task.notifyExeced() > 0) {
return (task.syscallObservers.numberOfObservers() > 0
? syscallBlockedInSyscallContinue
hooks/post-receive
--
frysk system monitor/debugger
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2008-04-09 14:14 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-04-09 14:14 [SCM] master: Mark Task as justStarted when receiving an ExecedEvent mark
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).