Skip to content

Add support for LLDB's updated qWasmGlobal packet - #420

Merged
kateinoigakukun merged 1 commit into
swiftwasm:mainfrom
JDevlieghere:wasm-instance-global
Aug 27, 2026
Merged

Add support for LLDB's updated qWasmGlobal packet#420
kateinoigakukun merged 1 commit into
swiftwasm:mainfrom
JDevlieghere:wasm-instance-global

Conversation

@JDevlieghere

Copy link
Copy Markdown
Member

Currently the qWasmGlobal takes a frame index, making it impossible to request a global for a module instance that's not active on the stack. See #llvm-project/212833 for more details.

LLDB now supports instance owning a global with an instance:<id> field, negotiated through qWasmGlobalInstance+. This PR adds support for the new variant of the packet. The legacy frame variant stays supported for (older) debuggers that do not support it.

Also derive the executable code offset from the address tag bits, so the instance id matches.

Assisted-by: Claude

Currently the qWasmGlobal takes a frame index, making it impossible to
request a global for a module instance that's not active on the stack.
See #llvm-project/212833 for more details.

LLDB now supports instance owning a global with an `instance:<id>`
field, negotiated through `qWasmGlobalInstance+`. This PR adds support
for the new variant of the packet. The legacy frame variant stays
supported for (older) debuggers that do not support it.

Also derive the executable code offset from the address tag bits, so the
instance id matches.

Assisted-by: Claude
@JDevlieghere

Copy link
Copy Markdown
Member Author

CC @felipepiovezan

@MaxDesiatov MaxDesiatov left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This makes sense, thank you!

@kateinoigakukun
kateinoigakukun merged commit 9dc4643 into swiftwasm:main Aug 27, 2026
34 of 36 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants