0

As per this already answered question How to get the CPU architecture via Idapython?, for reasons I'm unable to figure out, both inf.is_64bit() and inf.is_32bit() are not working for me. I'm using IDA C++ SDK v7.1. Even if the executable in the database is 64-bit, it still goes through the 32-bit check. Any idea why this is happening?

2
  • What CPU architectures have you tested? x86/amd64, ARMv7/ARMv8a, or something else?
    – Robert
    Feb 26 '20 at 18:07
  • The sample I'm testing is a 64-bit Windows executable file loaded into the 64-bit version of IDA. So, if I run both APIs on it, they both return True!
    – Xigma
    Feb 26 '20 at 18:15
0

I figured it out. To determine if the binary is

  • 32-bit: (inf.is_32bit() && !inf.is_64bit())
  • 64-bit: (inf.is_64bit() && inf.is_32bit())

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.