Otawa  0.10
BasicBlockDriver.h
Go to the documentation of this file.
1 /*
2  * $Id$
3  * Copyright (c) 2006, IRIT-UPS <casse@irit.fr>.
4  *
5  * otawa/sim/BasicBlockDriver.h -- BasicBlockDriver class interface.
6  */
7 #ifndef OTAWA_SIM_BASICBLOCK_DRIVER_H
8 #define OTAWA_SIM_BASICBLOCK_DRIVER_H
9 
10 #include <otawa/sim/Driver.h>
11 #include <otawa/cfg/BasicBlock.h>
12 
13 namespace otawa {
14 
15 // Extern class
16 class BasicBlock;
17 
18 namespace sim {
19 
20 // BasicBlockDriver class
21 class BasicBlockDriver: public Driver {
23 public:
25 
26  // Driver overload
27  virtual Inst *nextInstruction(State& state, Inst *inst);
28  virtual void terminateInstruction(State& state, Inst *inst);
29 };
30 
31 // BasicBlockDriver inlines
33  ASSERT(bb);
34 }
35 
36 } } // otawa::sim
37 
38 #endif // OTAWA_SIM_BASICBLOCK_DRIVER_H
struct otawa::sem::inst inst
dtd::Element bb(dtd::make("bb", _BB).attr(id).attr(address).attr(size))
This class is used to drive a simulator.
Definition: Driver.h:23
BasicBlockDriver(BasicBlock *bb)
BasicBlockDriver constructor.
Definition: BasicBlockDriver.h:32
virtual Inst * nextInstruction(State &state, Inst *inst)
This method is called each time the simulator needs the next instruction to execute.
Definition: sim_BasicBlockDriver.cpp:29
BasicBlock::InstIter inst
Definition: BasicBlockDriver.h:22
This is the minimal definition of a basic block.
Definition: BasicBlock.h:43
This class represents assembly instruction of a piece of code.
Definition: Inst.h:62
This class represents a running simulator.
Definition: State.h:38
This class is a simulator Driver that executes the instruction sequence found in a basic block...
Definition: BasicBlockDriver.h:21
virtual void terminateInstruction(State &state, Inst *inst)
This method is called when an instruction is terminated.
Definition: sim_BasicBlockDriver.cpp:44
Iterator for instructions in the basic block.
Definition: BasicBlock.h:70