diff --git a/src/widgets/HexdumpWidget.cpp b/src/widgets/HexdumpWidget.cpp
index f7a66082b3..fcf64f62ef 100644
--- a/src/widgets/HexdumpWidget.cpp
+++ b/src/widgets/HexdumpWidget.cpp
@@ -62,6 +62,11 @@ HexdumpWidget::HexdumpWidget(MainWindow *main, QAction *action) :
ui->bytesCRC32->setPlaceholderText(placeholder);
ui->hexDisasTextEdit->setPlaceholderText(placeholder);
+ // Set placeholders for the flag and comment components
+ QString placeholder_2 = tr("Select address to display information");
+ ui->addressFlag->setPlaceholderText(placeholder_2);
+ ui->addressComment->setPlaceholderText(placeholder_2);
+
setupFonts();
ui->openSideViewB->setStyleSheet(""
@@ -97,6 +102,7 @@ HexdumpWidget::HexdumpWidget(MainWindow *main, QAction *action) :
seekable->seek(addr);
sent_seek = false;
}
+ showMetaInfo(addr);
});
connect(ui->hexTextView, &HexWidget::selectionChanged, this, &HexdumpWidget::selectionChanged);
connect(ui->hexSideTab_2, &QTabWidget::currentChanged, this, &HexdumpWidget::refreshSelectionInfo);
@@ -289,6 +295,28 @@ void HexdumpWidget::updateParseWindow(RVA start_address, int size)
}
}
+void HexdumpWidget::showMetaInfo(RVA address) {
+ QString flagName = "";
+
+ RCore *core = Core()->core();
+ RFlagItem *f = r_flag_get_i (core->flags, address);
+
+ if (f) {
+ // Check if Realname is enabled. If yes, show it instead of the full flag-name.
+ if (Config()->getConfigBool("asm.flags.real") && f->realname) {
+ flagName = f->realname;
+ } else {
+ flagName = f->name;
+ }
+ }
+
+ // Fill the information for flag and comment
+ ui->addressFlag->setText(flagName.trimmed());
+ ui->addressComment->setText(Core()->cmd("CC." + RAddressString(address).trimmed()));
+ ui->addressFlag->setCursorPosition(0);
+ ui->addressComment->setCursorPosition(0);
+}
+
void HexdumpWidget::on_parseTypeComboBox_currentTextChanged(const QString &)
{
if (ui->parseTypeComboBox->currentIndex() == 0) {
diff --git a/src/widgets/HexdumpWidget.h b/src/widgets/HexdumpWidget.h
index f18c3e2cdd..61ff1f1f95 100644
--- a/src/widgets/HexdumpWidget.h
+++ b/src/widgets/HexdumpWidget.h
@@ -58,6 +58,7 @@ public slots:
void setupFonts();
void refreshSelectionInfo();
+ void showMetaInfo(RVA address);
void updateParseWindow(RVA start_address, int size);
void clearParseWindow();
void showSidePanel(bool show);
diff --git a/src/widgets/HexdumpWidget.ui b/src/widgets/HexdumpWidget.ui
index e2656a5f39..6d72110b19 100644
--- a/src/widgets/HexdumpWidget.ui
+++ b/src/widgets/HexdumpWidget.ui
@@ -490,6 +490,70 @@
+ -
+
+
+
+ 0
+ 0
+
+
+
+ true
+
+
+ Qt::AlignJustify|Qt::AlignVCenter
+
+
+ true
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+ Flag:
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+ true
+
+
+ Qt::AlignJustify|Qt::AlignVCenter
+
+
+ true
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+ Comment:
+
+
+
-