[Lldb-commits] [lldb] r159882 - /lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp

Sean Callanan scallanan at apple.com
Fri Jul 6 18:07:34 PDT 2012


Author: spyffe
Date: Fri Jul  6 20:07:33 2012
New Revision: 159882

URL: http://llvm.org/viewvc/llvm-project?rev=159882&view=rev
Log:
Fixed a crasher that happens if we try to inspect
a NULL symbol file.

<rdar://problem/11795939>

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

Modified: lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp?rev=159882&r1=159881&r2=159882&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp (original)
+++ lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp Fri Jul  6 20:07:33 2012
@@ -280,6 +280,9 @@
                 // it will have the remapped sections that we do below.
                 SymbolFileDWARF *oso_symfile = (SymbolFileDWARF *)comp_unit_info->oso_symbol_vendor->GetSymbolFile();
                 
+                if (!oso_symfile)
+                    return NULL;
+                
                 if (oso_symfile->GetNumCompileUnits() != 1)
                 {
                     oso_symfile->GetObjectFile()->GetModule()->ReportError ("DWARF for object file '%s' contains multiple translation units!",





More information about the lldb-commits mailing list