summaryrefslogtreecommitdiff
path: root/test/lit/binary/debug-bad-binary.test
Commit message (Collapse)AuthorAgeFilesLines
* In --debug mode, print partial wasm data that was read (#5356)Alon Zakai2022-12-151-0/+42
If wasm-opt or wasm-dis are given an invalid binary, after the error message we can also print out the wasm we did manage to read. That includes global stuff like imports and also all the functions up until there. This can help debugging in some situations. Only do this when --debug is passed as it can be very verbose and in general users might not want it. This is technically easy to do, it turns out, since we already use a thrown exception on an error in parsing, and we fill up the wasm as we go, so it just contains what we've read so far, and we can just print it. Fixes #5344 Also switch an existing test's comments to ;; from # which was noticed here.