Debugging: add debugger support for `wasmtime serve`. by cfallin · Pull Request #12859 · bytecodealliance/wasmtime
…ibrary names. Two bugfixes for guest debugging with components: 1. Convert component-relative source locations to module-relative PCs in the frame table. The guest-debug API presents a core-Wasm view where components are deconstructed into individual modules, so all PCs must be module-relative. This adds a `wasm_module_offset` field to `ModuleTranslation` and `FuncEnvironment`, set during component translation, and subtracts it in `debug_tags()`. 2. Give unique names to "library" entries in the gdbstub XML response. LLDB's DynamicLoader deduplicates by name, so using "wasm" for all modules caused only the first to be loaded.
This adopts a simple solution to bytecodealliance#12776: it takes the "instance reuse" paradigm to the extreme, instantiating exactly one instance and serializing all requests into that one instance. This allows the debugger component to operate on one `Store`, setting breakpoint state and presenting its execution to the attached debugger as a single program execution and minimizing impedance mismatches. This also adds an integration test that runs an existing wasi-http test component under the debugger.
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