Bug 4668 - fstep misses first few instructions
Summary: fstep misses first few instructions
Status: RESOLVED FIXED
Alias: None
Product: frysk
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
: P2 normal
Target Milestone: ---
Assignee: Unassigned
URL:
Keywords:
Depends on: 4663
Blocks:
  Show dependency treegraph
 
Reported: 2007-06-20 15:52 UTC by Mark Wielaard
Modified: 2007-07-09 16:34 UTC (History)
0 users

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Wielaard 2007-06-20 15:52:26 UTC
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.
Comment 1 Andrew Cagney 2007-06-20 16:49:23 UTC
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.
Comment 2 Mark Wielaard 2007-07-09 16:34:54 UTC
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().