summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2018-01-26 09:08:20 +0100
committerUlf Hermann <ulf.hermann@qt.io>2018-01-26 13:11:13 +0000
commit37b6fd17c306c13333cb3bc0ad0a0ad357e2fe85 (patch)
treec1d4c996526673a2a924b9fb14499b721bbd9ae5
parentd13a5eeded0f80ed88060e6a2e5b31ede849d572 (diff)
Don't try to unwind a stack if we fail to attach the dwflv4.6.2v4.6.1v4.6.0-rc1v4.6.0-beta1v4.6.04.6
Change-Id: I1039960a59354939b362019150ea67892d69aa81 Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
-rw-r--r--app/perfunwind.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/app/perfunwind.cpp b/app/perfunwind.cpp
index 9680683..94b68ef 100644
--- a/app/perfunwind.cpp
+++ b/app/perfunwind.cpp
@@ -368,6 +368,9 @@ static int frameCallback(Dwfl_Frame *state, void *arg)
void PerfUnwind::unwindStack()
{
Dwfl *dwfl = symbolTable(m_currentUnwind.sample->pid())->attachDwfl(&m_currentUnwind);
+ if (!dwfl)
+ return;
+
dwfl_getthread_frames(dwfl, m_currentUnwind.sample->pid(), frameCallback, &m_currentUnwind);
if (m_currentUnwind.isInterworking) {
QVector<qint32> savedFrames = m_currentUnwind.frames;