Stream: git-wasmtime

Topic: wasmtime / PR #10405 Add a `wasmtime objdump` subcommand


view this post on Zulip Wasmtime GitHub notifications bot (Mar 15 2025 at 17:30):

alexcrichton opened PR #10405 from alexcrichton:objdump to bytecodealliance:main:

This commit adds an objdump subcommand to the wasmtime CLI. Like all
other subcommands this can be disabled for a more minimal build of the
CLI as well. The purpose of this subcommand is to provide a
Wasmtime-specific spin on the venerable native objdump itself. Notably
this brings Wasmtime-specific knowledge for filtering functions, showing
Wasmtime metadata, etc.

This command is intended to look like objdump roughly but also has
configurable output with various flags and things that can be printed.
For now the main Wasmtime additions are showing the address map
section, stack map section, and trap section of a *.cwasm file.

This new subcommand replaces the infrastructure of the disas test
suite, and now that test suite uses wasmtime objdump to generate test
expectations. Additionally the subcommand replaces the Pulley objdump
example as a more full-featured objdump that also works natively with
Pulley.

The hope is that if we add more binary metadata in the future (such as
unwinding tables) that can be relatively easily added here for
exploration as well. Otherwise this is mostly just a developer
convenience for Wasmtime developers as well and hopefully doesn't cost
too much in maintenance burden.

Closes https://github.com/bytecodealliance/wasmtime/issues/10336

view this post on Zulip Wasmtime GitHub notifications bot (Mar 15 2025 at 17:30):

alexcrichton requested fitzgen for a review on PR #10405.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 15 2025 at 17:30):

alexcrichton requested wasmtime-core-reviewers for a review on PR #10405.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 15 2025 at 17:30):

alexcrichton requested wasmtime-compiler-reviewers for a review on PR #10405.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 15 2025 at 17:30):

alexcrichton requested wasmtime-default-reviewers for a review on PR #10405.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 15 2025 at 17:31):

alexcrichton commented on PR #10405:

I'll note that this is built on https://github.com/bytecodealliance/wasmtime/pull/10404 currently and an example output looks like this:

<img width="763" alt="Screenshot 2025-03-15 at 12 31 14 PM" src="https://github.com/user-attachments/assets/268af977-b8cd-48cf-ba6c-397dbb4a05bb" />

view this post on Zulip Wasmtime GitHub notifications bot (Mar 15 2025 at 18:46):

github-actions[bot] commented on PR #10405:

Subscribe to Label Action

cc @fitzgen, @saulecabrera

<details>
This issue or pull request has been labeled: "cranelift", "pulley", "wasmtime:api", "wasmtime:docs", "winch"

Thus the following users have been cc'd because of the following labels:

To subscribe or unsubscribe from this label, edit the <code>.github/subscribe-to-label.json</code> configuration file.

Learn more.
</details>

view this post on Zulip Wasmtime GitHub notifications bot (Mar 17 2025 at 16:26):

alexcrichton updated PR #10405.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 17 2025 at 16:27):

alexcrichton updated PR #10405.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 17 2025 at 20:04):

fitzgen submitted PR review:

Looks fantastic! (modulo my comments on the stack-maps-in-an-elf-section bits in the other PR)

Thanks for putting this together, it is going to be super helpful going forward

view this post on Zulip Wasmtime GitHub notifications bot (Mar 17 2025 at 20:04):

fitzgen created PR review comment:

These seem like they should all be on by default?

view this post on Zulip Wasmtime GitHub notifications bot (Mar 17 2025 at 20:49):

alexcrichton submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 17 2025 at 20:49):

alexcrichton created PR review comment:

Personally I found the address map pretty noisy so I'm not sure we'd want to have that on-by-default. For the others I figured it wasn't too too hard to enable but it means we'd need flags to disable them. Flags-to-disable I find a bit cumbersome with with clap so I left it as off-by-default.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 17 2025 at 20:52):

alexcrichton updated PR #10405.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 17 2025 at 20:52):

alexcrichton commented on PR #10405:

It'll take me some time to work through the stack map bits, so I'm splitting that out of this PR

view this post on Zulip Wasmtime GitHub notifications bot (Mar 19 2025 at 16:49):

alexcrichton commented on PR #10405:

I'm going to go ahead and merge this but @fitzgen I'm happy to continue to iterate on the CLI and defaults if you'd like

view this post on Zulip Wasmtime GitHub notifications bot (Mar 19 2025 at 16:57):

alexcrichton updated PR #10405.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 19 2025 at 16:57):

alexcrichton has enabled auto merge for PR #10405.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 19 2025 at 17:40):

fitzgen submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 19 2025 at 17:40):

fitzgen created PR review comment:

Yeah that makes sense :+1:

view this post on Zulip Wasmtime GitHub notifications bot (Mar 19 2025 at 19:15):

alexcrichton updated PR #10405.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 19 2025 at 19:15):

alexcrichton requested wasmtime-fuzz-reviewers for a review on PR #10405.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 19 2025 at 19:16):

alexcrichton commented on PR #10405:

This PR now depends on https://github.com/bytecodealliance/wasmtime/pull/10423 and is temporarily rebased on it

view this post on Zulip Wasmtime GitHub notifications bot (Mar 19 2025 at 19:34):

alexcrichton updated PR #10405.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 19 2025 at 20:45):

github-actions[bot] commented on PR #10405:

Subscribe to Label Action

cc @fitzgen

<details>
This issue or pull request has been labeled: "fuzzing"

Thus the following users have been cc'd because of the following labels:

To subscribe or unsubscribe from this label, edit the <code>.github/subscribe-to-label.json</code> configuration file.

Learn more.
</details>

view this post on Zulip Wasmtime GitHub notifications bot (Mar 20 2025 at 19:08):

alexcrichton updated PR #10405.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 20 2025 at 19:09):

alexcrichton has enabled auto merge for PR #10405.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 20 2025 at 19:45):

alexcrichton merged PR #10405.


Last updated: Apr 17 2025 at 01:31 UTC