27 this->callbacks = callbacks;
43 triton::extlibs::capstone::cs_close(&this->handle);
47 void riscv32Cpu::disassInit(
void) {
49 triton::extlibs::capstone::cs_close(&this->handle);
53 auto rv_mode =
static_cast<triton::extlibs::capstone::cs_mode
>((1 << 0) | (1 << 2));
54 if (triton::extlibs::capstone::cs_open(triton::extlibs::capstone::CS_ARCH_RISCV, rv_mode, &this->handle) != triton::extlibs::capstone::CS_ERR_OK)
57 triton::extlibs::capstone::cs_option(this->handle, triton::extlibs::capstone::CS_OPT_DETAIL, triton::extlibs::capstone::CS_OPT_ON);
61 void riscv32Cpu::copy(
const riscv32Cpu& other) {
62 this->callbacks = other.callbacks;
63 this->
memory = other.memory;
65 std::memcpy(this->
x0, other.x0,
sizeof(this->x0));
66 std::memcpy(this->
x1, other.x1,
sizeof(this->x1));
67 std::memcpy(this->
sp, other.sp,
sizeof(this->sp));
68 std::memcpy(this->
x3, other.x3,
sizeof(this->x3));
69 std::memcpy(this->
x4, other.x4,
sizeof(this->x4));
70 std::memcpy(this->
x5, other.x5,
sizeof(this->x5));
71 std::memcpy(this->
x6, other.x6,
sizeof(this->x6));
72 std::memcpy(this->
x7, other.x7,
sizeof(this->x7));
73 std::memcpy(this->
x8, other.x8,
sizeof(this->x8));
74 std::memcpy(this->
x9, other.x9,
sizeof(this->x9));
75 std::memcpy(this->
x10, other.x10,
sizeof(this->x10));
76 std::memcpy(this->
x11, other.x11,
sizeof(this->x11));
77 std::memcpy(this->
x12, other.x12,
sizeof(this->x12));
78 std::memcpy(this->
x13, other.x13,
sizeof(this->x13));
79 std::memcpy(this->
x14, other.x14,
sizeof(this->x14));
80 std::memcpy(this->
x15, other.x15,
sizeof(this->x15));
81 std::memcpy(this->
x16, other.x16,
sizeof(this->x16));
82 std::memcpy(this->
x17, other.x17,
sizeof(this->x17));
83 std::memcpy(this->
x18, other.x18,
sizeof(this->x18));
84 std::memcpy(this->
x19, other.x19,
sizeof(this->x19));
85 std::memcpy(this->
x20, other.x20,
sizeof(this->x20));
86 std::memcpy(this->
x21, other.x21,
sizeof(this->x21));
87 std::memcpy(this->
x22, other.x22,
sizeof(this->x22));
88 std::memcpy(this->
x23, other.x23,
sizeof(this->x23));
89 std::memcpy(this->
x24, other.x24,
sizeof(this->x24));
90 std::memcpy(this->
x25, other.x25,
sizeof(this->x25));
91 std::memcpy(this->
x26, other.x26,
sizeof(this->x26));
92 std::memcpy(this->
x27, other.x27,
sizeof(this->x27));
93 std::memcpy(this->
x28, other.x28,
sizeof(this->x28));
94 std::memcpy(this->
x29, other.x29,
sizeof(this->x29));
95 std::memcpy(this->
x30, other.x30,
sizeof(this->x30));
96 std::memcpy(this->
x31, other.x31,
sizeof(this->x31));
97 std::memcpy(this->
pc, other.pc,
sizeof(this->pc));
98 std::memcpy(this->
f0, other.f0,
sizeof(this->f0));
99 std::memcpy(this->
f1, other.f1,
sizeof(this->f1));
100 std::memcpy(this->
f2, other.f2,
sizeof(this->f2));
101 std::memcpy(this->
f3, other.f3,
sizeof(this->f3));
102 std::memcpy(this->
f4, other.f4,
sizeof(this->f4));
103 std::memcpy(this->
f5, other.f5,
sizeof(this->f5));
104 std::memcpy(this->
f6, other.f6,
sizeof(this->f6));
105 std::memcpy(this->
f7, other.f7,
sizeof(this->f7));
106 std::memcpy(this->
f8, other.f8,
sizeof(this->f8));
107 std::memcpy(this->
f9, other.f9,
sizeof(this->f9));
108 std::memcpy(this->
f10, other.f10,
sizeof(this->f10));
109 std::memcpy(this->
f11, other.f11,
sizeof(this->f11));
110 std::memcpy(this->
f12, other.f12,
sizeof(this->f12));
111 std::memcpy(this->
f13, other.f13,
sizeof(this->f13));
112 std::memcpy(this->
f14, other.f14,
sizeof(this->f14));
113 std::memcpy(this->
f15, other.f15,
sizeof(this->f15));
114 std::memcpy(this->
f16, other.f16,
sizeof(this->f16));
115 std::memcpy(this->
f17, other.f17,
sizeof(this->f17));
116 std::memcpy(this->
f18, other.f18,
sizeof(this->f18));
117 std::memcpy(this->
f19, other.f19,
sizeof(this->f19));
118 std::memcpy(this->
f20, other.f20,
sizeof(this->f20));
119 std::memcpy(this->
f21, other.f21,
sizeof(this->f21));
120 std::memcpy(this->
f22, other.f22,
sizeof(this->f22));
121 std::memcpy(this->
f23, other.f23,
sizeof(this->f23));
122 std::memcpy(this->
f24, other.f24,
sizeof(this->f24));
123 std::memcpy(this->
f25, other.f25,
sizeof(this->f25));
124 std::memcpy(this->
f26, other.f26,
sizeof(this->f26));
125 std::memcpy(this->
f27, other.f27,
sizeof(this->f27));
126 std::memcpy(this->
f28, other.f28,
sizeof(this->f28));
127 std::memcpy(this->
f29, other.f29,
sizeof(this->f29));
128 std::memcpy(this->
f30, other.f30,
sizeof(this->f30));
129 std::memcpy(this->
f31, other.f31,
sizeof(this->f31));
138 std::memset(this->
x0, 0x00,
sizeof(this->
x0));
139 std::memset(this->
x1, 0x00,
sizeof(this->
x1));
140 std::memset(this->
sp, 0x00,
sizeof(this->
sp));
141 std::memset(this->
x3, 0x00,
sizeof(this->
x3));
142 std::memset(this->
x4, 0x00,
sizeof(this->
x4));
143 std::memset(this->
x5, 0x00,
sizeof(this->
x5));
144 std::memset(this->
x6, 0x00,
sizeof(this->
x6));
145 std::memset(this->
x7, 0x00,
sizeof(this->
x7));
146 std::memset(this->
x8, 0x00,
sizeof(this->
x8));
147 std::memset(this->
x9, 0x00,
sizeof(this->
x9));
148 std::memset(this->
x10, 0x00,
sizeof(this->
x10));
149 std::memset(this->
x11, 0x00,
sizeof(this->
x11));
150 std::memset(this->
x12, 0x00,
sizeof(this->
x12));
151 std::memset(this->
x13, 0x00,
sizeof(this->
x13));
152 std::memset(this->
x14, 0x00,
sizeof(this->
x14));
153 std::memset(this->
x15, 0x00,
sizeof(this->
x15));
154 std::memset(this->
x16, 0x00,
sizeof(this->
x16));
155 std::memset(this->
x17, 0x00,
sizeof(this->
x17));
156 std::memset(this->
x18, 0x00,
sizeof(this->
x18));
157 std::memset(this->
x19, 0x00,
sizeof(this->
x19));
158 std::memset(this->
x20, 0x00,
sizeof(this->
x20));
159 std::memset(this->
x21, 0x00,
sizeof(this->
x21));
160 std::memset(this->
x22, 0x00,
sizeof(this->
x22));
161 std::memset(this->
x23, 0x00,
sizeof(this->
x23));
162 std::memset(this->
x24, 0x00,
sizeof(this->
x24));
163 std::memset(this->
x25, 0x00,
sizeof(this->
x25));
164 std::memset(this->
x26, 0x00,
sizeof(this->
x26));
165 std::memset(this->
x27, 0x00,
sizeof(this->
x27));
166 std::memset(this->
x28, 0x00,
sizeof(this->
x28));
167 std::memset(this->
x29, 0x00,
sizeof(this->
x29));
168 std::memset(this->
x30, 0x00,
sizeof(this->
x30));
169 std::memset(this->
x31, 0x00,
sizeof(this->
x31));
170 std::memset(this->
pc, 0x00,
sizeof(this->
pc));
171 std::memset(this->
f0, 0x00,
sizeof(this->
f0));
172 std::memset(this->
f1, 0x00,
sizeof(this->
f1));
173 std::memset(this->
f2, 0x00,
sizeof(this->
f2));
174 std::memset(this->
f3, 0x00,
sizeof(this->
f3));
175 std::memset(this->
f4, 0x00,
sizeof(this->
f4));
176 std::memset(this->
f5, 0x00,
sizeof(this->
f5));
177 std::memset(this->
f6, 0x00,
sizeof(this->
f6));
178 std::memset(this->
f7, 0x00,
sizeof(this->
f7));
179 std::memset(this->
f8, 0x00,
sizeof(this->
f8));
180 std::memset(this->
f9, 0x00,
sizeof(this->
f9));
181 std::memset(this->
f10, 0x00,
sizeof(this->
f10));
182 std::memset(this->
f11, 0x00,
sizeof(this->
f11));
183 std::memset(this->
f12, 0x00,
sizeof(this->
f12));
184 std::memset(this->
f13, 0x00,
sizeof(this->
f13));
185 std::memset(this->
f14, 0x00,
sizeof(this->
f14));
186 std::memset(this->
f15, 0x00,
sizeof(this->
f15));
187 std::memset(this->
f16, 0x00,
sizeof(this->
f16));
188 std::memset(this->
f17, 0x00,
sizeof(this->
f17));
189 std::memset(this->
f18, 0x00,
sizeof(this->
f18));
190 std::memset(this->
f19, 0x00,
sizeof(this->
f19));
191 std::memset(this->
f20, 0x00,
sizeof(this->
f20));
192 std::memset(this->
f21, 0x00,
sizeof(this->
f21));
193 std::memset(this->
f22, 0x00,
sizeof(this->
f22));
194 std::memset(this->
f23, 0x00,
sizeof(this->
f23));
195 std::memset(this->
f24, 0x00,
sizeof(this->
f24));
196 std::memset(this->
f25, 0x00,
sizeof(this->
f25));
197 std::memset(this->
f26, 0x00,
sizeof(this->
f26));
198 std::memset(this->
f27, 0x00,
sizeof(this->
f27));
199 std::memset(this->
f28, 0x00,
sizeof(this->
f28));
200 std::memset(this->
f29, 0x00,
sizeof(this->
f29));
201 std::memset(this->
f30, 0x00,
sizeof(this->
f30));
202 std::memset(this->
f31, 0x00,
sizeof(this->
f31));
218 return (this->
isGPR(regId) || this->
isFPU(regId) || regId == triton::arch::ID_REG_RV32_PC);
228 return ((regId >= triton::arch::ID_REG_RV32_X0 && regId <= triton::arch::ID_REG_RV32_X31) ?
true :
false);
233 return ((regId >= triton::arch::ID_REG_RV32_F0 && regId <= triton::arch::ID_REG_RV32_F31) ?
true :
false);
266 std::set<const triton::arch::Register*> ret;
268 for (
const auto& kv: this->
id2reg) {
269 auto regId = kv.first;
270 const auto& reg = kv.second;
273 if (reg.getSize() == this->
gprSize())
277 else if (this->
isFPU(regId))
287 return this->
id2reg.at(
id);
288 }
catch (
const std::out_of_range&) {
295 std::string lower = name;
296 std::transform(lower.begin(), lower.end(), lower.begin(), [](
unsigned char c){ return std::tolower(c); });
299 }
catch (
const std::out_of_range&) {
326 triton::extlibs::capstone::cs_insn* insn;
346 triton::extlibs::capstone::cs_detail* detail = insn->detail;
349 std::stringstream str;
351 str << insn[0].mnemonic;
352 if (detail->riscv.op_count)
353 str <<
" " << insn[0].op_str;
368 triton::extlibs::capstone::cs_riscv_op* op = &(detail->riscv.operands[n]);
372 case triton::extlibs::capstone::RISCV_OP_IMM: {
376 imm.setValue(op->imm, 0);
383 case triton::extlibs::capstone::RISCV_OP_MEM: {
407 case triton::extlibs::capstone::RISCV_OP_REG: {
418 if (detail->groups_count > 0) {
420 if (detail->groups[n] == triton::extlibs::capstone::RISCV_GRP_JUMP)
422 if (detail->groups[n] == triton::extlibs::capstone::RISCV_GRP_JUMP ||
423 detail->groups[n] == triton::extlibs::capstone::RISCV_GRP_CALL ||
424 detail->groups[n] == triton::extlibs::capstone::RISCV_GRP_RET)
430 triton::extlibs::capstone::cs_free(insn, count);
438 if (execCallbacks && this->callbacks)
441 auto it = this->
memory.find(addr);
442 if (it == this->
memory.end()) {
455 if (execCallbacks && this->callbacks)
472 std::vector<triton::uint8> area;
475 area.push_back(this->getConcreteMemoryValue(baseAddr+index, execCallbacks));
484 if (execCallbacks && this->callbacks)
486 switch (reg.
getId()) {
487 case triton::arch::ID_REG_RV32_X0:
return 0;
562 if (execCallbacks && this->callbacks)
564 this->
memory[addr] = value;
574 throw triton::exceptions::Register(
"riscv32Cpu::setConcreteMemoryValue(): You cannot set this concrete value (too big) to this memory access.");
579 if (execCallbacks && this->callbacks)
591 this->
memory.reserve(values.size() + this->memory.size());
592 for (
triton::usize index = 0; index < values.size(); index++) {
609 throw triton::exceptions::Register(
"riscv32Cpu::setConcreteRegisterValue(): You cannot set this concrete value (too big) to this register.");
611 if (execCallbacks && this->callbacks)
614 switch (reg.
getId()) {
615 case triton::arch::ID_REG_RV32_X0:
break;
718 if (this->
memory.find(baseAddr + index) == this->memory.end()) {
733 if (this->
memory.find(baseAddr + index) != this->memory.end()) {
734 this->
memory.erase(baseAddr + index);
TRITON_EXPORT triton::uint512 getMaxValue(void) const
Returns the max possible value of the bitvector.
TRITON_EXPORT void setBits(triton::uint32 high, triton::uint32 low)
Sets the bits (high, low) position.
This class is used to represent an instruction.
TRITON_EXPORT triton::uint32 getSize(void) const
Returns the size of the instruction.
TRITON_EXPORT void setDisassembly(const std::string &str)
Sets the disassembly of the instruction.
TRITON_EXPORT const triton::uint8 * getOpcode(void) const
Returns the opcode of the instruction.
TRITON_EXPORT void setType(triton::uint32 type)
Sets the type of the instruction.
TRITON_EXPORT void setAddress(triton::uint64 addr)
Sets the address of the instruction.
TRITON_EXPORT triton::uint32 getType(void) const
Returns the type of the instruction.
TRITON_EXPORT void setArchitecture(triton::arch::architecture_e arch)
Sets the instruction's architecture.
TRITON_EXPORT triton::uint64 getAddress(void) const
Returns the address of the instruction.
TRITON_EXPORT void setBranch(bool flag)
Sets flag to define this instruction as branch or not.
TRITON_EXPORT void setSize(triton::uint32 size)
Sets the size of the instruction.
std::vector< triton::arch::OperandWrapper > operands
A list of operands.
TRITON_EXPORT void setControlFlow(bool flag)
Sets flag to define this instruction changes the control flow or not.
This class is used to represent a memory access.
TRITON_EXPORT void setDisplacement(const triton::arch::Immediate &displacement)
LEA - Sets the displacement operand.
TRITON_EXPORT triton::uint64 getAddress(void) const
Returns the address of the memory.
TRITON_EXPORT triton::uint32 getSize(void) const
Returns the size (in bytes) of the memory vector.
TRITON_EXPORT void setBaseRegister(const triton::arch::Register &base)
LEA - Sets the base register operand.
This class is used as operand wrapper.
This class is used when an instruction has a register operand.
TRITON_EXPORT triton::arch::register_e getParent(void) const
Returns the parent id of the register.
TRITON_EXPORT triton::arch::register_e getId(void) const
Returns the id of the register.
TRITON_EXPORT triton::uint32 getSize(void) const
Returns the size (in bytes) of the register.
This class is used to describe the RV32 spec.
triton::uint8 f25[triton::size::qword]
Concrete value of f25.
TRITON_EXPORT void setThumb(bool state)
Sets CPU state to Thumb mode.
triton::uint8 sp[triton::size::dword]
Concrete value of sp.
triton::uint8 x14[triton::size::dword]
Concrete value of x14.
triton::uint8 x20[triton::size::dword]
Concrete value of x20.
TRITON_EXPORT triton::uint32 numberOfRegisters(void) const
Returns the number of registers according to the CPU architecture.
triton::uint8 x0[triton::size::dword]
Concrete value of x0.
triton::uint8 x12[triton::size::dword]
Concrete value of x12.
triton::uint8 x31[triton::size::dword]
Concrete value of x31.
triton::uint8 x15[triton::size::dword]
Concrete value of x15.
TRITON_EXPORT bool isFlag(triton::arch::register_e regId) const
Returns true if the register ID is a flag.
triton::uint8 x10[triton::size::dword]
Concrete value of x10.
triton::uint8 f11[triton::size::qword]
Concrete value of f11.
triton::uint8 x13[triton::size::dword]
Concrete value of x13.
triton::uint8 f0[triton::size::qword]
Concrete value of f0.
TRITON_EXPORT bool isThumb(void) const
Returns true if the execution mode is Thumb. Only useful for Arm32.
TRITON_EXPORT const std::unordered_map< triton::arch::register_e, const triton::arch::Register > & getAllRegisters(void) const
Returns all registers.
TRITON_EXPORT bool isGPR(triton::arch::register_e regId) const
Returns true if regId is a GRP.
TRITON_EXPORT triton::uint512 getConcreteRegisterValue(const triton::arch::Register ®, bool execCallbacks=true) const
Returns the concrete value of a register.
triton::uint8 x26[triton::size::dword]
Concrete value of x26.
triton::uint8 x22[triton::size::dword]
Concrete value of x22.
TRITON_EXPORT const triton::arch::Register & getRegister(triton::arch::register_e id) const
Returns register from id.
triton::uint8 f6[triton::size::qword]
Concrete value of f6.
TRITON_EXPORT void disassembly(triton::arch::Instruction &inst)
Disassembles the instruction according to the architecture.
triton::uint8 f20[triton::size::qword]
Concrete value of f20.
triton::uint8 f23[triton::size::qword]
Concrete value of f23.
TRITON_EXPORT bool isConcreteMemoryValueDefined(const triton::arch::MemoryAccess &mem) const
Returns true if memory cells have a defined concrete value.
triton::uint8 x19[triton::size::dword]
Concrete value of x19.
triton::uint8 f12[triton::size::qword]
Concrete value of f12.
triton::uint8 f3[triton::size::qword]
Concrete value of f3.
triton::uint8 x6[triton::size::dword]
Concrete value of x6.
TRITON_EXPORT riscv32Cpu & operator=(const riscv32Cpu &other)
Copies a riscv32Cpu class.
triton::uint8 x29[triton::size::dword]
Concrete value of x29.
triton::uint8 f2[triton::size::qword]
Concrete value of f2.
triton::uint8 x25[triton::size::dword]
Concrete value of x25.
TRITON_EXPORT bool isRegister(triton::arch::register_e regId) const
Returns true if the register ID is a register.
triton::uint8 pc[triton::size::dword]
Concrete value of pc.
triton::uint8 x24[triton::size::dword]
Concrete value of x24.
triton::uint8 f17[triton::size::qword]
Concrete value of f17.
TRITON_EXPORT std::set< const triton::arch::Register * > getParentRegisters(void) const
Returns all parent registers.
std::unordered_map< triton::uint64, triton::uint8, IdentityHash< triton::uint64 > > memory
map of address -> concrete value
triton::uint8 x9[triton::size::dword]
Concrete value of x9.
TRITON_EXPORT void clear(void)
Clears the architecture states (registers and memory).
triton::uint8 f24[triton::size::qword]
Concrete value of f24.
triton::uint8 f26[triton::size::qword]
Concrete value of f26.
TRITON_EXPORT const triton::arch::Register & getStackPointer(void) const
Returns the stack pointer register.
TRITON_EXPORT std::vector< triton::uint8 > getConcreteMemoryAreaValue(triton::uint64 baseAddr, triton::usize size, bool execCallbacks=true) const
Returns the concrete value of a memory area.
TRITON_EXPORT bool isRegisterValid(triton::arch::register_e regId) const
Returns true if the register ID is valid.
triton::uint8 x18[triton::size::dword]
Concrete value of x18.
triton::uint8 x7[triton::size::dword]
Concrete value of x7.
triton::uint8 f21[triton::size::qword]
Concrete value of f21.
triton::uint8 x5[triton::size::dword]
Concrete value of x5.
triton::uint8 x4[triton::size::dword]
Concrete value of x4.
triton::uint8 x21[triton::size::dword]
Concrete value of x21.
triton::uint8 x8[triton::size::dword]
Concrete value of x8.
TRITON_EXPORT triton::arch::endianness_e getEndianness(void) const
Returns the kind of endianness as triton::arch::endianness_e.
TRITON_EXPORT triton::uint32 gprSize(void) const
Returns the bit in byte of the General Purpose Registers.
triton::uint8 f4[triton::size::qword]
Concrete value of f4.
TRITON_EXPORT triton::uint32 gprBitSize(void) const
Returns the bit in bit of the General Purpose Registers.
TRITON_EXPORT bool isFPU(triton::arch::register_e regId) const
Returns true if regId is a FPU register.
triton::uint8 f22[triton::size::qword]
Concrete value of f22.
triton::uint8 f16[triton::size::qword]
Concrete value of f16.
triton::uint8 f10[triton::size::qword]
Concrete value of f10.
triton::uint8 f29[triton::size::qword]
Concrete value of f29.
triton::uint8 x11[triton::size::dword]
Concrete value of x11.
triton::uint8 f15[triton::size::qword]
Concrete value of f15.
triton::uint8 x23[triton::size::dword]
Concrete value of x23.
triton::uint8 x27[triton::size::dword]
Concrete value of x27.
triton::uint8 f31[triton::size::qword]
Concrete value of f31.
virtual TRITON_EXPORT ~riscv32Cpu()
Destructor.
triton::uint8 f18[triton::size::qword]
Concrete value of f18.
TRITON_EXPORT void setConcreteRegisterValue(const triton::arch::Register ®, const triton::uint512 &value, bool execCallbacks=true)
[architecture api] - Sets the concrete value of a register.
TRITON_EXPORT riscv32Cpu(triton::callbacks::Callbacks *callbacks=nullptr)
Constructor.
TRITON_EXPORT bool isMemoryExclusive(const triton::arch::MemoryAccess &mem) const
Returns true if the given memory access is tagged as exclusive. Only valid for Arm32 and AArch64.
TRITON_EXPORT const triton::arch::Register & getParentRegister(const triton::arch::Register ®) const
Returns parent register from a given one.
TRITON_EXPORT const triton::arch::Register & getProgramCounter(void) const
Returns the program counter register.
triton::uint8 x30[triton::size::dword]
Concrete value of x30.
TRITON_EXPORT const std::unordered_map< triton::uint64, triton::uint8, IdentityHash< triton::uint64 > > & getConcreteMemory(void) const
Return all memory.
triton::uint8 x1[triton::size::dword]
Concrete value of x1.
TRITON_EXPORT void setConcreteMemoryValue(const triton::arch::MemoryAccess &mem, const triton::uint512 &value, bool execCallbacks=true)
[architecture api] - Sets the concrete value of memory cells.
TRITON_EXPORT void setConcreteMemoryAreaValue(triton::uint64 baseAddr, const std::vector< triton::uint8 > &values, bool execCallbacks=true)
[architecture api] - Sets the concrete value of a memory area.
triton::uint8 x17[triton::size::dword]
Concrete value of x17.
triton::uint8 f5[triton::size::qword]
Concrete value of f5.
triton::uint8 x3[triton::size::dword]
Concrete value of x3.
triton::uint8 f13[triton::size::qword]
Concrete value of f13.
triton::uint8 f28[triton::size::qword]
Concrete value of f28.
triton::uint8 f1[triton::size::qword]
Concrete value of f1.
TRITON_EXPORT void clearConcreteMemoryValue(const triton::arch::MemoryAccess &mem)
Clears concrete values assigned to the memory cells.
triton::uint8 f9[triton::size::qword]
Concrete value of f9.
triton::uint8 f14[triton::size::qword]
Concrete value of f14.
triton::uint8 x16[triton::size::dword]
Concrete value of x16.
triton::uint8 x28[triton::size::dword]
Concrete value of x28.
TRITON_EXPORT triton::uint512 getConcreteMemoryValue(const triton::arch::MemoryAccess &mem, bool execCallbacks=true) const
Returns the concrete value of memory cells.
triton::uint8 f8[triton::size::qword]
Concrete value of f8.
triton::uint8 f19[triton::size::qword]
Concrete value of f19.
triton::uint8 f27[triton::size::qword]
Concrete value of f27.
TRITON_EXPORT void setMemoryExclusiveTag(const triton::arch::MemoryAccess &mem, bool tag)
Sets exclusive memory access tag. Only valid for Arm32 and AArch64.
triton::uint8 f7[triton::size::qword]
Concrete value of f7.
triton::uint8 f30[triton::size::qword]
Concrete value of f30.
The riscvSpecifications class defines specifications about the RV32 and RV64 CPU.
TRITON_EXPORT triton::uint32 capstoneInstructionToTritonInstruction(triton::uint32 id) const
Converts a capstone's instruction id to a triton's instruction id.
std::unordered_map< triton::arch::register_e, const triton::arch::Register > id2reg
List of registers specification available for this architecture.
TRITON_EXPORT triton::uint32 getMemoryOperandSpecialSize(triton::uint32 id) const
Returns memory access size if it is specified by instruction.
TRITON_EXPORT triton::arch::register_e capstoneRegisterToTritonRegister32(triton::uint32 id) const
Converts a capstone's register id to a triton's register id for RV32.
TRITON_EXPORT triton::ast::SharedAbstractNode processCallbacks(triton::callbacks::callback_e kind, triton::ast::SharedAbstractNode node)
Processes callbacks according to the kind and the C++ polymorphism.
The exception class used by all CPUs.
The exception class used by the disassembler.
The exception class used by register operands.
register_e
Types of register.
@ ID_REG_LAST_ITEM
must be the last item
constexpr triton::uint32 byte
byte size in bit
constexpr triton::uint32 dword
dword size in bit
@ GET_CONCRETE_REGISTER_VALUE
@ GET_CONCRETE_MEMORY_VALUE
@ SET_CONCRETE_MEMORY_VALUE
@ SET_CONCRETE_REGISTER_VALUE
constexpr triton::uint32 dword
dword size in byte
constexpr triton::uint32 dqqword
dqqword size in byte
constexpr triton::uint32 byte
byte size in byte
std::int32_t sint32
signed 32-bits
std::size_t usize
unsigned MAX_INT 32 or 64 bits according to the CPU.
std::uint64_t uint64
unisgned 64-bits
std::uint32_t uint32
unisgned 32-bits
std::uint8_t uint8
unisgned 8-bits