diff options
author | Milian Wolff <milian.wolff@kdab.com> | 2020-01-06 09:27:50 +0100 |
---|---|---|
committer | Milian Wolff <milian.wolff@kdab.com> | 2020-01-09 19:22:11 +0000 |
commit | 37dce9049204ea8ed420686cb407aad0be3d7950 (patch) | |
tree | 90da33744635f7174c9ebda4036941b0b03d6a91 | |
parent | 0cdaacb32cbcab57226bc6c96ce01c8958456122 (diff) |
Only try the dwfl_addrmodule pgoff fallback for valid ElfInfo
When the ElfInfo is invalid, addr - pgoff is 0 and then the fallback
will fail anyways, as no module is mapped at that address ever.
Change-Id: I04bc372a2e29888b9aa9acf16c74cd27cfce9046
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
-rw-r--r-- | app/perfsymboltable.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/perfsymboltable.cpp b/app/perfsymboltable.cpp index 144e281..2482dd4 100644 --- a/app/perfsymboltable.cpp +++ b/app/perfsymboltable.cpp @@ -558,7 +558,7 @@ Dwfl_Module *PerfSymbolTable::module(quint64 addr, const PerfElfMap::ElfInfo &el Dwfl_Module *mod = dwfl_addrmodule(m_dwfl, addr); - if (!mod) { + if (!mod && elf.isValid()) { // check whether we queried for an address outside the elf range parsed // by dwfl. If that is the case, then we would invalidate the cache and // re-report the library again - essentially recreating the current state |