diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 54fbe3ba..a94b9d0c 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -825,7 +825,8 @@ void MainWindow::on_backButton_clicked() this->core->cmd("s-"); QString back_offset = this->core->cmd("s=").split(" > ").last().trimmed(); if (back_offset != "") { - this->seek(back_offset); + QString fcn = this->core->cmdFunctionAt(back_offset); + this->seek(this->memoryDock->normalizeAddr(back_offset), fcn); } } diff --git a/src/widgets/memwidget/memorywidget.cpp b/src/widgets/memwidget/memorywidget.cpp index b44e53e7..72a2a1c0 100644 --- a/src/widgets/memwidget/memorywidget.cpp +++ b/src/widgets/memwidget/memorywidget.cpp @@ -1597,9 +1597,9 @@ bool MemoryWidget::eventFilter(QObject *obj, QEvent *event) { jump = this->main->core->getOffsetJump(ele); if (jump != "") { if (jump.contains("0x")) { - RAnalFunction *fcn = this->main->core->functionAt(jump.toLongLong(0, 16)); - if (fcn) { - this->main->seek(jump, fcn->name); + QString fcn = this->main->core->cmdFunctionAt(jump); + if (fcn != "") { + this->main->seek(jump.trimmed(), fcn); } } else { this->main->seek(this->main->core->cmd("?v " + jump), jump); diff --git a/src/widgets/memwidget/memorywidget.h b/src/widgets/memwidget/memorywidget.h index 8b300ad0..b719fff8 100644 --- a/src/widgets/memwidget/memorywidget.h +++ b/src/widgets/memwidget/memorywidget.h @@ -72,6 +72,8 @@ public slots: QString normalize_addr(QString addr); + QString normalizeAddr(QString addr); + void setFcnName(QString addr); void setMiniGraph(QString at); @@ -164,7 +166,6 @@ private slots: void on_copyMD5_clicked(); void on_copySHA1_clicked(); void on_simpleGrapgToolButton_clicked(); - QString normalizeAddr(QString addr); void on_opcodeDescButton_clicked(); void seek_back(); };