3e8f304138
Found when trying to measure ctx of yaffs2, which relies on incomplete structs to hide some internal state (yaffs_summary_tags, yaffs_DIR). This is less common in microcontroller filesystems since almost all structs end up statically/stack allocated, and you can't statically allocate incomplete structs. It's not too surprising, but incomplete structs have no associated DW_AT_byte_size in the relevant dwarf info, which broke ctx.py and structs.py... As a workaround, I'm now defaulting to size=0 if DW_AT_byte_size is missing. --- With this fix, at least structs.py is able to pick up the later internal definition of yaffs_summary_tags. ctx.py doesn't because it only looks at the unique dwarf offset referenced by the function definition, but I'm hesitant to try anything more clever here. yaffs_DIR is noteworthy in that there is simply no complete definition. Internally, yaffs_DIR pointers alias yaffsfs_DirSearchContext structs. In this case I think returning size=0 is the only reasonable option.