summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--binaryninjaapi.h1
-rw-r--r--binaryview.cpp18
2 files changed, 19 insertions, 0 deletions
diff --git a/binaryninjaapi.h b/binaryninjaapi.h
index 762cd275..71b506e0 100644
--- a/binaryninjaapi.h
+++ b/binaryninjaapi.h
@@ -4281,6 +4281,7 @@ namespace BinaryNinja {
TagReference();
TagReference(const BNTagReference& ref);
+ bool EqualsByData(const TagReference& other) const;
bool operator==(const TagReference& other) const;
bool operator!=(const TagReference& other) const;
diff --git a/binaryview.cpp b/binaryview.cpp
index d88c4548..f0969e9f 100644
--- a/binaryview.cpp
+++ b/binaryview.cpp
@@ -950,6 +950,24 @@ TagReference::TagReference(const BNTagReference& ref)
}
+bool TagReference::EqualsByData(const TagReference& other) const
+{
+ if (refType != other.refType)
+ return false;
+ if (autoDefined != other.autoDefined)
+ return false;
+ if (addr != other.addr)
+ return false;
+ if (func != other.func)
+ return false;
+ if (arch != other.arch)
+ return false;
+ if (tag->GetData() != other.tag->GetData())
+ return false;
+ return true;
+}
+
+
bool TagReference::operator==(const TagReference& other) const
{
if (refType != other.refType)