]> git.siccegge.de Git - frida/frida.git/blobdiff - src/disassembler/Instruction.hxx
Rework API for getting at instructions
[frida/frida.git] / src / disassembler / Instruction.hxx
diff --git a/src/disassembler/Instruction.hxx b/src/disassembler/Instruction.hxx
new file mode 100644 (file)
index 0000000..e79b24f
--- /dev/null
@@ -0,0 +1,23 @@
+#ifndef INCLUDE__Instruction_hxx_
+#define INCLUDE__Instruction_hxx_
+
+#include <vector>
+#include <cstdint>
+#include <string>
+
+class Instruction {
+public:
+       Instruction(uint64_t address, const std::string& text, const std::vector<uint8_t>& bytes, const std::string& reference)
+               : address(address), text(text), bytes(bytes), reference(reference) {}
+       uint64_t getAddress() const {return address;}
+       const std::string& getText() const {return text;}
+       const std::vector<uint8_t>& getBytes() const {return bytes;}
+       const std::string& getReference() const {return reference;}
+private:
+       uint64_t address;
+       std::string text;
+       std::vector<uint8_t> bytes;
+       std::string reference;
+};
+
+#endif /* INCLUDE__Instruction_hxx_ */