@@ -55,6 +55,14 @@ class XrefItem
55
55
TypeXrefType
56
56
};
57
57
58
+ enum XrefQueryKind
59
+ {
60
+ AddressXrefQuery,
61
+ TypeXrefQuery,
62
+ TypeFieldXrefQuery,
63
+ LocalVarXrefQuery
64
+ };
65
+
58
66
protected:
59
67
FunctionRef m_func;
60
68
ArchitectureRef m_arch;
@@ -65,6 +73,7 @@ class XrefItem
65
73
BNFunctionGraphType m_ilType;
66
74
size_t m_instrId;
67
75
XrefType m_type;
76
+ XrefQueryKind m_queryKind;
68
77
XrefDirection m_direction;
69
78
mutable std::vector<BinaryNinja::InstructionTextToken> m_cachedTokens;
70
79
mutable XrefHeader* m_parentItem;
@@ -74,11 +83,13 @@ class XrefItem
74
83
explicit XrefItem ();
75
84
explicit XrefItem (XrefHeader* parent, XrefType type, FunctionRef func);
76
85
// The four constructors are used for code/data/type/variable references, respectively
77
- explicit XrefItem (BinaryNinja::ReferenceSource ref, XrefType type, XrefDirection direction);
78
- explicit XrefItem (uint64_t addr, XrefType type, XrefDirection direction);
79
- explicit XrefItem (BinaryNinja::TypeReferenceSource ref, XrefType type, XrefDirection direction);
80
- explicit XrefItem (
81
- BinaryNinja::Variable var, BinaryNinja::ILReferenceSource ref, XrefType type, XrefDirection direction);
86
+ explicit XrefItem (BinaryNinja::ReferenceSource ref, XrefType type, XrefDirection direction,
87
+ XrefQueryKind kind);
88
+ explicit XrefItem (uint64_t addr, XrefType type, XrefDirection direction, XrefQueryKind kind);
89
+ explicit XrefItem (BinaryNinja::TypeReferenceSource ref, XrefType type, XrefDirection direction,
90
+ XrefQueryKind kind);
91
+ explicit XrefItem (BinaryNinja::Variable var, BinaryNinja::ILReferenceSource ref, XrefType type,
92
+ XrefDirection direction, XrefQueryKind kind);
82
93
XrefItem (const XrefItem& ref);
83
94
virtual ~XrefItem ();
84
95
@@ -92,6 +103,7 @@ class XrefItem
92
103
BNFunctionGraphType ilType () const { return m_ilType; }
93
104
size_t instrId () const { return m_instrId; }
94
105
XrefType type () const { return m_type; }
106
+ XrefQueryKind kind () const { return m_queryKind; }
95
107
int size () const { return m_size; }
96
108
void setSize (int size) const { m_size = size; }
97
109
void setParent (XrefHeader* parent) const ;
0 commit comments