diff options
author | Milian Wolff <milian.wolff@kdab.com> | 2019-08-08 23:35:00 +0200 |
---|---|---|
committer | Milian Wolff <milian.wolff@kdab.com> | 2019-08-13 12:02:44 +0000 |
commit | 1555c41b5a5cf154f00c6a581f4a9120e91a54cd (patch) | |
tree | 5a3345fe5f20ed2f83fe5a6cf132eb4331cf171e | |
parent | 566f0f380651696bbe6c57f532f19de0a8ace571 (diff) |
Ensure we always set a valid pid on locations we send
Change-Id: I8dca8eb4cc3aa728f033ff27679ef65b5a2fbee2
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
-rw-r--r-- | app/perfsymboltable.cpp | 1 | ||||
-rw-r--r-- | app/perfunwind.cpp | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/app/perfsymboltable.cpp b/app/perfsymboltable.cpp index ddb67f9..794bcc7 100644 --- a/app/perfsymboltable.cpp +++ b/app/perfsymboltable.cpp @@ -399,6 +399,7 @@ int PerfSymbolTable::parseDie(Dwarf_Die *top, qint32 binaryId, qint32 binaryPath location.column = (dwarf_formudata(dwarf_attr(top, DW_AT_call_column, &attr), &val) == 0) ? static_cast<qint32>(val) : -1; + location.pid = m_pid; auto it = stack.end(); --it; diff --git a/app/perfunwind.cpp b/app/perfunwind.cpp index 904fcbf..6da4ae5 100644 --- a/app/perfunwind.cpp +++ b/app/perfunwind.cpp @@ -711,6 +711,7 @@ void PerfUnwind::sendString(qint32 id, const QByteArray& string) void PerfUnwind::sendLocation(qint32 id, const PerfUnwind::Location &location) { QByteArray buffer; + Q_ASSERT(location.pid); QDataStream(&buffer, QIODevice::WriteOnly) << static_cast<quint8>(LocationDefinition) << id << location; sendBuffer(buffer); |