[lldb-dev] assert in symbolfiledwarf.cpp
Carlo Kok
ck at remobjects.com
Thu Nov 1 05:42:54 PDT 2012
In SymbolFileDWARF.cpp:959 there's code like:
DWARFCompileUnit* dwarf_cu = GetDWARFCompileUnit(sc.comp_unit);
assert(dwarf_cu);
However in some circumstances it can be that dwarf_cu returns null (if
the MACH file can't find the compile unit for this source file).
A simple:
if (!dwarf_cu)
return false;
Will at least not make it crash(it won't find the symbol, but that's a
different issue, it shouldn't assert on something like this).
More information about the lldb-dev
mailing list