1*97e0b7dbSAlex Crichton# Core Dumps
2*97e0b7dbSAlex Crichton
3*97e0b7dbSAlex CrichtonYou can also [browse this source code online][code] and clone the wasmtime
4*97e0b7dbSAlex Crichtonrepository to run the example locally.
5*97e0b7dbSAlex Crichton
6*97e0b7dbSAlex Crichton[code]: https://github.com/bytecodealliance/wasmtime/blob/main/examples/fib-debug/main.rs
7*97e0b7dbSAlex Crichton
8*97e0b7dbSAlex CrichtonThis examples shows how to configure capturing [core dumps] when a Wasm guest
9*97e0b7dbSAlex Crichtontraps that can then be passed to external tools (like [`wasmgdb`]) for
10*97e0b7dbSAlex Crichtonpost-mortem analysis.
11*97e0b7dbSAlex Crichton
12*97e0b7dbSAlex Crichton[core dumps]: https://github.com/WebAssembly/tool-conventions/blob/main/Coredump.md
13*97e0b7dbSAlex Crichton[`wasmgdb`]: https://github.com/xtuc/wasm-coredump/blob/main/bin/wasmgdb/README.md
14*97e0b7dbSAlex Crichton
15*97e0b7dbSAlex Crichton## Host Source
16*97e0b7dbSAlex Crichton
17*97e0b7dbSAlex Crichton<!-- langtabs-start -->
18*97e0b7dbSAlex Crichton
19*97e0b7dbSAlex Crichton```rust
20*97e0b7dbSAlex Crichton{{#include ../examples/coredump.rs}}
21*97e0b7dbSAlex Crichton```
22*97e0b7dbSAlex Crichton
23*97e0b7dbSAlex Crichton<!-- langtabs-end -->
24