Skip to content

Commit defb8e0

Browse files
committed
[lldb] Corretly parse Wasm segments
My original implementation for parsing Wasm segments was wrong in two related ways. I had a bug in calculating the file vm address and I didn't fully understand the difference between active and passive segments and how that impacted their file vm address. With this PR, we now support parsing init expressions for active segments, rather than just skipping over them. This is necessary to determine where they get loaded. Similar to llvm-objdump, we currently only support simple opcodes (i.e. constants). We also currently do not support active segments that use a non-zero memory index. However this covers all segments for a non-trivial Swift binary compiled to Wasm.
1 parent 7cd6179 commit defb8e0

File tree

3 files changed

+227
-140
lines changed

3 files changed

+227
-140
lines changed

0 commit comments

Comments
 (0)