[Based on #131] debug: add Wasmtime WASI source sessions - #135
Open
cpunion wants to merge 1 commit into
Open
Conversation
|
Caution The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Based on #131. Tracks Task 5 of xgo-dev#2164; it does not close the umbrella proposal.
What this adds
llgo debug -target=wasip1use the existingGOOS=wasip1 GOARCH=wasmbuild path and retain embedded DWARF;llgo.debuggercustom-section record, and imported-memory shape before launch;The runtime environment module is generated from the artifact's actual
env.memorylimits instead of hardcoding an address or reverse-engineering the function at runtime. Self-contained memories remain accepted.Verified locally
main.increment;value=41and named localresult=42;main.main;llvm-dwarfdump --verifyreports no errors on the final Wasm;go test -timeout 20m -skip '^TestRunPrintfWithStdioNobuf$' ./internal/buildpasses.Remaining runtime capability gate
LLGo's current WASI artifact imports shared linear memory. Wasmtime 47's guest-debug gdbstub omits
SharedMemoryfrom its RSP address space, so source breakpoints, Wasm locals, and backtraces work, but globals and runtime-backed LLGo formatters cannot yet read guest memory. This was reduced to an independent WAT reproduction and reported upstream:bytecodealliance/wasmtime#14062
The session reports debugger capability downgrades explicitly and does not claim runtime presentation when it is unavailable.