Open fitzgen opened 1 year ago
I think it's acceptable to use an empty vector for missing/truncated locals, a debugger can refer to the source WebAssembly module for number/types of locals. Works with stack as well but has to be computed.
Yeah, this makes sense to me too.
In Wasmtime, we don't currently include locals or the operand stack in core dumps currently (although we intend to soon) and in fact have even lost all information about how many locals there were or the size of the operand stack. Therefore, we emit empty vecs for locals and the operand stack, rather than a vec of N
missing
values, because we don't even know N.I think this is reasonable behavior for an optimizing compiler, but also something that we should probably explicitly document as acceptable so that coredump-consuming tools are given a heads up and consider this case.
I wanted to bounce this off folks before making a PR adding such language.
Thoughts?
cc @xtuc @dschuff @itsrainy