Skip to content

Commit

Permalink
Mark available flags and comments (rizinorg#1471)
Browse files Browse the repository at this point in the history
  • Loading branch information
dhavalpur0hit committed Mar 22, 2020
1 parent 5fb7fa5 commit 57bc3d5
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions src/widgets/VisualNavbar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -310,5 +310,27 @@ QString VisualNavbar::toolTipForAddress(RVA address)
ret += " " + section;
}
}

RCore *core = Core()->core();
RFlagItem *f = r_flag_get_i (core->flags, address);

if (f) {
QString name;

// Check if Realname is enabled. If yes, show it instead of the full flag-name.
if (Config()->getConfigBool("asm.flags.real") && f->realname) {
name = f->realname;
} else {
name = f->name;
}

ret += "\nFlag: " + name;
}

QString comment = Core()->cmd("CC." + RAddressString(address));
if (!(comment.isNull() || comment.isEmpty())) {
ret += "\nComment: " + comment;
}

return ret;
}

0 comments on commit 57bc3d5

Please sign in to comment.