summaryrefslogtreecommitdiff
path: root/highlevelil.cpp
diff options
context:
space:
mode:
authorRusty Wagner <rusty@vector35.com>2020-01-03 21:51:50 -0500
committerRusty Wagner <rusty@vector35.com>2020-04-17 14:20:38 -0400
commit0e8987bb46b8aa33c5898d5effed25f1124e03dd (patch)
tree87943b69c39f4377eedf07c2fa9b9ec1ab018f9d /highlevelil.cpp
parent620dd96217a49803fe04c6bc286291ddd857dcba (diff)
Add types to HLIL expressions
Diffstat (limited to 'highlevelil.cpp')
-rw-r--r--highlevelil.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/highlevelil.cpp b/highlevelil.cpp
index 679344ce..a3c9e5b2 100644
--- a/highlevelil.cpp
+++ b/highlevelil.cpp
@@ -295,6 +295,21 @@ vector<DisassemblyTextLine> HighLevelILFunction::GetExprText(const HighLevelILIn
}
+Confidence<Ref<Type>> HighLevelILFunction::GetExprType(size_t expr)
+{
+ BNTypeWithConfidence result = BNGetHighLevelILExprType(m_object, expr);
+ if (!result.type)
+ return nullptr;
+ return Confidence<Ref<Type>>(new Type(result.type), result.confidence);
+}
+
+
+Confidence<Ref<Type>> HighLevelILFunction::GetExprType(const HighLevelILInstruction& expr)
+{
+ return GetExprType(expr.exprIndex);
+}
+
+
void HighLevelILFunction::VisitAllExprs(
const function<bool(const HighLevelILInstruction& expr)>& func)
{