Skip to content

Commit 37f3b0e

Browse files
committed
[lldb] Corretly parse Wasm segments (llvm#154727)
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. (cherry picked from commit aadc708)
1 parent 70f59fc commit 37f3b0e

File tree

3 files changed

+227
-140
lines changed

3 files changed

+227
-140
lines changed

0 commit comments

Comments
 (0)