<html>
    <head>
      <base href="http://llvm.org/bugs/" />
    </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 --- - Assertion failure when debugging application built w/o -fstandalone-debug"
   href="http://llvm.org/bugs/show_bug.cgi?id=19676">19676</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Assertion failure when debugging application built w/o -fstandalone-debug
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>lldb
          </td>
        </tr>

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

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

        <tr>
          <th>OS</th>
          <td>FreeBSD
          </td>
        </tr>

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

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

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

        <tr>
          <th>Component</th>
          <td>All Bugs
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>lldb-dev@cs.uiuc.edu
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>emaste@freebsd.org
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>See the thread at
<a href="http://lists.cs.uiuc.edu/pipermail/lldb-dev/2014-April/003800.html">http://lists.cs.uiuc.edu/pipermail/lldb-dev/2014-April/003800.html</a> for
background.  Clang defaults to -fno-standalone-debug on Linux and FreeBSD. 
This causes debug info to contain forward declarations where possible, instead
of definitions, and omits debug info for dynamic classes in modules other than
where the vtable is found.

Ideally we would search the rest of the debug info for the required definition.
 In any case we should return an error to the user if the debug info is missing
instead of tripping the assert.

Example assertion, from debugging Clang's CGDebugInfo:


 * thread #1: tid = 104525, 0x000000081191ff6e
libclangCodeGen.so`clang::CodeGen::CGDebugInfo::CreateType(this=0x0000000815c0a000,
BT=0x0000000815c3d400) + 30 at CGDebugInfo.cpp:391, stop reason =
breakpoint 1.1
    frame #0: 0x000000081191ff6e
libclangCodeGen.so`clang::CodeGen::CGDebugInfo::CreateType(this=0x0000000815c0a000,
BT=0x0000000815c3d400) + 30 at CGDebugInfo.cpp:391
   388  /// CreateType - Get the Basic type from the cache or create a new
   389  /// one if necessary.
   390  llvm::DIType CGDebugInfo::CreateType(const BuiltinType *BT) {
-> 391    unsigned Encoding = 0;
   392    StringRef BTName;
   393    switch (BT->getKind()) {
   394  #define BUILTIN_TYPE(Id, SingletonId)
(lldb) p BT
Assertion failed: (D && "Cannot get layout of forward declarations!"),
function getASTRecordLayout, file
../tools/clang/lib/AST/RecordLayoutBuilder.cpp, line 2783.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>