[Lldb-commits] [lldb] [lldb] Support parsing data symbols from the Wasm name section (PR #153494)
Jonas Devlieghere via lldb-commits
lldb-commits at lists.llvm.org
Thu Aug 14 07:07:28 PDT 2025
JDevlieghere wrote:
@DavidSpickett Great question and that definitely deserved more explanation from my end. I was a bit rushed in getting the PR up to unlock Adrian who needs the data for the Swift Reflection metadata.
In WebAssembly, the data section (`WASM_NAMES_DATA_SEGMENT`) contain the actual initialized data that will be copied into (linear) memory when the module is loaded. The `names` section has names for the different segments, but there's no symbols for referencing items within those segments (like `.data` and `.rodata`) the same way that's the case for ELF and Mach-O.
`llvm-objdump` gives you the same:
```
SYMBOL TABLE:
00000188 g F CODE 00000003 __wasm_call_ctors
0000018b g F CODE 0000002a add
000001b5 g F CODE 0000004d __original_main
00000202 g F CODE 0000000a main
0000002e g GLOBAL 00000007 __stack_pointer
00000400 l O DATA 00000009 .rodata
0000040c l O DATA 00000004 .data
```
That said, I do think these should also be represented as segments in LLDB, and that's indeed something I have planned to do next.
https://github.com/llvm/llvm-project/pull/153494
More information about the lldb-commits
mailing list