I'm looking to define a structure in IDA like:

struct StructA {
    int a;
    int b;
} StructA;

struct StructB {
    StructA a;
    int b;
} StructB;

Can I do this in IDA's structure definition box without having to redefine all the members from StructA in StructB?


1 Answer 1


Yes. In StructB, select the field you want to convert to a sub-structure or create a new field by pressing D. With the given field selected, press Alt+Q and select StructA for the field.

  • 1
    Additionally, check out the "Local Types" window. It can digest the native C structure (right-click and select "Insert"). Which then can be synchronized over to the structures window (right-click on the local type and choose "Syncronize to idb"). Additionally, the Local Types window can accept typedefs and packing pragmas. In my opinion, it's the better way when manipulating structure definitions. Mar 14, 2014 at 12:51
  • @withzombies Nevermind, I was doing it wrong! Thanks.
    – crush
    Apr 3, 2014 at 15:39

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.