From 996e2006dd0b76aff7e601fe3d1386186ef998bd Mon Sep 17 00:00:00 2001 From: Milian Wolff Date: Wed, 21 Feb 2018 10:06:40 +0100 Subject: Use build-id file for debug information as fall-back On older Ubuntu, I sometimes see the case where we are looking for a debug link file that is not cached. In such cases, we should fall-back to the build-id file, which contains the debug information. Change-Id: Icd6d7bc13a9d3d74c3bb237366e04e7ffa6e195e Reviewed-by: Milian Wolff --- app/perfsymboltable.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/perfsymboltable.cpp b/app/perfsymboltable.cpp index c2530a9..73bb3e9 100644 --- a/app/perfsymboltable.cpp +++ b/app/perfsymboltable.cpp @@ -571,6 +571,12 @@ int PerfSymbolTable::findDebugInfo(Dwfl_Module *module, const char *moduleName, debugLinkFile = findDebugInfoFile(m_unwind->systemRoot(), path, debugLinkString); } + /// FIXME: find a proper solution to this + if (!debugLinkFile.isFile() && QByteArray(file).endsWith("/elf")) { + // fall-back to original file if it's in a build-id path + debugLinkFile.setFile(file); + } + if (!debugLinkFile.isFile()) return ret; -- cgit v1.2.3