JonathanSalwan / Triton

Triton is a dynamic binary analysis library. Build your own program analysis tools, automate your reverse engineering, perform software verification or just emulate code.
https://triton-library.github.io
Apache License 2.0
3.4k stars 524 forks source link

No "rflags" register in x86_64 architecture #1280

Closed vancaho closed 10 months ago

vancaho commented 10 months ago

Hi, when I call ctx->getRegister("rflags") it throws:

terminate called after throwing an instance of 'triton::exceptions::Cpu'
  what():  x8664Cpu::getRegister(): Invalid register for this architecture.

I read the documentation at https://triton-library.github.io/documentation/doxygen/py_REG_page.html, there is no rflags register for x86_64 architecture, and there are eflags registers for both x86 and x86_64 register.

Is there anything wrong? Should there be a rflags in x86_64?

JonathanSalwan commented 10 months ago

it's the same thing. rflags has its 32msb reserved. In another words, only eflags is used in i386 or x86_64.

JonathanSalwan commented 10 months ago

I'm closing this issue, feel free to continue this thread if you have any questions.