[Lldb-commits] [lldb] r308850 - Fix PR33875 by distinguishing between DWO and clang modules
Adrian Prantl via lldb-commits
lldb-commits at lists.llvm.org
Sun Jul 23 10:59:07 PDT 2017
Author: adrian
Date: Sun Jul 23 10:59:07 2017
New Revision: 308850
URL: http://llvm.org/viewvc/llvm-project?rev=308850&view=rev
Log:
Fix PR33875 by distinguishing between DWO and clang modules
The DWO handling code can get confused by clang modules which also use
skeleton CUs to point to the object file with the full debug
info. This patch detects whether an object is a "real" DWO or a clang
module and prevents LLDB from interpreting clang modules as DWO. This
fixes the regression in TestWithModuleDebugging.
http://llvm.org/bugs/show_bug.cgi?id=33875
Differential Revision: https://reviews.llvm.org/D35740
Modified:
lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/gmodules/TestWithModuleDebugging.py
lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDwo.cpp
Modified: lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/gmodules/TestWithModuleDebugging.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/gmodules/TestWithModuleDebugging.py?rev=308850&r1=308849&r2=308850&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/gmodules/TestWithModuleDebugging.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/gmodules/TestWithModuleDebugging.py Sun Jul 23 10:59:07 2017
@@ -9,8 +9,6 @@ class TestWithGmodulesDebugInfo(TestBase
mydir = TestBase.compute_mydir(__file__)
- @expectedFailureAll(bugnumber="llvm.org/pr33875", oslist=["linux"],
- compiler="clang", compiler_version=[">", "6.0"])
@add_test_categories(["gmodules"])
def test_specialized_typedef_from_pch(self):
self.build()
Modified: lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDwo.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDwo.cpp?rev=308850&r1=308849&r2=308850&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDwo.cpp (original)
+++ lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDwo.cpp Sun Jul 23 10:59:07 2017
@@ -61,6 +61,12 @@ SymbolFileDWARFDwo::ParseCompileUnit(DWA
}
DWARFCompileUnit *SymbolFileDWARFDwo::GetCompileUnit() {
+ // A clang module is found via a skeleton CU, but is not a proper DWO.
+ // Clang modules have a .debug_info section instead of the *_dwo variant.
+ if (auto *section_list = m_obj_file->GetSectionList(false))
+ if (section_list->FindSectionByType(eSectionTypeDWARFDebugInfo, true))
+ return nullptr;
+
// Only dwo files with 1 compile unit is supported
if (GetNumCompileUnits() == 1)
return DebugInfo()->GetCompileUnitAtIndex(0);
More information about the lldb-commits
mailing list