Go to the documentation of this file.
57 startAddr_(0,
TTAMachine::NullAddressSpace::instance()),
66 parent_(NULL), startAddr_(start), endAddr_(start) {
182 __FILE__, __LINE__,
__func__,
"Instruction not in CodeSnippet");
221 __FILE__, __LINE__,
__func__,
"No instructions.");
256 if (index >= 0 &&
static_cast<unsigned int>(index) <
267 " not in this codesnippet( " +
319 if (&ins.
parent() !=
this)
323 InsList::const_iterator pos =
333 unsigned int next = current + 1;
353 if (&ins.
parent() !=
this)
357 InsList::const_iterator pos =
367 while (insAddress >= 0) {
446 +
" allready has parent:\n " +
472 if ((*iter) == &next) {
495 __FILE__, __LINE__,
"CodeSnippet::insertInstructionBefore",
496 "Instruction already belongs to a procedure.");
522 if ((*iter) == &next) {
535 __FILE__, __LINE__,
"CodeSnippet::insertInstructionBefore",
536 "Instruction already belongs to a procedure.");
560 string msg =
"Instruction doesn't belong to the procedure.";
567 if ((*iter) == &ins) {
806 for (
int i = 0; i < iCount; ++i) {
822 std::string content =
"";
824 for (
int i = 0; i < iCount; ++i) {
Address endAddr_
The highest address of the procedure.
UInt32 InstructionAddress
virtual Instruction & firstInstruction() const
virtual void append(const CodeSnippet &cs)
virtual void setParent(Program &prog)
virtual void setEndAddress(Address end)
virtual void insertBefore(const Instruction &pos, Instruction *ins)
static NullProcedure & instance()
virtual void deleteInstructionAt(InstructionAddress address)
virtual void removeLastInstruction()
virtual void remove(Instruction &ins)
const TTAMachine::AddressSpace & space() const
virtual Instruction & nextInstruction(const Instruction &ins) const
virtual Address startAddress() const
virtual void setStartAddress(Address start)
static std::string toString(const T &source)
virtual std::string disassembly() const
virtual void prepend(const CodeSnippet &cs)
static NullProgram & instance()
#define assert(condition)
virtual void insertAfter(const Instruction &pos, Instruction *ins)
virtual int instructionCount() const
virtual void add(Instruction *ins)
virtual Instruction & operator[](size_t index) const
Instruction * copy() const
virtual Instruction & previousInstruction(const Instruction &ins) const
CodeSnippet & parent() const
virtual bool hasNextInstruction(const Instruction &ins) const
virtual Instruction & lastInstruction() const
InstructionAddress location() const
virtual CodeSnippet * copy() const
static NullInstruction & instance()
virtual void addFront(Instruction *ins)
void setParent(CodeSnippet &proc)
bool isInProcedure() const
virtual Address address(const Instruction &ins) const
static std::string disassemble(const TTAProgram::Move &move)
virtual Program & parent() const
Program * parent_
The parent program of the procedure.
virtual Address endAddress() const
virtual Instruction & instructionAtIndex(int index) const
virtual Instruction & instructionAt(UIntWord address) const
InsList instructions_
The instructions in this procedure.
Address startAddr_
The start (lowest) address of the procedure.
bool hasFinalAddress() const
virtual bool isInProgram() const