I’m working on writing some ELF parsing templates/scripts, one of which is for parsing DWARF debugging info. DWARF requires a bit of deferred parsing of certain variables until later when the values of other variables are parsed/known.
I’ve found that I can sometimes make do with declaring local strings (since they are a resizable local type) and then writing to them later, often with Str() and Read*() functions. However, this has quite a few downsides:
- Requires a string converted stack to keep track of a variable amount of data
- Can’t show the location of data in the parsed file
- Can’t display a struct this way
- Can’t use startof() on it since it’s a local variable
Another workaround I’ve been using is declaring another struct after an initial pass, but this too has downsides, especially with variable organization.
Being able to to add variables to a struct/array after leaving it, or being able declare a placeholder that could later be replaced by a variable/struct or removed, would greatly help with grouping of relevant information.
On a similar topic, being able to display certain template variables/structs in the script variables window would be extremely useful for multi-file parsing.
Being able to combine these two capabilities would be the best, as I think it’d enable much better multi-file parsing. Especially for resolution of symbols/data from shared libraries for ELF files, in my case.
I don’t know the details of the 010editor internals, so there may be other options that would be better/more suitable for templates and scripts, or there may be no feasible way to implement these things at all, but pointers seem like they could provide these capabilities. The help topics say that no pointers are currently allowed, so does that mean that they may be allowed in future versions, or is the feasibility of implementing pointers not looking too great?