From 6f2b41faa95eeb684612b6aada1854911dda3cda Mon Sep 17 00:00:00 2001 From: rollsafe Date: Tue, 4 Jun 2019 17:38:51 -0400 Subject: Display from and to xrefs in xref window --- ui/xreflist.h | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/ui/xreflist.h b/ui/xreflist.h index f6d4feec..cbe31d62 100644 --- a/ui/xreflist.h +++ b/ui/xreflist.h @@ -9,13 +9,24 @@ #include "viewframe.h" +struct XrefItem +{ + BinaryNinja::ReferenceSource ref; + enum XrefDirection + { + Forward, // Xref from this address + Backward // Xref to this address + } direction; +}; + + class BINARYNINJAUIAPI CrossReferenceListModel: public QAbstractItemModel { Q_OBJECT QWidget* m_owner; BinaryViewRef m_data; - std::vector m_refs; + std::vector m_refs; public: CrossReferenceListModel(QWidget* parent, BinaryViewRef data); @@ -27,7 +38,7 @@ public: virtual int columnCount(const QModelIndex& parent) const override; virtual QVariant data(const QModelIndex& i, int role) const override; - bool setModelData(const std::vector& refs, QItemSelectionModel* selectionModel, bool& selectionUpdated); + bool setModelData(const std::vector& refs, QItemSelectionModel* selectionModel, bool& selectionUpdated); }; -- cgit v1.3.1