File tree Expand file tree Collapse file tree 2 files changed +25
-0
lines changed
source/Plugins/SymbolFile/DWARF
test/Shell/SymbolFile/DWARF Expand file tree Collapse file tree 2 files changed +25
-0
lines changed Original file line number Diff line number Diff line change 1313#include " llvm/Support/Casting.h"
1414#include " llvm/Support/Threading.h"
1515
16+ #include " lldb/Core/Debugger.h"
1617#include " lldb/Core/Module.h"
1718#include " lldb/Core/ModuleList.h"
1819#include " lldb/Core/ModuleSpec.h"
@@ -652,6 +653,15 @@ DWARFCompileUnit *SymbolFileDWARF::GetDWARFCompileUnit(CompileUnit *comp_unit) {
652653 if (dwarf_cu && dwarf_cu->GetUserData () == nullptr )
653654 dwarf_cu->SetUserData (comp_unit);
654655
656+ // This branch has several known issues in the DWARF 5 parser. Let users know.
657+ if (dwarf_cu && dwarf_cu->GetVersion () > 4 ) {
658+ static llvm::once_flag g_once_flag;
659+ llvm::call_once (g_once_flag, []() {
660+ Debugger::ReportError (
661+ " This version of LLDB does not support DWARF version 5 or later." );
662+ });
663+ }
664+
655665 // It must be DWARFCompileUnit when it created a CompileUnit.
656666 return llvm::cast_or_null<DWARFCompileUnit>(dwarf_cu);
657667}
Original file line number Diff line number Diff line change 1+ // Test that optimized flag is properly included in DWARF.
2+
3+ // -gsplit-dwarf is supported only on Linux.
4+ // REQUIRES: system-darwin
5+
6+ // This test uses lldb's embedded python interpreter
7+ // REQUIRES: python
8+
9+ // RUN: %clang_host %s -g -gdwarf-5 -c -o %t.o
10+ // RUN: %clang_host %t.o -o %t.exe
11+ // RUN: %lldb %t.exe -b -o 'b main' -o r -o q 2>&1 | FileCheck %s
12+
13+ // CHECK: error: This version of LLDB does not support DWARF version 5 or later.
14+
15+ int main (void ) { return 0 ; }
You can’t perform that action at this time.
0 commit comments