[Lldb-commits] [lldb] r268906 - Fix assertion in SymbolFilePDB

Pavel Labath via lldb-commits lldb-commits at lists.llvm.org
Mon May 9 04:07:43 PDT 2016


Author: labath
Date: Mon May  9 06:07:43 2016
New Revision: 268906

URL: http://llvm.org/viewvc/llvm-project?rev=268906&view=rev
Log:
Fix assertion in SymbolFilePDB

llvm::Error requires all errors to be handled. Simply checking the whether there was an error is
not enough, you have to actuall call handle(All)Errors, in case there was an error.

Modified:
    lldb/trunk/source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp

Modified: lldb/trunk/source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp?rev=268906&r1=268905&r2=268906&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp (original)
+++ lldb/trunk/source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp Mon May  9 06:07:43 2016
@@ -20,6 +20,7 @@
 #include "lldb/Symbol/SymbolContext.h"
 #include "lldb/Symbol/TypeMap.h"
 
+#include "llvm/DebugInfo/PDB/GenericError.h"
 #include "llvm/DebugInfo/PDB/IPDBEnumChildren.h"
 #include "llvm/DebugInfo/PDB/IPDBLineNumber.h"
 #include "llvm/DebugInfo/PDB/IPDBSourceFile.h"
@@ -119,7 +120,10 @@ SymbolFilePDB::CalculateAbilities()
         std::string exePath = m_obj_file->GetFileSpec().GetPath();
         auto error = loadDataForEXE(PDB_ReaderType::DIA, llvm::StringRef(exePath), m_session_up);
         if (error)
+        {
+            handleAllErrors(std::move(error), [](const GenericError &GE) {});
             return 0;
+        }
     }
     return CompileUnits | LineTables;
 }




More information about the lldb-commits mailing list