fstep inserts an instruction observer in updateAttached() but doesn't BLOCK and wait till the instruction observer is installed. This makes fstep miss the first few instructions of the process. This might actually be a bug in how instruction observers are installed in the attaching states, not directly in fstep. It is reasonable fstep to assume that in instruction observer is installed immediately instead of being queued in this case. See also the related bug #4663.
fstep needs to keep the task blocked using the attach observer until it as received an ack confirming that the instruction observer has been added; making it consistent with mcvet's testcase.
Fixed by: frysk-core/frysk/bindir/ChangeLog 2007-07-09 Mark Wielaard <mwielaard@redhat.com> Fixes bug #4668 * fstep.java: Implement TaskObserver.Code. (updateAttached): Depending on whether or not the user supplied a command line to execute or a pid to trace either put a breakpoint on the first real instruction or start tracing immediately. Return Action.BLOCK. (updateHit): New method. (addedTo): Unblock task. * TestFStep.java: New test. frysk-core/frysk/proc/live/ChangeLog 2007-07-09 Mark Wielaard <mwielaard@redhat.com> * LinuxTaskState.java (wantToAttachContinue): Add handleAddObservation() and handleUnblock().