summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--binaryninjaapi.h3
-rw-r--r--function.cpp6
2 files changed, 9 insertions, 0 deletions
diff --git a/binaryninjaapi.h b/binaryninjaapi.h
index 0f49039f..a726b843 100644
--- a/binaryninjaapi.h
+++ b/binaryninjaapi.h
@@ -3238,6 +3238,9 @@ __attribute__ ((format (printf, 1, 2)))
int64_t offset;
RegisterValue();
+
+ bool IsConstant() const;
+
static RegisterValue FromAPIObject(const BNRegisterValue& value);
BNRegisterValue ToAPIObject();
};
diff --git a/function.cpp b/function.cpp
index fc90a8d1..f8b84a8a 100644
--- a/function.cpp
+++ b/function.cpp
@@ -106,6 +106,12 @@ RegisterValue::RegisterValue(): state(UndeterminedValue), value(0), offset(0)
}
+bool RegisterValue::IsConstant() const
+{
+ return (state == ConstantValue) || (state == ConstantPointerValue);
+}
+
+
BNRegisterValue RegisterValue::ToAPIObject()
{
BNRegisterValue result;