1

Suppose that we have bit fields struct like this:

struct PartInfo
{
  unsigned int day:5;
  unsigned int month:4;
  unsigned int year:7;  // year <= 99
  unsigned int lot_no:11;  // lot_no <= 2000
  unsigned int part_id:5;  // part_id <= 30
};

How can I represent it in IDA?

  • Does its official documentation help? – usr2564301 May 3 at 9:46
  • @usr2564301 What about year field and lot_no field? It does not make sense to define all these value in enum. – OShadow May 3 at 10:45
2

You can add a struct with bitfields to the Local Types list (Shift-F1, Ins) but they are not currently supported by the decompiler or on the disassembly level.

| improve this answer | |

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.