File tree Expand file tree Collapse file tree 2 files changed +27
-0
lines changed Expand file tree Collapse file tree 2 files changed +27
-0
lines changed Original file line number Diff line number Diff line change @@ -35,6 +35,30 @@ class BINARYNINJAUIAPI MemoryMapItemDelegate : public QStyledItemDelegate
3535 virtual void paint (QPainter* painter, const QStyleOptionViewItem& option, const QModelIndex& index) const override ;
3636};
3737
38+ /* !
39+
40+ \ingroup memorymap
41+ */
42+ class BINARYNINJAUIAPI MemoryRegionDialog : public QDialog
43+ {
44+ QPushButton* m_selectFileButton;
45+ QPushButton* m_acceptButton;
46+ QPushButton* m_cancelButton;
47+ QLineEdit* m_nameField;
48+ QLineEdit* m_startField;
49+ QLineEdit* m_endField;
50+ QLabel* m_contentsLabel;
51+
52+ BinaryViewRef m_data;
53+ SegmentRef m_segment;
54+ std::optional<std::string> m_filePath;
55+
56+ void SelectFile ();
57+ void Submit ();
58+ public:
59+ MemoryRegionDialog (QWidget* parent, BinaryViewRef data, SegmentRef associatedSegment = nullptr );
60+ };
61+
3862/* !
3963
4064 \ingroup memorymap
@@ -92,6 +116,7 @@ enum class SegmentColumn : int {
92116 DATA_LENGTH,
93117 FLAGS,
94118 SOURCE,
119+ REGION,
95120 COLUMN_COUNT,
96121};
97122
@@ -142,6 +167,7 @@ class BINARYNINJAUIAPI SegmentWidget : public QWidget
142167 QMenu* createHeaderContextMenu (const QPoint& p);
143168 void restoreDefaults ();
144169
170+ void addMemoryRegion (SegmentRef segment);
145171 void addSegment ();
146172 void editSegment (SegmentRef segment);
147173 void disableSegment (SegmentRef segment);
Original file line number Diff line number Diff line change @@ -99,6 +99,7 @@ typedef BinaryNinja::Ref<BinaryNinja::ScriptingProvider> ScriptingProviderRef;
9999typedef BinaryNinja ::Ref < BinaryNinja ::SecretsProvider > SecretsProviderRef ;
100100typedef BinaryNinja ::Ref < BinaryNinja ::Section > SectionRef ;
101101typedef BinaryNinja ::Ref < BinaryNinja ::Segment > SegmentRef ;
102+ typedef BinaryNinja ::Ref < BinaryNinja ::MemoryMap > MemoryMapRef ;
102103typedef BinaryNinja ::Ref < BinaryNinja ::Settings > SettingsRef ;
103104typedef BinaryNinja ::Ref < BinaryNinja ::Snapshot > SnapshotRef ;
104105typedef BinaryNinja ::Ref < BinaryNinja ::Structure > StructureRef ;
You can’t perform that action at this time.
0 commit comments