<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_CONFIRMED "
   title="CONFIRMED - [WebAssembly] DW_TAG_call_site is not supported for indirect calls"
   href="https://bugs.llvm.org/show_bug.cgi?id=50513">50513</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>[WebAssembly] DW_TAG_call_site is not supported for indirect calls
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>libraries
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>trunk
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>CONFIRMED
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>enhancement
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>Backend: WebAssembly
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>aheejin@gmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>aardappel@gmail.com, dschuff@google.com, llvm-bugs@lists.llvm.org, ydelendik@mozilla.com
          </td>
        </tr></table>
      <p>
        <div>
        <pre>DWARF Call site information (DW_TAG_call_site) is generated in DwarfDebug::
constructCallSiteEntryDIEs
(<a href="https://github.com/llvm/llvm-project/blob/0d5219feb9b26f299823b43c3c478e98cb3a0915/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp#L879-L1018">https://github.com/llvm/llvm-project/blob/0d5219feb9b26f299823b43c3c478e98cb3a0915/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp#L879-L1018</a>)
method, which supports two kinds of callee locations: global values for direct
calls and machine registers for indirect calls.
(<a href="https://github.com/llvm/llvm-project/blob/0d5219feb9b26f299823b43c3c478e98cb3a0915/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp#L938-L944">https://github.com/llvm/llvm-project/blob/0d5219feb9b26f299823b43c3c478e98cb3a0915/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp#L938-L944</a>)

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.</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>