<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/55916>55916</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            Debug info representation of coroutine frame
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            debuginfo
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          pogo59
      </td>
    </tr>
</table>

<pre>
    https://reviews.llvm.org/D99179 by @ChuanqiXu9 added debug info describing a coroutine frame.  This frame is not directly describing anything in the source code, but people debugging coroutines were asking for a way to get the debugger to print the frame in a more human-friendly way.  That's fine.

There are two issues with the generated description; one is minor and one is significant.
The minor issue is that some pointers in the frame are described as address values using DW_ATE_address.  This is an unusual encoding.  It is legal DWARF, but debuggers do not necessarily know what to do with it.  One suggestion in the review is to change the description, so instead of a base type with DW_ATE_address, it uses DW_TAG_pointer_type with no DW_AT_type attribute (a "pointer to nothing" aka "void*").

The significant issue is that some elements in the frame do not have a well understood type, and these elements are *also* described as address values using DW_ATE_address.  It is not clear that this is really a good choice for an "I don't know what it is" element.  In particular, it's not clear (to me, at least) whether these unknown elements are always going to be the size of an address.

Regardless of the description issues, post-commit review comments mention that there is no testing of either of the paths that currently produce DW_ATE_address.  There should be tests for all cases, both to ensure that the code does what is expected, and to guide readers in understanding what these elements are expected to be.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJydVcmO4zYQ_Rr5QrRhy9vo4INnnA7mFGDQwOTWoMSyxDRNKlzacb4-ryi6F2NOabhli0vVW6rI1qnrfohxDNXqUNWP-Hh61XQJc2Nez3Pnewwdm2a5a0R7FdV68W1I0v6t_0yNkEqREora1AttTw4_Q-d1q20vpOicdylqS-Lk5ZnmQjwNOkwvAj-si0JpT10010877TUO_ENbEQcSwSXfEcIpqupvok1RjORGQ1Pmnpe-5QriQp6EDC88fHIeQC7yKqITPcUcb9pFnsd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