Proc.getIsa should be evaluated lazy style. Clearly it isn't or something is pulling that value when it isn't needed.
Any updates or results? Suggest creating a test case that demonstrates the getIsa criteria: - when a process is detached the isa is invalid - when a process is attached the isa is valid by transitioning a process through attached and detached events checking that it gets its state changed
Added TestCase to check memory is null when not attached and not null when attached. November 24, 2006 frysk-core/frysk/proc/CL * TestMemory.java: Added. * TaskState.java (Attached.transitionToRunningState): Changed to notify static Task observable. (detaching.handleStoppedEvent): Ditto. * Task.java (ObservableXXX): Made static. (taskStateAttached.update): Ditto. (taskStateDetached.update): Ditto. (Task): Removed add observer from here and made static so any task that attaches gets data filled.
More test cases that should be looked at: Test that isa is a singleton. (Unless switching between 32 and 64 bit execs) Test switching between 32 and 64 bit execs. Test Attach, Detach, Attach agan, (Detach again), etc. Test Attach, create attached child process.
(In reply to comment #3) > More test cases that should be looked at: > > Test that isa is a singleton. (Unless switching between 32 and 64 bit execs) Done: TestIsa.testIsaSingleton > Test switching between 32 and 64 bit execs. TestIsa.test64To32Isa() and test64To32To64(). > Test Attach, Detach, Attach agan, (Detach again), etc. TestIsa.testAttachDetachAttachAgainDetachAgainAtachAgainAgain(). > Test Attach, create attached child process. TestIsa.testAttachedCreateAttachedChild(), testAttachedCreateAttachedClone() and testAttachedCreateChild().
Fixed December 5, 2006 frysk-core/frysk/proc/CL * LinuxTask.java (fillRegisterBank): Added. (fillMemory): Added. (LinuxTask): Removed calls to setupMapsXXX/fill memory and register banks. * DummyTask.java (fillRegisterBank): Added. (fillMemory): Added. * TestIsa.java (AttachedObserver.updateAttached): Added call to try to detect isa. (For "on-demand" access of isa). (testAttachDetachAttachAgainDetachAgainAttachAgainAgain): Enabled. (testIsa): Enabled. * TaskState.java (detaching.handleStoppedEvent): notify Task that the given task has detached. * Task.java (TaskStateObservable): Added. (TaskStateObservable.notify): Added. (taskStateDetached): Added. (getRegisterBank): Added. Fills register bank if null. (clearIsa): Added. (static.update): When a task detaches, clear it's Isa information. (getMemory): Fill memory if null.