OpenASIP  2.0
Breakpoint.hh
Go to the documentation of this file.
1 /*
2  Copyright (c) 2002-2009 Tampere University.
3 
4  This file is part of TTA-Based Codesign Environment (TCE).
5 
6  Permission is hereby granted, free of charge, to any person obtaining a
7  copy of this software and associated documentation files (the "Software"),
8  to deal in the Software without restriction, including without limitation
9  the rights to use, copy, modify, merge, publish, distribute, sublicense,
10  and/or sell copies of the Software, and to permit persons to whom the
11  Software is furnished to do so, subject to the following conditions:
12 
13  The above copyright notice and this permission notice shall be included in
14  all copies or substantial portions of the Software.
15 
16  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
19  THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21  FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
22  DEALINGS IN THE SOFTWARE.
23  */
24 /**
25  * @file Breakpoint.hh
26  *
27  * Declaration of Breakpoint class.
28  *
29  * @author Atte Oksman 2005 (oksman-no.spam-cs.tut.fi)
30  * @author Pekka Jääskeläinen 2005 (pjaaskel-no.spam-cs.tut.fi)
31  * @note rating: red
32  */
33 
34 #ifndef TTA_BREAKPOINT_HH
35 #define TTA_BREAKPOINT_HH
36 
37 #include "ConditionScript.hh"
38 #include "BaseType.hh"
39 #include "StopPoint.hh"
40 
41 class SimulatorFrontend;
43 
44 /**
45  * Represents a breakpoint in simulation.
46  *
47  * Breakpoint stops simulation when simulation has reached the user set
48  * instruction address and general condition for stopping is true.
49  */
50 class Breakpoint : public StopPoint {
51 public:
53  virtual ~Breakpoint();
54 
55  virtual bool isTriggered() const;
56  virtual std::string description() const;
57  virtual StopPoint* copy() const;
58 
59  virtual InstructionAddress address() const;
60  virtual void setAddress(InstructionAddress newAddress);
61 
62 private:
63  /// Static copying not allowed (should use copy()).
64  Breakpoint(const Breakpoint& source);
65  /// The address of the breakpoint. A breakpoint is fired when PC equals
66  /// this address.
68  /// The simulator frontend which is used to fetch the current PC.
70 };
71 
72 #endif
Breakpoint::frontend_
SimulatorFrontend & frontend_
The simulator frontend which is used to fetch the current PC.
Definition: Breakpoint.hh:69
InstructionAddress
UInt32 InstructionAddress
Definition: BaseType.hh:175
Breakpoint::address
virtual InstructionAddress address() const
Definition: Breakpoint.cc:86
Breakpoint::setAddress
virtual void setAddress(InstructionAddress newAddress)
Definition: Breakpoint.cc:96
BaseType.hh
Breakpoint
Definition: Breakpoint.hh:50
SimulationEventHandler
Definition: SimulationEventHandler.hh:41
Breakpoint::address_
InstructionAddress address_
The address of the breakpoint. A breakpoint is fired when PC equals this address.
Definition: Breakpoint.hh:67
Breakpoint::copy
virtual StopPoint * copy() const
Definition: Breakpoint.cc:63
ConditionScript.hh
Breakpoint::description
virtual std::string description() const
Definition: Breakpoint.cc:120
StopPoint
Definition: StopPoint.hh:53
Breakpoint::~Breakpoint
virtual ~Breakpoint()
Definition: Breakpoint.cc:56
Breakpoint::Breakpoint
Breakpoint(SimulatorFrontend &frontend, InstructionAddress address)
Definition: Breakpoint.cc:47
StopPoint.hh
Breakpoint::isTriggered
virtual bool isTriggered() const
Definition: Breakpoint.cc:109
SimulatorFrontend
Definition: SimulatorFrontend.hh:89