[PATCH] D45118: Initial propototype for mergin (custom) debug sections with DWARF format.

Yury Delendik via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 3 07:07:07 PDT 2018


yurydelendik added a comment.

In https://reviews.llvm.org/D45118#1054556, @ruiu wrote:

> For a patch like this, I'd like to know the overview of the debug story in the wasm world first, so that I can review this patch in that story line. I can imagine a lot of different strategies to enable debug info for wasm... I'd be really helpful if you share your plan.


As now, there is no concrete proposal/specs on the table for wasm debug information and support yet. The https://reviews.llvm.org/D44184 and this patch will export DWARF information as it is generated by LLVM, which is more than enough to export source maps for WebAssembly. At the moment there is some information missing, such as DebugValue, but that's addressable in the future. While this entire work appears to be too experimental, it will help to prototype and identify future debug information format for WebAssembly and start experiments with debuggers earlier.

> Is debug info embedded to wasm file or handled as a separate file?  Will it be in DWARF format (looks like so)?

The generated by LLVM wasm files will have custom sections with DWARF (?) information in them as it is generated by LLVM. But it is not necessarily what will be published on the web -- the non-functional requirement for the wasm is still to keep binary as small as possible, so the custom sections (including debug one) will not be present in production builds.

> Can DWARF really support wasm-style memory abstraction?

We will try to find the way to express that in DWARF structures, if it's not already happening. I'm more concerned about expressing stack machine registers (in DebugValue expressions) via DWARF -- in a worst case, we will need to extend the format to address that.


Repository:
  rLLD LLVM Linker

https://reviews.llvm.org/D45118





More information about the llvm-commits mailing list