OpenASIP
2.0
|
#include <Watch.hh>
Public Member Functions | |
Watch (const SimulatorFrontend &frontend, const ExpressionScript &expression) | |
virtual | ~Watch () |
virtual bool | isTriggered () const |
virtual std::string | description () const |
virtual StopPoint * | copy () const |
virtual const ExpressionScript & | expression () const |
virtual void | setExpression (const ExpressionScript &expression) |
Public Member Functions inherited from StopPoint | |
StopPoint () | |
virtual | ~StopPoint () |
virtual void | setEnabled (bool flag) |
virtual bool | isEnabled () const |
virtual void | setDisabledAfterTriggered (bool flag) |
virtual bool | isDisabledAfterTriggered () const |
virtual void | setDeletedAfterTriggered (bool flag) |
virtual bool | isDeletedAfterTriggered () const |
virtual void | setCondition (const ConditionScript &condition) |
virtual void | removeCondition () |
virtual const ConditionScript & | condition () const |
virtual bool | isConditional () const |
virtual void | setIgnoreCount (unsigned int count) |
virtual unsigned int | ignoreCount () const |
virtual bool | isConditionOK () |
virtual void | decreaseIgnoreCount () |
Private Member Functions | |
Watch (const Watch &source) | |
Static copying not allowed (should use copy()). More... | |
Private Attributes | |
ExpressionScript | expression_ |
The expression that is watched. More... | |
const SimulatorFrontend & | frontend_ |
The simulator frontend which is used to fetch the current PC. More... | |
bool | isTriggered_ |
Flag which tells whether the watch was triggered in current simulation cycle. More... | |
ClockCycleCount | lastCheckedCycle_ |
The simulation clock cycle in which the expression was checked the last time. More... | |
Additional Inherited Members | |
Protected Attributes inherited from StopPoint | |
bool | enabled_ |
Tells whether the breakpoint is enabled or disabled. More... | |
bool | disabledAfterTriggered_ |
Tells if the breakpoint is disabled after it is triggered the next time. More... | |
bool | deletedAfterTriggered_ |
Tells if the breakpoint is deleted after it is triggered the next time. More... | |
bool | conditional_ |
Tells whether the breakpoint is conditional or not. More... | |
ConditionScript * | condition_ |
The condition which is used to determine whether the breakpoint should be fired or not. More... | |
unsigned int | ignoreCount_ |
The number of times the condition is to be ignored before enabling the breakpoint. More... | |
Represents a simulation watch point.
Watch stops simulation when user-given expression changes its value.
Watch::Watch | ( | const SimulatorFrontend & | frontend, |
const ExpressionScript & | expression | ||
) |
|
virtual |
Copy method for dynamically bound copies.
Implements StopPoint.
Definition at line 65 of file Watch.cc.
References assert, StopPoint::condition_, StopPoint::conditional_, ConditionScript::copy(), StopPoint::deletedAfterTriggered_, StopPoint::disabledAfterTriggered_, StopPoint::enabled_, expression_, frontend_, StopPoint::ignoreCount_, StopPoint::removeCondition(), StopPoint::setCondition(), StopPoint::setDeletedAfterTriggered(), StopPoint::setDisabledAfterTriggered(), StopPoint::setEnabled(), StopPoint::setIgnoreCount(), and Watch().
|
virtual |
Prints the description string of the stop point.
Each subclass overrides this method to construct a descripting string of itself.
Implements StopPoint.
Definition at line 134 of file Watch.cc.
References StopPoint::description(), expression_, and Script::script().
|
virtual |
Returns the expression.
Definition at line 88 of file Watch.cc.
References expression_.
Referenced by ProximBreakpointWindow::refreshStopPoints(), setExpression(), and WatchPropertiesDialog::TransferDataToWindow().
|
virtual |
Returns true in case this watch is triggered.
Returns true in case the expression has changed in current simulation cycle.
Implements StopPoint.
Definition at line 110 of file Watch.cc.
References SimulatorFrontend::cycleCount(), expression_, frontend_, isTriggered_, lastCheckedCycle_, and ExpressionScript::resultChanged().
|
virtual |
Sets the expression the watch is watching.
expression | The new expression. |
Definition at line 98 of file Watch.cc.
References expression(), and expression_.
|
mutableprivate |
The expression that is watched.
Definition at line 66 of file Watch.hh.
Referenced by copy(), description(), expression(), isTriggered(), and setExpression().
|
private |
The simulator frontend which is used to fetch the current PC.
Definition at line 68 of file Watch.hh.
Referenced by copy(), and isTriggered().
|
mutableprivate |
Flag which tells whether the watch was triggered in current simulation cycle.
Definition at line 71 of file Watch.hh.
Referenced by isTriggered().
|
mutableprivate |
The simulation clock cycle in which the expression was checked the last time.
Definition at line 74 of file Watch.hh.
Referenced by isTriggered().