wasm-coredump-rewriter
wasm-coredump-rewriter
is used to add Coredump generation to a compiled Wasm
module.
Installation
Usage
Step 1: rewrite the Wasm module
Rewrite the source Wasm module to inject the Coredump runtime code. The runtime will catch traps (excluding traps in host functions or memory violations) and generate a coredump.
Use the following command:
The Coredump runtime has a performance cost.
Step 2: Wasm execution trapped
Your program entered a trap and a Coredump was generated.
To extract the Coredump write the Wasm instance memory to a file, for instance in JavaScript:
const instance = await ;
try catch
Step 3: analyzing / debugging the coredump
See wasmgdb for analyzing / debugging the coredump.