[PATCH] D94347: [WebAssembly] locals can now be indirect in DWARF

Ingvar Stepanyan via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 11 16:47:33 PST 2021


RReverser added a comment.

> does lldb or the devtools debugger already use the calling_convention description on types, or would this require more work there? (relatedly, does clang generate this attribute already?)

I'm not sure. Now that I check it, this attribute was only added to type definitions in DWARF 5 (before that, only functions had a DW_AT_calling_convention), so it's possible that tools need to catch up. However, my understanding is that either of those attributes would require adding support to the debugger, so they should be equal.

> In this case the frontend would presumably just not use 'byval' for those, but it would also need to generate composite debug info.

Yeah, regardless of ABI, the composite type debug entry always has to be generated, and AFAIK the suggested ABI changes also would fit into "attribute on the type itself" model.

> so it's not obvious right now (to me) whether that would be easier or harder with either option.

I agree in terms of complexity there is no clear winner. I'm mostly hesitant against adding custom target-specific encodings where an underlying standard attribute can be used - once we add a custom location variant, other tools might start to rely on it and it will be hard to remove.

For now it was mostly LLVM + Emscripten + DevTools, but I know at least few other projects working with Wasm DWARF info now, so just want to make sure we try to stay forward-compatible and use underlying standard where possible. Maybe I'm overthinking this?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D94347



More information about the llvm-commits mailing list