Simplify SidebarWidget::setFcnName() to not use S

This commit is contained in:
Florian Märkl 2018-11-11 11:56:13 +01:00
parent 87026dfe28
commit 5a03a07e1b

View File

@ -207,18 +207,7 @@ void SidebarWidget::fillOffsetInfo(QString off)
void SidebarWidget::setFcnName(RVA addr) void SidebarWidget::setFcnName(RVA addr)
{ {
RAnalFunction *fcn; ui->fcnNameEdit->setText(Core()->cmdFunctionAt(addr));
QString addr_string;
fcn = Core()->functionAt(addr);
if (fcn) {
QString segment = Core()->cmd("S. @ " + QString::number(addr)).split(" ").last();
addr_string = segment.trimmed() + ":" + fcn->name;
} else {
addr_string = Core()->cmdFunctionAt(addr);
}
ui->fcnNameEdit->setText(addr_string);
} }
void SidebarWidget::setScrollMode() void SidebarWidget::setScrollMode()