DwarfImageDebugInfo: Minor optimization.

In the fallback case where full debug information is unavailable,
query the underlying DWARF file to see if CFI is available at all.
If it isn't, skip creating function debug info objects.
This commit is contained in:
Rene Gollent 2013-05-01 20:06:41 -04:00
parent 9dce79360b
commit 211e7b396d

View File

@ -414,9 +414,14 @@ DwarfImageDebugInfo::GetFunctions(const BObjectList<SymbolInfo>& symbols,
return B_OK;
// if we had no compilation units, fall back to providing basic
// debug infos with DWARF-supported call frame unwinding
return SpecificImageDebugInfo::GetFunctionsFromSymbols(symbols, functions,
fDebuggerInterface, fImageInfo, this);
// debug infos with DWARF-supported call frame unwinding,
// if available.
if (fFile->HasFrameInformation()) {
return SpecificImageDebugInfo::GetFunctionsFromSymbols(symbols,
functions, fDebuggerInterface, fImageInfo, this);
}
return B_OK;
}