Index: frysk-core/frysk/proc/Proc.java =================================================================== RCS file: /cvs/frysk/frysk-core/frysk/proc/Proc.java,v retrieving revision 1.112 diff -u -r1.112 Proc.java --- frysk-core/frysk/proc/Proc.java 2 Jul 2007 14:40:17 -0000 1.112 +++ frysk-core/frysk/proc/Proc.java 6 Aug 2007 14:30:02 -0000 @@ -41,6 +41,7 @@ package frysk.proc; import java.util.ArrayList; +import java.util.Collection; import java.util.HashMap; import java.util.HashSet; import java.util.Iterator; @@ -472,9 +473,11 @@ } /** - * The set of observations that currently apply to this task. + * The set of observations that currently apply to this task. Note + * that this is a Collection that may contain the same Observer + * object multiple times (for possible different observations). */ - private Set observations = new HashSet(); + private Collection observations = new LinkedList(); public boolean addObservation (Object o) { Index: frysk-core/frysk/proc/TestTaskObserverCode.java =================================================================== RCS file: /cvs/frysk/frysk-core/frysk/proc/TestTaskObserverCode.java,v retrieving revision 1.7 diff -u -r1.7 TestTaskObserverCode.java --- frysk-core/frysk/proc/TestTaskObserverCode.java 3 Aug 2007 23:33:33 -0000 1.7 +++ frysk-core/frysk/proc/TestTaskObserverCode.java 6 Aug 2007 14:30:02 -0000 @@ -161,15 +161,16 @@ RemovingCodeObserver code = new RemovingCodeObserver(); task.requestUnblock(attachedObserver); task.requestAddCodeObserver(code, address1); + assertRunUntilStop("add breakpoint observer at address1"); task.requestAddCodeObserver(code, address2); - assertRunUntilStop("add breakpoint observer"); + assertRunUntilStop("add breakpoint observer at address1"); assertEquals(code.hits, 0); // Request a run and watch the breakpoint get hit. requestDummyRun(); - while (!terminatingObserver.terminating) - assertRunUntilStop("task terminating"); + assertRunUntilStop("wait for delete 1"); + assertRunUntilStop("wait for delete 2"); assertEquals(code.hits, 2); assertEquals(code.deletes, 2);