1 #ifndef INCLUDE__BasicBlock_hxx
2 #define INCLUDE__BasicBlock_hxx
11 class InformationManager;
12 class QXmlStreamWriter;
13 class QXmlStreamReader;
17 InformationManager* getManager() const {return manager;}
18 uint64_t getStartAddress() const {return start_address;}
19 uint64_t getEndAddress() const {return end_address;}
20 void setStartAddress(uint64_t address) {start_address = address;}
21 void setEndAddress(uint64_t address) {end_address = address;}
23 uint64_t getNextBlock(size_t index) const {
25 return next_blocks[index];
28 void setNextBlock(size_t index, uint64_t address) {
30 next_blocks[index] = address;
33 std::string getName() const {
35 s << "BLOCK_" << std::hex << start_address << '_' << end_address;
39 std::vector<Instruction> getInstructions() const;
40 void serialize(QXmlStreamWriter& stream);
41 static BasicBlock* deserialize(QXmlStreamReader& stream, InformationManager* manager);
44 BasicBlock(uint64_t start_address, InformationManager* manager)
45 : start_address(start_address)
52 uint64_t start_address;
54 Disassembler* disassembler;
55 InformationManager* manager;
56 uint64_t next_blocks[2];
58 friend class InformationManager;