Bug 4388

Summary: frysk.proc.TestBreakpoints switches event threads
Product: frysk Reporter: Andrew Cagney <cagney>
Component: generalAssignee: Andrew Cagney <cagney>
Status: RESOLVED FIXED    
Severity: normal    
Priority: P2    
Version: unspecified   
Target Milestone: ---   
Host: Target:
Build: Last reconfirmed:
Bug Depends on:    
Bug Blocks: 1522    

Description Andrew Cagney 2007-04-17 17:02:02 UTC
All ptrace calls must originate from the one thread, and if that thread is the
event-loop thread it can't change.
Comment 1 Andrew Cagney 2007-04-17 17:03:01 UTC
2007-04-17  Andrew Cagney  <cagney@redhat.com>

        * TestBreakpoints.java (monitor): Delete.
        (TerminatingObserver.addFailed, CodeObserver.addedTo)
        (CodeObserver.deletedFrom): Replace "monitor" with call to
        EventLoop.requestStop.
        (GoAround): New class.
        (testHitAndRun, testInsertRemove, testAddLots): Delete call to
        EventLoop.start; use GoAround class.

2007-04-16  Andrew Cagney  <cagney@redhat.com>

        * TestBreakpoints.java (setUp): Add the terminating observer.
        (TerminatingObserver.addedTo): Simplify, call
        eventLoop.requestStop.
        (terminating, exitSignal, exitValue): Move to TerminatingObserver.
        (terminatingObserver): Add.

        * TestBreakpoints.java (AttachedObserver.updateAttatched):
        Simplify, call eventLoop.requestStop.
        (AttatchedObserver.addedTo): Simplify, do nothing.
        (attatched): Delete.
        (setUp): Add the attatched observer.
        (attatchedObserver): Add.

        * TestBreakpoints.java: Make everything possible private.
        (setUp): Use assertRunUntilStop.
        (EventLoopRunner): Delete, has races.
        (AttatchedObserver.added, .isAdded)
        (TerminatingObserver.added, .isAdded): Delete.
        (AttatchedObserver.addFailed, TerminatingObserver.addFailed): Do
        not print stack backtrace when failing.
        (procTerminated): Delete unused.