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

    <tr>
        <th>Summary</th>
        <td>
            [Debug] Dwarf generated incomplete in some case 
        </td>
    </tr>

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

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

    <tr>
      <th>Reporter</th>
      <td>
          Xinlong-Wu
      </td>
    </tr>
</table>

<pre>
    I try to build the [mold](https://github.com/rui314/mold) by [llvmorg-14.0.6](https://github.com/llvm/llvm-project/tree/llvmorg-14.0.6)

use command `make CXX=clang++ CC=clang CXXFLAGS="-g --gcc-toolchain=/path/to/toolchain/"`
The compilation process is working fine, but when I try to debug the mold using GDB, 
I got the error `Dwarf Error: DW_FORM_strx1 found in non-DWO CU`.

I try to use `gcc 11.0.0` to compile and then debug in same gdb, it works normally.

So I'm wondering where this might be a problem.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyVUktvnDAQ_jXmMgIZwy7sgUOydKNIrSI1rZJbZGAW3Bh7ZZum--87ZpM0PVWVkPE8PN9D09nh3NxCcGcIFrpF6QHChMA217PVA9u0TNRTCCfPiismDvSNKkxLl_V2psAtqshLuqzdYgfdOb7V-uds3ZjmZcaz7T-nxPbXX3py9gf2gcLgEF-zH2aJHeMt41eXc_EINGOWZgC25bN8Rtg_PrKi7bU0IxPX9MF-_5aIxcPnq5t7SjAh0hHSdOz7NFir-0kqs-YPJxmmyMCux1spEheEcoH-Nq3QJ6VlUNYAEe_Re1AeXqx7VgR2VIYU7MnXAC8TGnh3esBuGVeno3Gw-Nh-017H7sv4WxhtWDvQOeuiuvZFuiN8iiH5CO3D0-Hu65cnH9yvHI52IQ-UAWNN2j7cwf47Pck-mvWOHl2jIgmHPCdXOQUxf5GDEN0Mke-FJg31ckYYhy7yU2EV6AnJzVLr818g9xZumahm6jEDuqiLpDukgeTMrMYpQEcQ0a9O45wlQ1MMu2Ink6CCxobWp42wtDVwUTyiQScDRnmRosaAKylLpHpJYpLF6ea_F0x5v6Cny2a7ESKZGhyQV9XAt1XOy6quZN7xIj_21e5YbsuyTLTsUPtIkdglqhFcCF7lJS-4yOus6ERd1d2W73iNVV6zkuMslc4icEZLnLhm5UDyPBW18sH_KUrv1WgQ3-bLJUzWNY_KaGvG9GFJVsbNSvc3Rd4slQ">