[all-commits] [llvm/llvm-project] 739bf5: [lldb] Add support for Wasm globals (#212516)
Jonas Devlieghere via All-commits
all-commits at lists.llvm.org
Wed Jul 29 15:08:14 PDT 2026
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 739bf5e18d9df470c540c5c61f086c95ae5aa370
https://github.com/llvm/llvm-project/commit/739bf5e18d9df470c540c5c61f086c95ae5aa370
Author: Jonas Devlieghere <jonas at devlieghere.com>
Date: 2026-07-29 (Wed, 29 Jul 2026)
Changed paths:
M lldb/include/lldb/lldb-enumerations.h
M lldb/source/Core/Section.cpp
M lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp
M lldb/source/Plugins/ObjectFile/wasm/ObjectFileWasm.cpp
M lldb/source/Plugins/ObjectFile/wasm/ObjectFileWasm.h
A lldb/source/Plugins/ObjectFile/wasm/WasmAddress.h
M lldb/source/Plugins/Process/wasm/ProcessWasm.cpp
M lldb/source/Plugins/Process/wasm/ProcessWasm.h
M lldb/source/Symbol/ObjectFile.cpp
M lldb/test/API/functionalities/gdb_remote_client/TestWasm.py
A lldb/test/Shell/ObjectFile/wasm/wasm-globals.yaml
Log Message:
-----------
[lldb] Add support for Wasm globals (#212516)
WebAssembly globals are not addressable: they live in an index space of
their own and hold values (rather than bytes) in the module, or need to
be read from the runtime.
Give them a synthetic address space in which an address holds the global
index where it would otherwise hold an offset, and a section spanning
that index space so a global becomes a symbol. With a process, a read of
such an address asks the engine over qWasmGlobal. Without one, the
object file serves the initializer, which is all that is known before
the module is instantiated.
The section is based in a range of its own rather than at zero. Code and
linear memory are both addressed from zero, so a global index would
otherwise name a code or data address as well.
The import section now parses each import descriptor by kind, because
the global index space includes imported globals and finding the next
import means knowing the shape of the current one.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list