Skip to content

WebAssembly support in LLDB #150449

Open
Open

Description

@JDevlieghere

Meta-issue to track support for debugging WebAssembly (Wasm) with LLDB.

Core Support

  • #150143 Add WebAssembly Process Plugin
  • #151010 Support DW_OP_WASM_location in DWARFExpression
  • #151056 Implement RegisterContextWasm
  • #171507 Add WebAssembly platform
  • #175263 Make PlatformWasm a RemoteAwarePlatform
  • #188751 Add PlatformWebInspectorWasm (Safari/Web Inspector Wasm debugging)

Object/Symbol File

  • #153093 Support parsing the Wasm symbol table
  • #153494 Support parsing data symbols from the Wasm name section
  • #153634 Create sections for Wasm segments
  • #170960 Handle imports when parsing Wasm name sections
  • #204496 Report a generic wasm32 architecture for Wasm object files
  • #206840 Create a BSS section for WebAssembly object files
  • #206832 Recover mangled symbol names from DWARF on WebAssembly
  • #207235 Synthesize data symbols for WebAssembly from DWARF
  • #208061 Give Wasm stack frames a synthetic call frame address

Wasm Runtime

  • #190476 Inherit Host::GetEnvironment() when launching a Wasm runtime
  • #193115 Don't enable ASLR for the Wasm runtime
  • #206780 Forward the inferior's environment to the Wasm runtime

Expression Evaluation

  • TBD

Bug Fixes

  • #154433 Improve error handling in ObjectFileWasm
  • #153332 Use numeric_limits for all overflow checks in ObjectFileWasm
  • #154727 Correctly parse Wasm segments
  • #162942 Use the correct Wasm register context
  • #176464 Fix llvm_unreachable for invalid Wasm address
  • #178299 Fix unchecked llvm::Expected in ObjectFileWasm
  • #190093 Skip local variable declarations at start of Wasm function
  • #192893 Fix crash when evaluating expressions in Wasm targets
  • #193124 Skip memory region probing in FindSpace when process can't JIT
  • #194001 Handle partial memory region coverage in IRMemoryMap::FindSpace
  • #196368 Immediately connect in webinspector-wasm
  • #198700 Fall back to FindProcesses in webinspector-wasm GetProcessInfo
  • #198701 Recheck connection state in webinspector-wasm EnsureConnected
  • #199124 Disable formatters for Wasm object format (bytecode)
  • #204480 Skip the prologue when a function's entry has no line row

Testing

Activity

  1. self-assigned this
    on Jul 24, 2025
  2. llvmbot commented on Jul 24, 2025

    @llvmbot
    Member

    @llvm/issue-subscribers-backend-webassembly

    Author: Jonas Devlieghere (JDevlieghere)

    Details Meta-issue to track support for debugging WebAssembly (Wasm) using the GDB Remote Protocol with Wasm-specific extensions.
  3. llvmbot commented on Jul 24, 2025

    @llvmbot
    Member

    @llvm/issue-subscribers-lldb

    Author: Jonas Devlieghere (JDevlieghere)

    Details Meta-issue to track support for debugging WebAssembly (Wasm) using the GDB Remote Protocol with Wasm-specific extensions.
  4. DavidSpickett commented on Jul 25, 2025

    @DavidSpickett
    Contributor

    Now linked from the website - c63c2f4.

  5. dschuff commented on Jul 25, 2025

    @dschuff
    Member

    In case it's useful, the sources for Chrome's wasm debugging devtools extension can be found here, although there's unfortunately no good documentation. WasmVendorPlugins.cc defines wasm-specific integrations, although there are also some places where it uses private APIs that predate the plugins.

  6. DavidSpickett commented on Apr 21, 2026

    @DavidSpickett
    Contributor

    The description's tasks are all done but I assume that expressions needs to be done.

    FYI we have these settings:

      target.expr-alloc-address                        -- Start address within the process address space of
                                                          memory allocation for expression evaluation.
      target.expr-alloc-align                          -- Alignment for each memory allocation for
                                                          expression evaluation.
      target.expr-alloc-size                           -- Amount of memory in bytes to allocate for
                                                          expression evaluation.
    

    Which I think were added for embedded devices, but you could try using them as a first step for wasm.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

backend:WebAssemblylldbmetaissueIssue to collect references to a group of similar or related issues.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions