diff options
| author | Rusty Wagner <rusty@vector35.com> | 2020-01-03 21:51:50 -0500 |
|---|---|---|
| committer | Rusty Wagner <rusty@vector35.com> | 2020-04-17 14:20:38 -0400 |
| commit | 0e8987bb46b8aa33c5898d5effed25f1124e03dd (patch) | |
| tree | 87943b69c39f4377eedf07c2fa9b9ec1ab018f9d /highlevelil.cpp | |
| parent | 620dd96217a49803fe04c6bc286291ddd857dcba (diff) | |
Add types to HLIL expressions
Diffstat (limited to 'highlevelil.cpp')
| -rw-r--r-- | highlevelil.cpp | 15 |
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) { |
