[Lldb-commits] [lldb] [lldb] Identify a WebAssembly module by its build id (PR #213554)

Alex Langford via lldb-commits lldb-commits at lists.llvm.org
Mon Aug 3 10:51:13 PDT 2026


================
@@ -1136,6 +1136,42 @@ DataExtractor ObjectFileWasm::ReadImageData(offset_t offset, uint32_t size) {
   return data;
 }
 
+UUID ObjectFileWasm::GetUUID() {
+  if (m_uuid)
+    return m_uuid;
+
+  // A Wasm module carries the identifier a linker gave it in a custom section,
+  // as a vector of bytes. It is the only thing that tells one build of a module
+  // from another, so a module linked without one cannot be identified at all.
+  static ConstString g_sect_name_build_id("build_id");
----------------
bulbazord wrote:

```suggestion
  static llvm::StringLiteral g_sect_name_build_id("build_id");
```

https://github.com/llvm/llvm-project/pull/213554


More information about the lldb-commits mailing list