Triton: x64 instruction processing problem
Hi, I am trying to handle sub rsp, 0x28h instruction. I’ve setup architecture using api->setArchitecture(arch::ARCH_X86_64); to be x64 before calling the code below:
tritonInst->clear();
tritonInst->setOpcode((uint8*)"\x48\x83\xec\x28", 4); // sub rsp, 0x28h.
tritonInst->setSize(4);
tritonInst->setAddress(pc); // pc actually has this sub rsp,0x28h opcode but I explicitly defined it in setOpcode below just to make sure we are processing the right opcode.
tritonInst->setThreadId((triton::uint32)threadID);
if (!api->processing(*tritonInst))
dr_printf("not supported!\n");
Output: not supported!
Is there some API to better understand why it is happening ?
I tried to print disassembly using the following code:
api->disassembly(*tritonInst);
printf("disas = %s\n", tritonInst->getDisassembly().c_str());
Output: sub
Then, I am trying to debug and printing all registers:
[>] concretizeAndSetAllRegisters ENTER rax [>] getCurrentRegisterValue ENTER [<] getCurrentRegisterValue EXIT zmm30 [>] getCurrentRegisterValue ENTER [!] tracer::pintool::context::getCurrentRegisterValue(): Invalid register: zmm30
zmm30 looks very strange and I am not sure whether this is related or not…
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 29 (10 by maintainers)
Ok, I am having this problem when capstone.dll is dynamically linked with triton.dll. When I link capstone statically with triton everything works fine. Thank you everyone, problem solved ! 😃
This is what I get with my build in master. I compiled Triton and all the dependencies with VS2013 x64