First work on showing assembly tab when there's no source file.

This commit is contained in:
Ernie Pasveer
2025-12-18 12:52:05 -06:00
parent ccdea4f867
commit 64c99f4d59
20 changed files with 792 additions and 650 deletions
+32 -3
View File
@@ -76,6 +76,9 @@ void SeerStackFramesBrowserWidget::handleText (const QString& text) {
QString firstLiveFrameFullname = "";
QString firstLiveFrameLine = "";
QString firstFrameLevel = "";
QString firstFrameAddr = "";
for ( const auto& frame_text : frame_list ) {
QString level_text = Seer::parseFirst(frame_text, "level=", '"', '"', false);
@@ -114,13 +117,30 @@ void SeerStackFramesBrowserWidget::handleText (const QString& text) {
item->setFlags(Qt::NoItemFlags);
}
// Get the address of the first entry of the frame.
if (addr_text != "") {
if (firstFrameLevel == "") {
firstFrameLevel = level_text;
firstFrameAddr = addr_text;
}
}
// Add the frame to the tree.
stackTreeWidget->addTopLevelItem(item);
}
// Automatically bring up the file for the first live frame.
if (firstLiveFrameLevel != "") {
emit selectedFile(firstLiveFrameFile, firstLiveFrameFullname, firstLiveFrameLine.toInt());
if (firstLiveFrameFile != "" && firstLiveFrameFullname != "") {
emit selectedFile(firstLiveFrameFile, firstLiveFrameFullname, firstLiveFrameLine.toInt());
}
}
// Automatically bring up the assembly for the first frame.
if (firstFrameLevel != "") {
if (firstFrameAddr != "") {
emit selectedAddress(firstFrameAddr);
}
}
}
@@ -185,9 +205,18 @@ void SeerStackFramesBrowserWidget::handleItemClicked (QTreeWidgetItem* item, int
int lineno = item->text(3).toInt();
emit selectedFile(item->text(2), item->text(4), lineno);
// Select frame.
emit selectedFrame(item->text(0).toInt());
emit selectedAddress(item->text(5));
// Select file if we can.
if (item->text(2) != "" && item->text(4) != "") {
emit selectedFile(item->text(2), item->text(4), lineno);
}
// Select address if we can.
if (item->text(5) != "") {
emit selectedAddress(item->text(5));
}
}
void SeerStackFramesBrowserWidget::handleItemEntered (QTreeWidgetItem* item, int column) {