https://llvm.org/bugs/show_bug.cgi?id=24812
Bug ID: 24812 Summary: Expression evaluation crashes when definition of class not available for a class Product: lldb Version: unspecified Hardware: PC OS: Linux Status: NEW Severity: normal Priority: P Component: All Bugs Assignee: lldb-dev@lists.llvm.org Reporter: tbergham...@google.com CC: llvm-b...@lists.llvm.org Classification: Unclassified Created attachment 14877 --> https://llvm.org/bugs/attachment.cgi?id=14877&action=edit Source to reproduce the bug Steps to reproduce: * Compile the attached inferior with clang++ (tested with clang-3.5 on Linux x86_64) with the following command line: "clang++ -g ss.cpp" * lldb a.out * (lldb) breakpoint set -n main * (lldb) run * (lldb) next * (lldb) expression f * Observed behavior: LLDB crashes with "llvm/tools/clang/lib/AST/RecordLayoutBuilder.cpp:2868: const clang::ASTRecordLayout &clang::ASTContext::getASTRecordLayout(const clang::RecordDecl *) const: Assertion `D && "Cannot get layout of forward declarations!"' failed" * Expected behavior: The content off the variable displayed correctly * Acceptable behavior: LLDB displays an error message without crashing The root cause of the problem is that clang only includes the declaration of std::string in the debug info and expects that the debugger can access to it from a different source. If "-fno-limit-debug-info" is specified to the compiler, then the error disappears. The crash can happen during any part of the debug session (e.g. single stepping, back tracing), but reproducing it in those cases is more difficult. -- You are receiving this mail because: You are the assignee for the bug.
_______________________________________________ lldb-dev mailing list lldb-dev@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev