OpenASIP
2.0
|
#include <Breakpoint.hh>
Public Member Functions | |
Breakpoint (SimulatorFrontend &frontend, InstructionAddress address) | |
virtual | ~Breakpoint () |
virtual bool | isTriggered () const |
virtual std::string | description () const |
virtual StopPoint * | copy () const |
virtual InstructionAddress | address () const |
virtual void | setAddress (InstructionAddress newAddress) |
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 | |
Breakpoint (const Breakpoint &source) | |
Static copying not allowed (should use copy()). More... | |
Private Attributes | |
InstructionAddress | address_ |
The address of the breakpoint. A breakpoint is fired when PC equals this address. More... | |
SimulatorFrontend & | frontend_ |
The simulator frontend which is used to fetch the current PC. 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 breakpoint in simulation.
Breakpoint stops simulation when simulation has reached the user set instruction address and general condition for stopping is true.
Definition at line 50 of file Breakpoint.hh.
Breakpoint::Breakpoint | ( | SimulatorFrontend & | frontend, |
InstructionAddress | address | ||
) |
|
virtual |
|
private |
Static copying not allowed (should use copy()).
|
virtual |
Returns the address the breakpoint is watching.
Definition at line 86 of file Breakpoint.cc.
References address_.
Referenced by ProximDisassemblyGridTable::GetValue(), ProximBreakpointWindow::onBreakpointLookup(), ProximDisassemblyWindow::onRightClick(), and ProximBreakpointWindow::refreshStopPoints().
|
virtual |
Copy method for dynamically bound copies.
Implements StopPoint.
Definition at line 63 of file Breakpoint.cc.
References address_, assert, Breakpoint(), StopPoint::condition_, StopPoint::conditional_, ConditionScript::copy(), StopPoint::deletedAfterTriggered_, StopPoint::disabledAfterTriggered_, StopPoint::enabled_, frontend_, StopPoint::ignoreCount_, StopPoint::removeCondition(), StopPoint::setCondition(), StopPoint::setDeletedAfterTriggered(), StopPoint::setDisabledAfterTriggered(), StopPoint::setEnabled(), and StopPoint::setIgnoreCount().
|
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 120 of file Breakpoint.cc.
References address_, StopPoint::description(), and Conversion::toString().
|
virtual |
Returns true in case this break point is triggered.
In case the current program counter is the address this break point is watching, and the general condition is ok, this method returns true.
Implements StopPoint.
Definition at line 109 of file Breakpoint.cc.
References address_, frontend_, and SimulatorFrontend::programCounter().
|
virtual |
Sets the address the breakpoint is watching.
newAddress | The address. |
Definition at line 96 of file Breakpoint.cc.
References address_.
Referenced by SimControlLanguageCommand::parseBreakpoint().
|
private |
The address of the breakpoint. A breakpoint is fired when PC equals this address.
Definition at line 67 of file Breakpoint.hh.
Referenced by address(), copy(), description(), isTriggered(), and setAddress().
|
private |
The simulator frontend which is used to fetch the current PC.
Definition at line 69 of file Breakpoint.hh.
Referenced by copy(), and isTriggered().