From 211e7b396d4395a01148c931cedb7c2103f5038e Mon Sep 17 00:00:00 2001 From: Rene Gollent Date: Wed, 1 May 2013 20:06:41 -0400 Subject: [PATCH] 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. --- src/apps/debugger/debug_info/DwarfImageDebugInfo.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/apps/debugger/debug_info/DwarfImageDebugInfo.cpp b/src/apps/debugger/debug_info/DwarfImageDebugInfo.cpp index 2ec64052f9..254fd36ce0 100644 --- a/src/apps/debugger/debug_info/DwarfImageDebugInfo.cpp +++ b/src/apps/debugger/debug_info/DwarfImageDebugInfo.cpp @@ -414,9 +414,14 @@ DwarfImageDebugInfo::GetFunctions(const BObjectList& 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; }