[PATCH] D97564: [WebAssembly] Fix split-dwarf not emitting DW_OP_WASM_location correctly

Wouter van Oortmerssen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 26 12:55:10 PST 2021


aardappel added a comment.

> Would it make sense to also run e.g. llvm/test/MC/WebAssembly/debug-localvar.ll with split-dwarf?

That file doesn't contain a use of TI_GLOBAL_RELOC, so I instead added to dwarfdump.ll. Sadly the split dwarf output is sufficiently different in many places that my attempt to interleave it with the regular output became too unreadable, so it is now a side-by-side output.



================
Comment at: llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp:475
+          // symbols are (with entries in .debug_addr).
+          // For now, since we only ever use index 0, this should work as-is.        
+          addUInt(*Loc, dwarf::DW_FORM_data4,
----------------
dschuff wrote:
> Can we assert that the index is 0?
Yup that is already done a little up from this code:
> assert(FrameBase.Location.WasmLoc.Index == 0);  // Only SP so far.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D97564/new/

https://reviews.llvm.org/D97564



More information about the llvm-commits mailing list