summaryrefslogtreecommitdiff
path: root/binaryview.cpp
diff options
context:
space:
mode:
authorChinmay <chinmay1dd@gmail.com>2020-08-17 22:53:09 -0700
committerChinmay Deshpande <chinmay1dd@gmail.com>2020-09-08 09:29:18 -0700
commit73b649e79d5cd219cb56866abf2ee5e6a64d976a (patch)
tree07bbd8c4e5f8b6d743760a3e226a975cc83c2c15 /binaryview.cpp
parent62aa529de8a169578c80b14e3969b076f65be205 (diff)
UI changes for user-informed dataflow
Diffstat (limited to 'binaryview.cpp')
-rw-r--r--binaryview.cpp21
1 files changed, 21 insertions, 0 deletions
diff --git a/binaryview.cpp b/binaryview.cpp
index 8d78c4b3..3953cee6 100644
--- a/binaryview.cpp
+++ b/binaryview.cpp
@@ -2446,6 +2446,27 @@ uint64_t BinaryView::GetPreviousDataVariableStartBeforeAddress(uint64_t addr)
}
+bool BinaryView::ParsePossibleValueSetString(const string& value, BNRegisterValueType state, PossibleValueSet& result, uint64_t here, string& errors)
+{
+ BNPossibleValueSet res;
+ char* errorStr;
+
+ if (!BNParsePossibleValueSetString(m_object, value.c_str(), state, &res, here, &errorStr))
+ {
+ if (!errorStr)
+ errors = "";
+ else
+ errors = errorStr;
+ BNFreeString(errorStr);
+ return false;
+ }
+
+ result = PossibleValueSet::FromAPIObject(res);
+ errors = "";
+ return true;
+}
+
+
bool BinaryView::ParseTypeString(const string& text, QualifiedNameAndType& result, string& errors,
const std::set<QualifiedName>& typesAllowRedefinition)
{