diff options
| author | Brian Potchik <brian@vector35.com> | 2023-02-05 09:13:57 -0500 |
|---|---|---|
| committer | Brian Potchik <brian@vector35.com> | 2023-02-05 09:13:57 -0500 |
| commit | c96746fdfe06366549717cf233d280fba22d7322 (patch) | |
| tree | 543140b3dc20de6f7efd965c96473b607e8cd501 | |
| parent | 0fa4582e13e9a3cb8a4ac662cfef0a0735ad4a78 (diff) | |
Add IsConstantData to the C++ RegisterValue API.
| -rw-r--r-- | binaryninjaapi.h | 1 | ||||
| -rw-r--r-- | function.cpp | 6 |
2 files changed, 7 insertions, 0 deletions
diff --git a/binaryninjaapi.h b/binaryninjaapi.h index 5be1d760..7ad86999 100644 --- a/binaryninjaapi.h +++ b/binaryninjaapi.h @@ -8365,6 +8365,7 @@ namespace BinaryNinja { RegisterValue(); bool IsConstant() const; + bool IsConstantData() const; static RegisterValue FromAPIObject(const BNRegisterValue& value); BNRegisterValue ToAPIObject(); diff --git a/function.cpp b/function.cpp index 581121c2..37192ba0 100644 --- a/function.cpp +++ b/function.cpp @@ -110,6 +110,12 @@ bool RegisterValue::IsConstant() const } +bool RegisterValue::IsConstantData() const +{ + return ((state & ConstantDataValue) == ConstantDataValue); +} + + BNRegisterValue RegisterValue::ToAPIObject() { BNRegisterValue result; |
