<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_NEW "
   title="NEW - clang-cl and libc++ produce PDBs that confuse windbg / cdb"
   href="https://bugs.llvm.org/show_bug.cgi?id=41451">41451</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>clang-cl and libc++ produce PDBs that confuse windbg / cdb
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>lld
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Windows NT
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

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

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

        <tr>
          <th>Component</th>
          <td>MachO
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>nicolasweber@gmx.de
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>C:\src\chrome\src>type test.cc
#include <string>

int main() {
  std::string s = "hiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii";
  std::string s2 = "hiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii";
  return s.size() + s2.size();
}



<span class="quote">>"third_party\llvm-build\Release+Asserts\bin\clang-cl.exe" test.cc /I "buildtools\third_party\libc++\trunk\include" -D_LIBCPP_NO_AUTO_LINK -D_LIBCPP_ABI_UNSTABLE libc++.dll.lib /Zi</span >


<span class="quote">>cdb -c "bp `test.cc:6`; g; dv; q" test.exe</span >


[...]
Breakpoint 0 hit
              s = class
std::__1::basic_string<char,std::__1::char_traits<char>,std::__1::allocator<char>
>
             s2 = <unknown base type 80000013>





Note missing output for s2. Works fine without libc++:

<span class="quote">>"third_party\llvm-build\Release+Asserts\bin\clang-cl.exe" test.cc /Zi</span >

<span class="quote">>cdb -c "bp `test.cc:6`; g; dv; q" test.exe</span >


Breakpoint 0 hit
              s = "hiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii"
             s2 = "hiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii"



I have a local natvis thing that makes cdb print "hiiiiiii..." with libc++, but
this bug happens without that too. This is about the "<unknown base type>"
error.



Seems to happen with both link.exe and lld-link.</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>