mirror of
https://github.com/epasveer/seer.git
synced 2026-08-30 00:50:42 +08:00
First work on showing assembly tab when there's no source file.
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user