Skip to content

Commit

Permalink
Add a new method in Tritinst and add comments
Browse files Browse the repository at this point in the history
  • Loading branch information
JonathanSalwan committed Feb 6, 2015
1 parent a9a4c76 commit a77895a
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
17 changes: 11 additions & 6 deletions src/components/Tritinst.cpp
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
#include "Tritinst.h"



Tritinst::Tritinst(uint64_t address, std::string insDis)
{
this->address = address;
this->address = address;
this->disassembly = insDis;
}

Expand All @@ -13,27 +12,33 @@ Tritinst::~Tritinst()
{
}


/* Returns the instruction assembly */
const std::string &Tritinst::getDisassembly()
{
return this->disassembly;
}


/* Returns the instruction address */
uint64_t Tritinst::getAddress()
{
return this->address;
}


/* Adds a new element */
void Tritinst::addElement(SymbolicElement *se)
{
this->elements.push_back(se);
}


/* Returns the elements list */
const std::list<SymbolicElement*> &Tritinst::getSymbolicElements()
{
return this->elements;
}

/* Returns the number of elements */
size_t Tritinst::numberOfElements(void)
{
return this->elements.size();
}

1 change: 1 addition & 0 deletions src/includes/Tritinst.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ class Tritinst {
public:
const std::list<SymbolicElement*> &getSymbolicElements();
const std::string &getDisassembly();
size_t numberOfElements(void);
uint64_t getAddress();
void addElement(SymbolicElement *se);

Expand Down

0 comments on commit a77895a

Please sign in to comment.