Bug 3872

Summary: {frysk.proc.LinuxPtraceTask@394a229d,pid=17918,tid=17918,state=detaching} in state "detaching" did not handle handleTrappedEvent
Product: frysk Reporter: Mike Cvet <mcvet>
Component: generalAssignee: Unassigned <frysk-bugzilla>
Status: NEW ---    
Severity: normal CC: mcvet
Priority: P2    
Version: unspecified   
Target Milestone: ---   
Host: Target:
Build: Last reconfirmed:
Bug Depends on:    
Bug Blocks: 3346    
Attachments: Test program
Source Window button patch

Description Mike Cvet 2007-01-15 19:11:04 UTC
Here's the story:

public Action updateHit (Task task, long address)
    {
      if (address != this.address)
        {
          System.out.println("Hit wrong address!");
          return Action.CONTINUE;
        }
      else
        {
          cleanUpBreakPoint(task);
          task.requestDeleteCodeObserver(this, address);
        }

      triggered++;
      return Action.CONTINUE;
    }


If "task.requestDeleteCodeObserver(this, address);" is removed, then the 
following core state error does not occur.


{frysk.proc.LinuxPtraceTask@394a229d,pid=17918,tid=17918,state=detaching} in 
state "detaching" did not handle handleTrappedEvent

frysk.proc.State.unhandled(FryskGui)
frysk.proc.TaskState.handleTrappedEvent(FryskGui)
frysk.proc.Task.processTrappedEvent(FryskGui)
frysk.proc.LinuxPtraceHost$PollWaitOnSigChld$5.stopped(FryskGui)
frysk.sys.Wait.waitAllNoHang(FryskGui)
frysk.proc.LinuxPtraceHost$PollWaitOnSigChld.execute(FryskGui)
frysk.event.EventLoop.runEventLoop(FryskGui)
frysk.event.EventLoop.run(FryskGui)
frysk.gui.Gui$3.run(FryskGui)
java.lang.Thread.run(libgcj.so.7rh)
Comment 1 Mark Wielaard 2007-01-15 19:14:23 UTC
Do you have full source code for this test, so I can easily try to reproduce this?

This does say what is happening: state "detaching" did not handle handleTrappedEvent
Should not be that hard to fix I hope.
Comment 2 Mike Cvet 2007-01-15 19:17:18 UTC
Created attachment 1495 [details]
Test program
Comment 3 Mike Cvet 2007-01-15 19:25:13 UTC
Created attachment 1496 [details]
Source Window button patch

Apply this patch to enable the "Step over" button in the SourceWindow.

When running on the test program above, line step through foo() until the call
to jump() is highlighted; and then click "step over" which should cause the
error above.
Comment 4 Mike Cvet 2007-01-15 19:25:58 UTC
Oh, and the code that the blurb in the original comment is taken from is in 
frysk-core/frysk/rt/RunState.java