From f9ac7495ac089f32b1712e5500cf2cd0c426c5dc Mon Sep 17 00:00:00 2001 From: Mason Reed Date: Tue, 29 Apr 2025 16:05:54 -0400 Subject: Memory map UI improvements --- ui/memorymap.h | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'ui/memorymap.h') diff --git a/ui/memorymap.h b/ui/memorymap.h index f96f26c0..9fdab8be 100644 --- a/ui/memorymap.h +++ b/ui/memorymap.h @@ -35,6 +35,30 @@ public: virtual void paint(QPainter* painter, const QStyleOptionViewItem& option, const QModelIndex& index) const override; }; +/*! + + \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 m_filePath; + + void SelectFile(); + void Submit(); +public: + MemoryRegionDialog(QWidget* parent, BinaryViewRef data, SegmentRef associatedSegment = nullptr); +}; + /*! \ingroup memorymap @@ -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); -- cgit v1.3.1