I checked how to get type information here - https://www.hex-rays.com/products/ida/support/idapython_docs/ida_typeinf.html

Although, I am not sure what these different type prefixes mean. For e.g. BT_{type}, BTMT_{type}, BTF_{type}, etc. I couldn't find any information which distinguishes these types.

1 Answer 1


typeinf.hpp is the most complex header file in the IDA SDK. Although it's reasonably well-designed once you understand how to use it, there is likely to be a lot of difficulty in your near future. You probably want to start by ignoring the part of the header that your question asks about, and instead look at the class tinfo_t, which is the primary data structure that IDA uses to represent types. From there, look at its member functions. For example, here are a number of member functions:

  • bool tinfo_t::is_ptr()
  • bool tinfo_t::is_array()
  • bool tinfo_t::is_func()
  • bool tinfo_t::is_complex()
  • bool tinfo_t::is_struct()
  • bool tinfo_t::is_union()
  • bool tinfo_t::is_udt()
  • bool tinfo_t::is_enum()

That should get you started. Good luck! You'll need it!

  • thanks so much for your comment, now I am using these functions for implementation. do you know the difference between decl_floating and floating?
    – R4444
    Dec 6, 2021 at 16:44
  • 1
    I can't fully answer this, unfortunately. tinfo_t has a notion of a "declared type" (decltype) and a "real type" realtype). The tinfo_t holds the decltype inside of it, so doing things with it is very fast. As for the realtype, operations have to ask IDA about it, which is slower. Speed aside, the difference has something to do with typedefs, "type references", and "ordinals". For example, the declared type of a typedef is BTF_TYPEDEF, but if you want information about the type that the typedef refers to, you'll need to use the realtype functions. Sorry my answer is bad! Dec 6, 2021 at 19:03
  • no, thanks so much for your answer! that really helps. I appreciate that
    – R4444
    Dec 6, 2021 at 19:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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