[llvm-bugs] [Bug 50513] New: [WebAssembly] DW_TAG_call_site is not supported for indirect calls

via llvm-bugs llvm-bugs at lists.llvm.org
Thu May 27 13:51:49 PDT 2021


https://bugs.llvm.org/show_bug.cgi?id=50513

            Bug ID: 50513
           Summary: [WebAssembly] DW_TAG_call_site is not supported for
                    indirect calls
           Product: libraries
           Version: trunk
          Hardware: All
                OS: All
            Status: CONFIRMED
          Severity: enhancement
          Priority: P
         Component: Backend: WebAssembly
          Assignee: unassignedbugs at nondot.org
          Reporter: aheejin at gmail.com
                CC: aardappel at gmail.com, dschuff at google.com,
                    llvm-bugs at lists.llvm.org, ydelendik at mozilla.com

DWARF Call site information (DW_TAG_call_site) is generated in DwarfDebug::
constructCallSiteEntryDIEs
(https://github.com/llvm/llvm-project/blob/0d5219feb9b26f299823b43c3c478e98cb3a0915/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp#L879-L1018)
method, which supports two kinds of callee locations: global values for direct
calls and machine registers for indirect calls.
(https://github.com/llvm/llvm-project/blob/0d5219feb9b26f299823b43c3c478e98cb3a0915/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp#L938-L944)

It looks Chrome devtools do not use DW_TAG_call_site at the moment, so the lack
of support does not cause missing debug info there, but this bug is to make a
record that this is missing for the full DWARF support.

Direct calls are fine, but because wasm does not use machine registers, it
cannot record DW_TAG_call_site info for indirect calls. Wasm uses virtual
registers and they are stackified, and the info for stackified registers are
generated in WebAssemblyDebugFixup pass. I think we can add support for
DW_TAG_call_site in the DebugFixup pass too, if it becomes necessary.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20210527/6afb0f31/attachment.html>


More information about the llvm-bugs mailing list