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
35
35
virtual void paint (QPainter* painter, const QStyleOptionViewItem& option, const QModelIndex& index) const override ;
36
36
};
37
37
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
+
38
62
/* !
39
63
40
64
\ingroup memorymap
@@ -92,6 +116,7 @@ enum class SegmentColumn : int {
92
116
DATA_LENGTH,
93
117
FLAGS,
94
118
SOURCE,
119
+ REGION,
95
120
COLUMN_COUNT,
96
121
};
97
122
@@ -142,6 +167,7 @@ class BINARYNINJAUIAPI SegmentWidget : public QWidget
142
167
QMenu* createHeaderContextMenu (const QPoint& p);
143
168
void restoreDefaults ();
144
169
170
+ void addMemoryRegion (SegmentRef segment);
145
171
void addSegment ();
146
172
void editSegment (SegmentRef segment);
147
173
void disableSegment (SegmentRef segment);
Original file line number Diff line number Diff line change @@ -99,6 +99,7 @@ typedef BinaryNinja::Ref<BinaryNinja::ScriptingProvider> ScriptingProviderRef;
99
99
typedef BinaryNinja ::Ref < BinaryNinja ::SecretsProvider > SecretsProviderRef ;
100
100
typedef BinaryNinja ::Ref < BinaryNinja ::Section > SectionRef ;
101
101
typedef BinaryNinja ::Ref < BinaryNinja ::Segment > SegmentRef ;
102
+ typedef BinaryNinja ::Ref < BinaryNinja ::MemoryMap > MemoryMapRef ;
102
103
typedef BinaryNinja ::Ref < BinaryNinja ::Settings > SettingsRef ;
103
104
typedef BinaryNinja ::Ref < BinaryNinja ::Snapshot > SnapshotRef ;
104
105
typedef BinaryNinja ::Ref < BinaryNinja ::Structure > StructureRef ;
You can’t perform that action at this time.
0 commit comments