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?

2
  • Does its official documentation help?
    – Jongware
    May 3, 2020 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, 2020 at 10:45

1 Answer 1

3

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.

Your Answer

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

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