Compare commits

..

2 Commits

Author SHA1 Message Date
Ernie Pasveer 0c876d0c92 Merge pull request #530 from epasveer/511-parallelstacks-handle-when-there-is-no-function-name-in-the-debug-info
If the function name is "??", use the function address.
2026-08-17 18:00:53 -05:00
Ernie Pasveer 42bcc76aa4 If the function name is "??", use the function address. 2026-08-17 17:46:05 -05:00
3 changed files with 13 additions and 3 deletions
+9
View File
@@ -43,6 +43,15 @@ const QString& SeerParallelStacksFrame::function () const {
return _function; return _function;
} }
QString SeerParallelStacksFrame::functionOrAddr () const {
if (_function == "??") {
return _addr;
}
return _function;
}
const QString& SeerParallelStacksFrame::arch () const { const QString& SeerParallelStacksFrame::arch () const {
return _arch; return _arch;
} }
+1
View File
@@ -19,6 +19,7 @@ class SeerParallelStacksFrame {
int level () const; int level () const;
const QString& addr () const; const QString& addr () const;
const QString& function () const; const QString& function () const;
QString functionOrAddr () const;
const QString& arch () const; const QString& arch () const;
const QString& from () const; const QString& from () const;
const QString& file () const; const QString& file () const;
+3 -3
View File
@@ -128,7 +128,7 @@ SeerParallelStacksStackBoxItem::SeerParallelStacksStackBoxItem(const SeerParalle
qreal maxTextW = headerW; qreal maxTextW = headerW;
for (const auto& frame : _stack.frames) { 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; _width = maxTextW + 2 * _kPadX;
@@ -190,7 +190,7 @@ void SeerParallelStacksStackBoxItem::paint(QPainter* painter, const QStyleOption
painter->setPen(colors.frameText); painter->setPen(colors.frameText);
for (const auto& frame : _stack.frames) { 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; y += _kRowH;
} }
@@ -311,7 +311,7 @@ void SeerParallelStacksStackBoxItem::handleShowPopup() {
QString frame; QString frame;
if (_stack.frames.size() > 0) { if (_stack.frames.size() > 0) {
frame = _stack.frames[0].function(); frame = _stack.frames[0].functionOrAddr();
} }
_popup = new SeerParallelStacksPopupTableWidget(); _popup = new SeerParallelStacksPopupTableWidget();