I'm experimenting with a visualizer using parsers compiled to python but I don't understand how to reliably and generically determine which fields were added during the parse (and which fields my visualizer should look into).
Let me use elf.ksy as an example. Starting at the top level object myElf (object of type Elf), I can use keys from the myElf._debug dictionary or the myElf.SEQ_FIELDS list to know to look into 'magic', 'abi', 'endian', and so on.
The problem is that sometimes critical fields are not named in the ._debug or .SEQ_FIELDS attributes. For example myElf.header._debug does not have keys 'program_headers' and 'section_headers' but myElf.program_headers and myElf.section_headers exist and are important to be seen in the viewer.
The web IDE presents these fields, so where am I going wrong?
I'm experimenting with a visualizer using parsers compiled to python but I don't understand how to reliably and generically determine which fields were added during the parse (and which fields my visualizer should look into).
Let me use elf.ksy as an example. Starting at the top level object myElf (object of type Elf), I can use keys from the myElf._debug dictionary or the myElf.SEQ_FIELDS list to know to look into 'magic', 'abi', 'endian', and so on.
The problem is that sometimes critical fields are not named in the ._debug or .SEQ_FIELDS attributes. For example myElf.header._debug does not have keys 'program_headers' and 'section_headers' but myElf.program_headers and myElf.section_headers exist and are important to be seen in the viewer.
The web IDE presents these fields, so where am I going wrong?