frysk.proc.live
Class Watchpoint

java.lang.Object
  extended by frysk.proc.live.Watchpoint
All Implemented Interfaces:
Comparable

public class Watchpoint
extends Object
implements Comparable

Internal proc class that represents a Breakpoint at a certain address in a Proc. Some attempts are made to have synchronize different Breakpoint instances at the same address in the same Proc, but currently this isn't a full singleton.


Method Summary
 int compareTo(Object o)
          Uses natural ordering on address.
static Watchpoint create(long address, int length, boolean writeOnly, Task task)
          Creates a Breakpoint for the Proc at the given Address but does not set it yet.
 boolean equals(Object o)
           
 long getAddress()
           
 int getLength()
           
 Task getTask()
          Returns the Proc to which this breakpoint belongs.
 int hashCode()
           
 void install(Task task)
          Installs breakpoint.
 boolean isInstalled()
          Returns true if break point is installed and not yet removed.
 boolean isWriteOnly()
           
 void remove(Task task)
          Removes the breakpoint.
 String toString()
           
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Method Detail

create

public static Watchpoint create(long address,
                                int length,
                                boolean writeOnly,
                                Task task)
Creates a Breakpoint for the Proc at the given Address but does not set it yet. Returns the appropriate Breakpoint depending on host type. If a Breakpoint for this address and proc is already installed that Breakpoint will be returned.


getAddress

public long getAddress()

getLength

public int getLength()

isWriteOnly

public boolean isWriteOnly()

install

public void install(Task task)
Installs breakpoint. Caller must make sure there is no breakpoint set at that address yet and that install() is not called again till remove() is called on it.


remove

public void remove(Task task)
Removes the breakpoint. Caller must make sure it is called only when it is installed and not in the middle of a step.


getTask

public Task getTask()
Returns the Proc to which this breakpoint belongs.


isInstalled

public boolean isInstalled()
Returns true if break point is installed and not yet removed.


hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object o)
Overrides:
equals in class Object

compareTo

public int compareTo(Object o)
Uses natural ordering on address.

Specified by:
compareTo in interface Comparable

toString

public String toString()
Overrides:
toString in class Object