From 1555c41b5a5cf154f00c6a581f4a9120e91a54cd Mon Sep 17 00:00:00 2001 From: Milian Wolff Date: Thu, 8 Aug 2019 23:35:00 +0200 Subject: Ensure we always set a valid pid on locations we send Change-Id: I8dca8eb4cc3aa728f033ff27679ef65b5a2fbee2 Reviewed-by: Ulf Hermann --- app/perfsymboltable.cpp | 1 + app/perfunwind.cpp | 1 + 2 files changed, 2 insertions(+) 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(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(LocationDefinition) << id << location; sendBuffer(buffer); -- cgit v1.2.3