#include <cassert>
#include <string>
#include <sstream>
+#include <vector>
+class Instruction;
class Disassembler;
class InformationManager;
class QXmlStreamWriter;
class BasicBlock {
public:
- uint64_t getStartAddress() const {
- return start_address;
- }
-
- uint64_t getEndAddress() const {
- return end_address;
- }
+ InformationManager* getManager() const {return manager;}
+ uint64_t getStartAddress() const {return start_address;}
+ uint64_t getEndAddress() const {return end_address;}
+ void setStartAddress(uint64_t address) {start_address = address;}
+ void setEndAddress(uint64_t address) {end_address = address;}
uint64_t getNextBlock(size_t index) const {
assert(index < 2);
next_blocks[index] = address;
}
- void setStartAddress(uint64_t address) {
- start_address = address;
- }
-
- void setEndAddress(uint64_t address) {
- end_address = address;
- }
-
std::string getName() const {
std::stringstream s;
s << "BLOCK_" << std::hex << start_address << '_' << end_address;
return s.str();
}
- InformationManager* getManager() const {
- return manager;
- }
-
+ std::vector<Instruction> getInstructions() const;
void serialize(QXmlStreamWriter& stream);
static BasicBlock* deserialize(QXmlStreamReader& stream, InformationManager* manager);