[all-commits] [llvm/llvm-project] aadc70: [lldb] Corretly parse Wasm segments (#154727)

Jonas Devlieghere via All-commits all-commits at lists.llvm.org
Tue Aug 26 14:56:46 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: aadc708e78568f1ec5713dd4ba768e77044b651d
      https://github.com/llvm/llvm-project/commit/aadc708e78568f1ec5713dd4ba768e77044b651d
  Author: Jonas Devlieghere <jonas at devlieghere.com>
  Date:   2025-08-26 (Tue, 26 Aug 2025)

  Changed paths:
    M lldb/source/Plugins/ObjectFile/wasm/ObjectFileWasm.cpp
    M lldb/source/Plugins/ObjectFile/wasm/ObjectFileWasm.h
    M lldb/test/Shell/Symtab/symtab-wasm.test

  Log Message:
  -----------
  [lldb] Corretly parse Wasm segments (#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.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list