summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMilian Wolff <milian.wolff@kdab.com>2018-02-21 10:06:40 +0100
committerUlf Hermann <ulf.hermann@qt.io>2019-05-03 12:42:39 +0000
commit996e2006dd0b76aff7e601fe3d1386186ef998bd (patch)
tree71de2584ab0664515faeee6362fd49b4dcbb9fa2
parentb554bc5fc946fe7b9207b9da80354b3640c84c49 (diff)
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 <milian.wolff@kdab.com>
-rw-r--r--app/perfsymboltable.cpp6
1 files changed, 6 insertions, 0 deletions
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;