summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ui/memorymap.h26
-rw-r--r--ui/uitypes.h1
2 files changed, 27 insertions, 0 deletions
diff --git a/ui/memorymap.h b/ui/memorymap.h
index f96f26c0..9fdab8be 100644
--- a/ui/memorymap.h
+++ b/ui/memorymap.h
@@ -37,6 +37,30 @@ public:
/*!
+ \ingroup memorymap
+*/
+class BINARYNINJAUIAPI MemoryRegionDialog : public QDialog
+{
+ QPushButton* m_selectFileButton;
+ QPushButton* m_acceptButton;
+ QPushButton* m_cancelButton;
+ QLineEdit* m_nameField;
+ QLineEdit* m_startField;
+ QLineEdit* m_endField;
+ QLabel* m_contentsLabel;
+
+ BinaryViewRef m_data;
+ SegmentRef m_segment;
+ std::optional<std::string> m_filePath;
+
+ void SelectFile();
+ void Submit();
+public:
+ MemoryRegionDialog(QWidget* parent, BinaryViewRef data, SegmentRef associatedSegment = nullptr);
+};
+
+/*!
+
\ingroup memorymap
*/
class BINARYNINJAUIAPI SegmentDialog : public QDialog
@@ -92,6 +116,7 @@ enum class SegmentColumn : int {
DATA_LENGTH,
FLAGS,
SOURCE,
+ REGION,
COLUMN_COUNT,
};
@@ -142,6 +167,7 @@ class BINARYNINJAUIAPI SegmentWidget : public QWidget
QMenu* createHeaderContextMenu(const QPoint& p);
void restoreDefaults();
+ void addMemoryRegion(SegmentRef segment);
void addSegment();
void editSegment(SegmentRef segment);
void disableSegment(SegmentRef segment);
diff --git a/ui/uitypes.h b/ui/uitypes.h
index a520dbbe..89d2bdcd 100644
--- a/ui/uitypes.h
+++ b/ui/uitypes.h
@@ -99,6 +99,7 @@ typedef BinaryNinja::Ref<BinaryNinja::ScriptingProvider> ScriptingProviderRef;
typedef BinaryNinja::Ref<BinaryNinja::SecretsProvider> SecretsProviderRef;
typedef BinaryNinja::Ref<BinaryNinja::Section> SectionRef;
typedef BinaryNinja::Ref<BinaryNinja::Segment> SegmentRef;
+typedef BinaryNinja::Ref<BinaryNinja::MemoryMap> MemoryMapRef;
typedef BinaryNinja::Ref<BinaryNinja::Settings> SettingsRef;
typedef BinaryNinja::Ref<BinaryNinja::Snapshot> SnapshotRef;
typedef BinaryNinja::Ref<BinaryNinja::Structure> StructureRef;