[Lldb-commits] [lldb] r247638 - Darwin has a debug info format that stores module types in stand alone files and it uses some of the DWO attributes. Don't assert in SymbolFileDWARFDwo, just return null so everything works.

Greg Clayton via lldb-commits lldb-commits at lists.llvm.org
Mon Sep 14 16:34:26 PDT 2015


Author: gclayton
Date: Mon Sep 14 18:34:26 2015
New Revision: 247638

URL: http://llvm.org/viewvc/llvm-project?rev=247638&view=rev
Log:
Darwin has a debug info format that stores module types in stand alone files and it uses some of the DWO attributes. Don't assert in SymbolFileDWARFDwo, just return null so everything works.


Modified:
    lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDwo.cpp

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=247638&r1=247637&r2=247638&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDwo.cpp (original)
+++ lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDwo.cpp Mon Sep 14 18:34:26 2015
@@ -69,8 +69,11 @@ SymbolFileDWARFDwo::ParseCompileUnit(DWA
 DWARFCompileUnit*
 SymbolFileDWARFDwo::GetCompileUnit()
 {
-    assert(GetNumCompileUnits() == 1 && "Only dwo files with 1 compile unit is supported");
-    return DebugInfo()->GetCompileUnitAtIndex(0);
+    // Only dwo files with 1 compile unit is supported
+    if (GetNumCompileUnits() == 1)
+        return DebugInfo()->GetCompileUnitAtIndex(0);
+    else
+        return nullptr;
 }
 
 DWARFCompileUnit*




More information about the lldb-commits mailing list