If the function name is "??", use the function address.

This commit is contained in:
Ernie Pasveer
2026-08-17 17:46:05 -05:00
parent 93b569191c
commit 42bcc76aa4
3 changed files with 13 additions and 3 deletions
+9
View File
@@ -43,6 +43,15 @@ const QString& SeerParallelStacksFrame::function () const {
return _function;
}
QString SeerParallelStacksFrame::functionOrAddr () const {
if (_function == "??") {
return _addr;
}
return _function;
}
const QString& SeerParallelStacksFrame::arch () const {
return _arch;
}
+1
View File
@@ -19,6 +19,7 @@ class SeerParallelStacksFrame {
int level () const;
const QString& addr () const;
const QString& function () const;
QString functionOrAddr () const;
const QString& arch () const;
const QString& from () const;
const QString& file () const;
+3 -3
View File
@@ -128,7 +128,7 @@ SeerParallelStacksStackBoxItem::SeerParallelStacksStackBoxItem(const SeerParalle
qreal maxTextW = headerW;
for (const auto& frame : _stack.frames) {
maxTextW = std::max(maxTextW, (qreal)normFm.horizontalAdvance(frame.function()));
maxTextW = std::max(maxTextW, (qreal)normFm.horizontalAdvance(frame.functionOrAddr()));
}
_width = maxTextW + 2 * _kPadX;
@@ -190,7 +190,7 @@ void SeerParallelStacksStackBoxItem::paint(QPainter* painter, const QStyleOption
painter->setPen(colors.frameText);
for (const auto& frame : _stack.frames) {
painter->drawText(QRectF(_kPadX, y, innerW, _kRowH), Qt::AlignLeft | Qt::AlignVCenter, frame.function());
painter->drawText(QRectF(_kPadX, y, innerW, _kRowH), Qt::AlignLeft | Qt::AlignVCenter, frame.functionOrAddr());
y += _kRowH;
}
@@ -311,7 +311,7 @@ void SeerParallelStacksStackBoxItem::handleShowPopup() {
QString frame;
if (_stack.frames.size() > 0) {
frame = _stack.frames[0].function();
frame = _stack.frames[0].functionOrAddr();
}
_popup = new SeerParallelStacksPopupTableWidget();