Stream: wasmtime

Topic: Variable not available


view this post on Zulip Scott Waye (Oct 25 2025 at 01:20):

On aarch64, I'm trying to debug some wasm and using

lldb wasmtime

Then

breakpoint set --file StackFrame.NativeAot.Wasm.cs --line 42
process launch -- run -Ccache=no -Oopt-level=0 -S http -Ddebug-info=y /home/scott/github/runtimelab-sep/artifacts/bin/System.Diagnostics.StackTrace.Tests/Debug/net10.0/wasi-wasm/publish/System.Diagnostics.StackTrace.Tests.wasm

The breakpoint is hit.

 p __vmctx->set()
(lldb) frame variable
(WasmtimeVMContext *) __vmctx = 0x0000aaab19392a30
(WebAssemblyPtrWrapper<S_P_CoreLib_System_Diagnostics_StackFrame>) __this = <variable not available>

(bool) includeFileInfo = <variable not available>

(WebAssemblyRefWrapper<bool>) isStackTraceHidden = <variable not available>

(int) ip = <variable not available>

(WebAssemblyRefWrapper<System_String>) result = <variable not available>

And my variables are not available,

(lldb) p __this
error: Couldn't materialize: couldn't get the value of variable __this: variable not available
error: errored out in DoExecute, couldn't PrepareToExecuteJITExpression

Any thing I can try?

view this post on Zulip Scott Waye (Oct 25 2025 at 01:22):

I tried wasmtime 31 and 37, but they both seem the same for this, I guess I'm either missing an option, or my wasm is missing some debug things.

view this post on Zulip bjorn3 (Oct 25 2025 at 13:19):

Try p __vmctx->set() before accessing any variables.

view this post on Zulip Scott Waye (Oct 25 2025 at 13:34):

thanks, yes I have that

view this post on Zulip Scott Waye (Oct 25 2025 at 13:35):

missed it from the OP

view this post on Zulip Scott Waye (Oct 25 2025 at 13:37):

could be I suppose it is reported incorrectly, I don't know how I would test that

(lldb) p __vmctx->set()
(lldb) frame variable
(WasmtimeVMContext *) __vmctx = 0x0000aaab06db8fe0

Last updated: Dec 06 2025 at 06:05 UTC