Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Assertion failure when debugging application built w/o -fstandalone-debug #20050

Open
emaste opened this issue May 7, 2014 · 2 comments
Open
Labels
bugzilla Issues migrated from bugzilla lldb

Comments

@emaste
Copy link
Member

emaste commented May 7, 2014

Bugzilla Link 19676
Version unspecified
OS FreeBSD
CC @rnk

Extended Description

See the thread at http://lists.cs.uiuc.edu/pipermail/lldb-dev/2014-April/003800.html 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.soclang::CodeGen::CGDebugInfo::CreateType(this=0x0000000815c0a000, BT=0x0000000815c3d400) + 30 at CGDebugInfo.cpp:391, stop reason = breakpoint 1.1 frame #​0: 0x000000081191ff6e libclangCodeGen.soclang::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.
@emaste
Copy link
Member Author

emaste commented Jul 13, 2014

@dwblaikie
Copy link
Collaborator

mentioned in issue llvm/llvm-bugzilla-archive#20781

@llvmbot llvmbot transferred this issue from llvm/llvm-bugzilla-archive Dec 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugzilla Issues migrated from bugzilla lldb
Projects
None yet
Development

No branches or pull requests

2 participants