wasmgdb

Crates.iowasmgdb
lib.rswasmgdb
version0.1.22
sourcesrc
created_at2022-11-15 09:43:57.295999
updated_at2023-08-07 10:31:25.537798
descriptiongdb for WebAssembly
homepage
repositoryhttps://github.com/xtuc/wasm-coredump/tree/main/bin/wasmgdb
max_upload_size
id715559
size112,712
Sven Sauleau (xtuc)

documentation

README

wasmgdb

Think gdb for WebAssembly

Install

cargo install wasmgdb

Usage

Use wasm-coredump-rewriter to transform your module and, once WebAssembly traps, collect the WebAssembly memory and analyze the coredump.

Analyze a coredump

wasmgdb <source.wasm> <coredump.data>

Commands

bt

Display the stack trace.

f <#>

Selects a stack frame and display informations.

p <expr>

Inspect the content of a variable. Requires to select the frame with f first.

p *<expr>

Inspect the content of a variable after dereferencing it. Requires to select the frame with f first.

p/s <expr>

Print the variable as string. Requires to select the frame with f first.

p (<type>) <expr>

Print the content of as .

x/<number> <hex-addr>

Examine the memory address at with length.

x/<number>s <hex-addr>

Examine the memory address at and prints as string of length.

find <expr>

Find the as bytes in memory.

Usage: find <start-addr>, <end-addr>, <expr> find <expr>

info types

List all defined types.

info locals

List local values (includes Wasm func arguments).

info symbol <funcidx>

Get informations about the function at the given index.

info imports

List WebAssembly module's imported functions from the host.

info functions

List all defined functions.

info globals

List globals.

info process

Information about the process.

Expr

  • Member access: <object>-><member>
  • Cast: (<type>) <hex-addr>
  • String: "<string>"
Commit count: 0

cargo fmt