-
Notifications
You must be signed in to change notification settings - Fork 10
Description
Bit of background: the construct for referencing templates within a pointer is already a bit weird, designed in a way so as to minimize the complexity of each particular ethdebug/format/pointer/collection/* schema. It works by composing a reference collection inside a scope collection:
pointers:
Template:
# ethdebug/format/pointer/template
expect: [expected-variable]
in:
name: template-region
location: memory
offset: expected-variable
length: 32
# wrapper ethdebug/format/pointer/collection/scope
define:
expected-variable: 5
for:
# inner ethdebug/format/pointer/collection/reference
template: TemplateThe expectation for debugger implementations is to aggregate a flat list of all the regions that are generated when observing runtime state; multiple regions of the same name are fine and recognized by the spec for real reasons (e.g. when pointing to all the items in an array, this naïve approach is sufficiently fine).
But if you want to reuse the same template multiple times, in multiple places (like inside a very large struct), this becomes extremely unwieldy.
It seems likely that the schema for these references will need to be expanded to accommodate the renaming of regions, similar to how some code that calls a reusable function gets to name the function's return values. This change will also require updating the reference implementation and its documentation.